Skip to content

Regenerate .surface from Go walker with ARG and alias support#366

Merged
jeremy merged 2 commits intomainfrom
fix-surface-snapshot-mcp
Mar 24, 2026
Merged

Regenerate .surface from Go walker with ARG and alias support#366
jeremy merged 2 commits intomainfrom
fix-surface-snapshot-mcp

Conversation

@jeremy
Copy link
Member

@jeremy jeremy commented Mar 24, 2026

Summary

  • Bumps github.com/basecamp/cli to v0.2.1, which extends the surface package to emit ARG entries (positional arguments parsed from cmd.Use) and walk alias command paths alongside primary names
  • Regenerates .surface from the Go walker — now the authoritative source for TestSurfaceSnapshot — with full ARG + alias coverage
  • Net -615 lines vs main: removes 612 --version flags and 2 hidden --assignee flags (see details below)

What's preserved

  • 413 ARG entries (positional argument contract)
  • 296 alias CMD paths (e.g., basecamp account, basecamp campfire)
  • All CMD/FLAG/SUB entries

What's removed (-615 lines)

  • 612 --version flags on subcommands: The shell script (check-cli-surface.sh:45) merges root flags into every subcommand via $ROOT_FLAGS, but Cobra adds --version as a root-local flag (not persistent). The Go walker correctly omits it from subcommands. Exact parity with the shell script except for this known over-propagation bug; no other diff remained.
  • 2 --assignee flags on recordings: These were hidden flags (MarkHidden) present in main's .surface baseline (from the shell-script regeneration). The Go walker correctly excludes hidden flags. These do not appear in the current shell-script output either — they were artifacts of an earlier generation.

Test plan

  • TestSurfaceSnapshot passes without -update-surface
  • Diff against shell-script output verified: only the 612 --version entries differ (shell script has them, Go walker correctly omits them)
  • make test — all pass
  • scripts/check-skill-drift.sh — passes

Copilot AI review requested due to automatic review settings March 24, 2026 16:42
Copy link

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.

Copilot wasn't able to review any files in this pull request.


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

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b7e9b2b258

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

The previous commit (f1c15cf) regenerated .surface using the shell
script, which produces ARG entries and uses IsAvailableCommand() to
filter commands. The Go test (TestSurfaceSnapshot) uses the surface
package walker which only produces CMD/FLAG/SUB entries and filters
by Hidden. This divergence caused the test to fail.

Regenerate from the Go walker — the authoritative source for CI.
@jeremy jeremy force-pushed the fix-surface-snapshot-mcp branch from b7e9b2b to 4ca600f Compare March 24, 2026 17:02
Bump github.com/basecamp/cli to v0.2.1 which adds:
- ARG entries: positional arguments parsed from cmd.Use strings
- Alias paths: CMD/FLAG/SUB/ARG trees under each alias name
- Cobra lazy flag init: --help appears on all commands

This brings the Go walker to full parity with the shell script,
minus 614 entries the script incorrectly included:
- 612 --version flags on subcommands (Cobra adds --version as a
  local flag on root, not persistent — shell script propagated it)
- 2 hidden --assignee flags on recordings (hidden flags are not
  public surface)
Copilot AI review requested due to automatic review settings March 24, 2026 18:36
@github-actions github-actions bot added the deps label Mar 24, 2026
Copy link

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

Copilot reviewed 1 out of 3 changed files in this pull request and generated 1 comment.


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

@jeremy jeremy changed the title Regenerate .surface from Go walker, add basecamp mcp Regenerate .surface from Go walker with ARG and alias support Mar 24, 2026
@jeremy jeremy merged commit 9a227ea into main Mar 24, 2026
31 checks passed
@jeremy jeremy deleted the fix-surface-snapshot-mcp branch March 24, 2026 19:07
jeremy added a commit that referenced this pull request Mar 25, 2026
The .surface regeneration with alias support added 332 CMD entries for
aliases that the smoke suite didn't account for. Add smoke_aliases.bats
with group-level OOS markers that propagate to all leaf descendants,
and add a chat show test to smoke_campfire.bats.
jeremy added a commit that referenced this pull request Mar 25, 2026
* Close smoke coverage gap from .surface alias expansion (#366)

The .surface regeneration with alias support added 332 CMD entries for
aliases that the smoke suite didn't account for. Add smoke_aliases.bats
with group-level OOS markers that propagate to all leaf descendants,
and add a chat show test to smoke_campfire.bats.

* Move chat show to OOS — alias for chat line (ExactArgs(1))

chat show is an alias for chat line which requires a positional ID arg.
Mark it OOS since chat line is already tested.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants