Skip to content

fix: Help-Dump Emit Aliases - #44

Merged
sahil-noon merged 3 commits into
mainfrom
260718-zb77-help-dump-emit-aliases
Jul 18, 2026
Merged

sahil-noon merged 3 commits into
mainfrom
260718-zb77-help-dump-emit-aliases

Conversation

@sahil-noon

Copy link
Copy Markdown
Collaborator

Meta

Change ID Type Confidence Plan Review
zb77 fix 4.7/5.0 5/5 tasks, 12/12 acceptance ✓ ✓ 1 cycle
Impact +/− Net
raw +453 / −14 +439
true +140 / −3 +137
└ impl +9 / −0 +9
└ tests +131 / −3 +128

excludes fab/, docs/ · generated by fab-kit v2.16.0

Pipeline: intake ✓ → apply ✓ → review ✓ → hydrate ✓ → ship → review-pr

Summary

wt help-dump only emitted each cobra command's canonical name, so alias forms (ls, new, rm) were invisible in the structured help/wt.json tree. This caused shll.ai's README-drift checker to flag these legitimate, working alias invocations as unknown commands.

Changes

  • HelpNode gains an optional aliases field (omitempty), placed alongside name
  • buildNode copies cmd.Aliases into each node — list/create/delete now carry ["ls"]/["new"]/["rm"]; all other nodes remain byte-identical
  • Extended test coverage in helpdump_test.go and help_dump_test.go pinning the new field's presence/absence

sahil87 added 2 commits July 18, 2026 17:37
Adds an optional aliases field to HelpNode (omitempty) so ls/new/rm
surface alongside list/create/delete in the structured help/wt.json
tree, fixing shll.ai's README-drift checker false positives.
@sahil-noon
sahil-noon marked this pull request as ready for review July 18, 2026 12:12
@sahil-noon
sahil-noon requested a review from Copilot July 18, 2026 12:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds first-class Cobra alias visibility to the wt help-dump structured output so downstream consumers (e.g., shll.ai’s README drift checker) can recognize alias-form invocations (ls, new, rm) as valid commands.

Changes:

  • Extend HelpNode with an optional aliases field (omitempty) and populate it from cmd.Aliases.
  • Add unit and command-level tests that pin both alias presence and omitempty absence behavior at the raw JSON level.
  • Update the in-repo help-dump contract memory doc and record the fab change plan/intake/status artifacts.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/internal/worktree/helpdump.go Emit Cobra command aliases in the structured help-dump node output via an optional aliases field.
src/internal/worktree/helpdump_test.go Add coverage that verifies alias list correctness and omitempty key absence/presence in marshaled JSON.
src/cmd/wt/help_dump_test.go Add end-to-end validation that wt help-dump output includes aliases for known aliased commands and omits the key elsewhere.
docs/memory/wt-cli/help-dump-contract.md Update the documented help-dump contract to include the optional aliases node field and current command inventory.
fab/changes/260718-zb77-help-dump-emit-aliases/plan.md Capture requirements, tasks, and acceptance criteria for the change.
fab/changes/260718-zb77-help-dump-emit-aliases/intake.md Record intake findings and rationale for choosing an optional aliases field approach.
fab/changes/260718-zb77-help-dump-emit-aliases/.status.yaml Track change status and metrics for the fab pipeline.
fab/changes/260718-zb77-help-dump-emit-aliases/.history.jsonl Record fab stage transitions and commands executed for traceability.

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

@sahil-noon
sahil-noon merged commit fa8cf89 into main Jul 18, 2026
2 checks passed
@sahil-noon
sahil-noon deleted the 260718-zb77-help-dump-emit-aliases branch July 18, 2026 12:58
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.

3 participants