Skip to content

[spec-librarian] Specification Audit — 2026-11-13 — 5 issues found #77454

Done

Description

@github-actions

📚 Package Specification Audit Report

Date: 2026-11-13
Total Packages: 154 production package directories under pkg/ (excluding testdata)
Packages with Specs: 51 with their own README, plus 103 pkg/linters/* analyzers and 7 pkg/linters/internal/* helpers covered by parent specs (161 documented)
Coverage: 100% under the repository's package-documentation policy


Coverage Summary

Status Area Spec Location Notes
✅ 51 packages with own README pkg/<name>/README.md No missing non-linter package specs
✅ 103 pkg/linters/<analyzer> pkg/linters/README.md Named in the Subpackages table and rule catalog
✅ 7 pkg/linters/internal/* pkg/linters/internal/README.md Covered by the collective table

🚨 Missing Specifications

None. Every production package is documented under the policy.


⚠️ Stale Specifications

None. The largest spec-to-source gap is 7 days (pkg/constants, pkg/fileutil), well inside the 30-day freshness threshold.


🔄 Spec-to-Implementation Mismatches (confirmed)

View mismatches (4 phantom APIs and 1 field drift)

Phantom APIs documented but absent from source

  • pkg/scanfindings/README.md lines 31–32 document Sort and CountAtLeast. Neither exists as a non-test function. pkg/scanfindings/spec_test.go already has a SPEC_MISMATCH note near line 150.
  • pkg/workflow/README.md (~line 503) documents SanitizeIdentifier. Only stringutil.SanitizeIdentifierName (pkg/stringutil/sanitize.go) exists.
  • pkg/intent/README.md line 79 documents ResolveRisk. The only reference in source is a comment in pkg/intent/resolver.go line 44. pkg/intent/spec_test.go line 13 has a SPEC_MISMATCH note.

Recommendation: Remove the phantom entries from the READMEs, or implement the functions if they are intended.

Field drift

  • pkg/actionpins/README.md line 56 says ApplyContainerPinMapping applies PinContext.Mappings. The code (pkg/actionpins/mappings.go lines 83–94) uses ctx.ContainerMappings (types.go line 102). Mappings (types.go line 94) applies to action refs.

Recommendation: Change the README to reference ContainerMappings.


🧪 Stale or Unverified SPEC_MISMATCH Markers

View marker review (2 items)
  • pkg/semverutil/spec_test.go (~line 271): The marker is confirmed. pkg/semverutil/README.md line 109 says invalid input is returned unchanged, but NormalizeGitDescribeSemver (semverutil.go line 135) calls EnsureVPrefix first, so not-a-version becomes vnot-a-version. Either the README or the code needs to change.
  • pkg/console/spec_test.go (line 89): The marker is stale. The README (line 177) says omitempty omits zero values, and render.go (lines 108–128) does omit them. The marker should be removed.

📊 Undocumented Exported Symbols (heuristic)

View undocumented-symbol counts (337 total)

Counted by whole-word matching exported func and type names against each README. These are approximate.

Package Undocumented exports
pkg/cli 99
pkg/workflow 68
pkg/connectors 48
pkg/workqueue 35
pkg/workflow/actions 20
pkg/workflow/lint 19
pkg/workflow/taint 14
pkg/workflow/aw 11
pkg/workflow/actionslanguageservice 11
pkg/parser 4
pkg/console 2
pkg/workflow/codemod 2
pkg/workflow/gradershell 2
pkg/fileutil 1
pkg/scanfindings 1

📋 Quality Assessment

Status Packages
⚠️ Needs Attention pkg/scanfindings, pkg/intent, pkg/actionpins, pkg/semverutil (confirmed mismatches)
⚠️ Needs Attention pkg/cli, pkg/workflow, pkg/connectors, pkg/workqueue (large undocumented export sets)
✅ Good Remaining packages

Action Items

  • Remove or implement phantom APIs: scanfindings.Sort, scanfindings.CountAtLeast, workflow.SanitizeIdentifier, intent.ResolveRisk
  • Correct actionpins README to reference ContainerMappings instead of Mappings
  • Resolve the semverutil invalid-input contract (README vs NormalizeGitDescribeSemver behavior)
  • Remove the stale console SPEC_MISMATCH marker (pkg/console/spec_test.go:89)
  • Document the undocumented exported symbols in pkg/cli, pkg/workflow, pkg/connectors, pkg/workqueue
  • When opening a fix PR for this issue, include Closes #<this issue number> (or Fixes/Resolves) in the PR description.

Test execution was blocked in this sandbox by TLS errors fetching modules from the Go proxy, so this audit is static. Re-run the spec tests in CI to confirm the marker results.

📚 Specification review by Package Specification Librarian · copilot · routed: haiku55 xhigh · ~8 AIC · ⌖ ~2 AIC · ⊞ 6.5K · ◷

  • expires on Nov 16, 2026, 5:29 AM UTC-08:00

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions