Skip to content

Document missing exported APIs across package specs (stringutil, typeutil, constants, console, linters)#32626

Closed
Copilot wants to merge 3 commits into
mainfrom
copilot/specification-audit-undocumented-exports
Closed

Document missing exported APIs across package specs (stringutil, typeutil, constants, console, linters)#32626
Copilot wants to merge 3 commits into
mainfrom
copilot/specification-audit-undocumented-exports

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 16, 2026

The spec audit found API drift: 5 pkg/* READMEs were missing documentation for currently exported symbols. This PR updates package specifications to align documented public APIs with actual exports.

  • pkg/stringutil

    • Added missing API docs for:
      • NormalizeLeadingWhitespace
      • FormatList
      • SanitizeOptions
      • SanitizeName
    • Extended sanitization and general utilities sections with concise behavior descriptions.
  • pkg/typeutil

    • Added missing lookup helper docs for:
      • LookupMap
      • LookupString
      • LookupStringPath
    • Updated function-selection guidance to include typed nested map/string lookup patterns.
  • pkg/constants

    • Added missing minimum-version constraint entries for:
      • AWFDockerHostPathPrefixMinVersion
      • AWFTokenSteeringMinVersion
  • pkg/console

    • Added missing exported API coverage for:
      • BannerStyle (exported style var)
      • SpinnerWrapper (exported spinner type + method surface)
  • pkg/linters

    • Added osexitinlibrary subpackage to the documented analyzer set.
    • Included osexitinlibrary.Analyzer in usage/docs to match the exported linter API.

Example of the newly documented API surface in specs:

// pkg/typeutil
m2, ok := typeutil.LookupMap(cfg, "tools")
name, ok := typeutil.LookupStringPath(cfg, "tools", "github", "mode")

Copilot AI and others added 2 commits May 16, 2026 14:18
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/37a6aa45-525e-43b4-a3e6-943c56c968b4

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/37a6aa45-525e-43b4-a3e6-943c56c968b4

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix undocumented exports in package specifications Document missing exported APIs across package specs (stringutil, typeutil, constants, console, linters) May 16, 2026
Copilot AI requested a review from gh-aw-bot May 16, 2026 14:23
@pelikhan pelikhan marked this pull request as ready for review May 16, 2026 14:28
Copilot AI review requested due to automatic review settings May 16, 2026 14:28
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates multiple pkg/* package specifications (READMEs) to eliminate spec drift by documenting currently-exported public APIs that were previously missing from the package docs.

Changes:

  • Added documentation for missing exported helpers in pkg/typeutil (LookupMap, LookupString, LookupStringPath) and pkg/stringutil (FormatList, NormalizeLeadingWhitespace, SanitizeOptions, SanitizeName).
  • Expanded specs for pkg/linters, pkg/constants, and pkg/console to include newly identified exported symbols/subpackages (e.g., osexitinlibrary, new min-version constants, BannerStyle, SpinnerWrapper).
Show a summary per file
File Description
pkg/typeutil/README.md Documents exported nested-map/string lookup helpers and adds selection guidance.
pkg/stringutil/README.md Documents additional exported string helpers and sanitization types/functions.
pkg/linters/README.md Adds osexitinlibrary to the documented analyzer set and usage example.
pkg/constants/README.md Adds missing minimum-version constraint constants to the spec list.
pkg/console/README.md Expands the documented public API surface to include BannerStyle and SpinnerWrapper.

Copilot's findings

Tip

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

Comments suppressed due to low confidence (1)

pkg/console/README.md:813

  • This section documents BannerStyle without mentioning that it’s not part of the js/wasm build (see pkg/console/banner.go vs pkg/console/banner_wasm.go). Please clarify the build target(s) where BannerStyle is available so the spec matches the conditional API surface.
### `BannerStyle`

`BannerStyle` is the exported Lip Gloss style used by `FormatBanner` for consistent banner rendering.

  • Files reviewed: 5/5 changed files
  • Comments generated: 1

Comment thread pkg/console/README.md
| `FormatError` | func | Renders a structured `CompilerError` with context |
| `FormatErrorChain` | func | Renders a wrapped-error chain |
| `FormatErrorWithSuggestions` | func | Error message with actionable suggestions |
| `BannerStyle` | var | Reusable Lip Gloss style used for rendering the ASCII `gh aw` banner |
@pelikhan
Copy link
Copy Markdown
Collaborator

@copilot review all comments

@pelikhan pelikhan closed this May 16, 2026
Copilot stopped work on behalf of pelikhan due to an error May 16, 2026 14:40
Copilot AI requested a review from pelikhan May 16, 2026 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Specification Audit — 2026-05-16 — 5 packages with undocumented exports

4 participants