Align package READMEs with exported API surface for spec-librarian audit findings - #49585
Merged
Conversation
7 tasks
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
Contributor
PR Triage
Draft; README alignment with exported API surface, trivial doc-only change.
|
Contributor
There was a problem hiding this comment.
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
| | `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 | |
|
|
||
| | Method | Signature | Description | | ||
| |--------|-----------|-------------| | ||
| | `Compile` | `func (c PolicyCompiler) Compile(rec IntentRecord, repo RepositoryContext) ExecutionPolicy` | Compiles an `IntentRecord` and repository context into an execution policy | |
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` |
|
|
||
| Constants (`MaxLockFileSize`) and action pin data are read-only after initialization and are safe for concurrent access. | ||
|
|
||
| ### Additional exported helpers |
This was referenced Aug 1, 2026
Contributor
|
🎉 This pull request is included in a new release. Release: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/intentPolicyCompiler.Compileto the public API documentation.pkg/actionpinsApplyContainerPinMappingto the exported functions list.pkg/consoleFormatCommandMessageStderr,FormatProgressMessageStderr,FormatWarningMessageStderr,FormatErrorStderr).PrintSectionHeaderand spinner model methods (Init,View).pkg/cliGetPermission,SetPermission,GetRepo,SetRepoRoundTrip,WriteHeaderRunGrantOnLockFiles,RunGrypeOnLockFiles,RunSyftOnLockFiles,RunYamllintOnFilespkg/workflowAdd*,NewPermissions*,Set*/Get*, andWorkflowStateBranchName).