Skip to content

Align package READMEs with exported API surface for spec-librarian audit findings - #49585

Merged
pelikhan merged 2 commits into
mainfrom
copilot/spec-audit-2026-08-01
Aug 1, 2026
Merged

Align package READMEs with exported API surface for spec-librarian audit findings#49585
pelikhan merged 2 commits into
mainfrom
copilot/spec-audit-2026-08-01

Conversation

Copilot AI commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

The spec-librarian audit reported small symbol-coverage gaps across five pkg/* specifications despite full README coverage. This PR updates those package READMEs so exported top-level symbols are explicitly represented in the docs.

  • pkg/intent

    • Added PolicyCompiler.Compile to the public API documentation.
  • pkg/actionpins

    • Added ApplyContainerPinMapping to the exported functions list.
  • pkg/console

    • Added missing stderr formatter exports (FormatCommandMessageStderr, FormatProgressMessageStderr, FormatWarningMessageStderr, FormatErrorStderr).
    • Added missing exported entries for PrintSectionHeader and spinner model methods (Init, View).
  • pkg/cli

    • Added a compact “Additional exported helpers” section for missing MCP cache, HTTP wrapper, and lockfile scanner helpers:
      • GetPermission, SetPermission, GetRepo, SetRepo
      • RoundTrip, WriteHeader
      • RunGrantOnLockFiles, RunGrypeOnLockFiles, RunSyftOnLockFiles, RunYamllintOnFiles
  • pkg/workflow

    • Added an “Additional exported helpers” section covering missing builder, permissions factory, compiler/runtime, parsing, and utility exports (including Add*, NewPermissions*, Set*/Get*, and WorkflowStateBranchName).
### Additional exported helpers

- External scanner helpers: `RunGrantOnLockFiles`, `RunGrypeOnLockFiles`, `RunSyftOnLockFiles`, `RunYamllintOnFiles`

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Audit specifications for 2026-08-01 Align package READMEs with exported API surface for spec-librarian audit findings Aug 1, 2026
Copilot AI requested a review from pelikhan August 1, 2026 14:07
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

PR Triage

  • Category: docs
  • Risk: low
  • Priority: low
  • Score: 23/100 (Impact8/Urgency5/Quality10)
  • Recommended action: batch_review

Draft; README alignment with exported API surface, trivial doc-only change.

Generated by 🔧 PR Triage Agent · auto · 73.4 AIC · ⌖ 10.1 AIC · ⊞ 8K ·

@pelikhan
pelikhan marked this pull request as ready for review August 1, 2026 19:22
Copilot AI review requested due to automatic review settings August 1, 2026 19:22
@pelikhan
pelikhan merged commit fd7ad56 into main Aug 1, 2026
@pelikhan
pelikhan deleted the copilot/spec-audit-2026-08-01 branch August 1, 2026 19:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates package READMEs to address exported-symbol coverage gaps reported by #49584.

Changes:

  • Documents missing APIs across five packages.
  • Adds compact helper inventories for large CLI and workflow packages.
  • Expands console formatter and spinner method coverage.
Show a summary per file
File Description
pkg/actionpins/README.md Documents container pin mapping.
pkg/cli/README.md Lists cache, HTTP, and scanner symbols.
pkg/console/README.md Adds stderr formatters and spinner methods.
pkg/intent/README.md Documents policy compilation.
pkg/workflow/README.md Lists missing builders, factories, and helpers.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 5/5 changed files
  • Comments generated: 4
  • Review effort level: Balanced

Comment thread pkg/actionpins/README.md
| `ExtractVersion` | `func(uses string) string` | Extracts the version from a `uses` reference |
| `ResolveActionPin` | `func(actionRepo, version string, ctx *PinContext) (string, error)` | Resolves a pinned reference with optional dynamic SHA lookup and fallback behavior |
| `ResolveLatestActionPin` | `func(repo string, ctx *PinContext) string` | Resolves a pinned reference for the latest known version, preferring cache/dynamic resolution when available |
| `ApplyContainerPinMapping` | `func(image string, ctx *PinContext) string` | Applies `PinContext.Mappings` remapping rules to a container image reference before lookup |
Comment thread pkg/intent/README.md

| Method | Signature | Description |
|--------|-----------|-------------|
| `Compile` | `func (c PolicyCompiler) Compile(rec IntentRecord, repo RepositoryContext) ExecutionPolicy` | Compiles an `IntentRecord` and repository context into an execution policy |
Comment thread pkg/cli/README.md
Comment on lines +579 to +583
### Additional exported helpers

- MCP cache helpers: `GetPermission`, `SetPermission`, `GetRepo`, `SetRepo`
- HTTP wiring helpers: `RoundTrip`, `WriteHeader`
- External scanner helpers: `RunGrantOnLockFiles`, `RunGrypeOnLockFiles`, `RunSyftOnLockFiles`, `RunYamllintOnFiles`
Comment thread pkg/workflow/README.md

Constants (`MaxLockFileSize`) and action pin data are read-only after initialization and are safe for concurrent access.

### Additional exported helpers
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.84.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[spec-librarian] Specification Audit — 2026-08-01 — 5 issues found

3 participants