Skip to content

fix(cli): register graph scan as a subcommand of the graph group (#644)#699

Open
bstevenski-capillary wants to merge 4 commits into
mainfrom
fix/issue-644-graph-scan
Open

fix(cli): register graph scan as a subcommand of the graph group (#644)#699
bstevenski-capillary wants to merge 4 commits into
mainfrom
fix/issue-644-graph-scan

Conversation

@bstevenski-capillary

Copy link
Copy Markdown
Collaborator

Summary

Closes #644.

The root cause was the inverse of the issue's literal framing. scan was wired as a top-level harness scan command — promoted via the barrel generator's EXTRA_TOP_LEVEL_COMMANDS list — while the post-update hook (update.ts), the fallback hints, and the docs all referenced harness graph scan. The graph command group only registered status and export. As a result:

  • harness graph scan .error: unknown command 'scan' (the exact error reported)
  • harness scan → still resolved (top-level), which is why the reporter saw it "succeed" — not a stale binary, just the misplaced registration

Changes

  • Wiring: removed graph/scan.ts from EXTRA_TOP_LEVEL_COMMANDS in scripts/generate-barrel-exports.mjs and regenerated _registry.ts, so harness scan is no longer a top-level command and the fix survives barrel regeneration.
  • Command: registered scan as a subcommand of the graph group in graph/index.ts.
  • Consistency: updated all user-facing harness scan hints to harness graph scan across CLI command messages, MCP tools, dashboard gather modules, the core review checklist, and the current docs/guides/*.md. Regenerated docs/reference/cli-commands.md. Left untouched: harness scan-config (a different, real command), historical docs/changes/**, and the ADR.
  • Tests/changeset: graph.test.ts now asserts scan is a graph subcommand; updated the impact-preview assertion string; added a changeset (cli/core/dashboard patch).

Verification

  • harness graph --help lists scan; harness scan now returns unknown command 'scan'
  • cli/core/dashboard typecheck clean; graph + impact-preview + traceability tests pass; full MCP suite passes
  • Full pre-push gate (format check, typecheck, test:coverage across all packages, coverage ratchet, docs freshness) passed

 #644)

The scan command was promoted to a top-level `harness scan` command via the
barrel generator's EXTRA_TOP_LEVEL_COMMANDS list, while the post-update hook,
fallback hints, and docs all referenced `harness graph scan`. As a result
`harness graph scan` failed with 'unknown command scan' while the stale
top-level `harness scan` still resolved — exactly the confusion reported.

- Remove graph/scan.ts from EXTRA_TOP_LEVEL_COMMANDS and regenerate _registry
- Add scan as a subcommand of the graph group in graph/index.ts
- Update all user-facing 'harness scan' hints to 'harness graph scan' across
  CLI messages, MCP tools, dashboard gather modules, core checklist, and guides
- Update graph + impact-preview tests for the new wiring/strings

Note: local pre-commit arch check fails on pre-existing baseline drift on main
(module-size 54340->167219 etc.) in files untouched here; verified identical on
pristine main with these changes stashed. Baseline is bot-refreshed post-merge.
# Conflicts:
#	docs/reference/cli-commands.md
#	packages/cli/src/commands/graph/index.ts
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.

harness update: post-update graph scan uses stale scan command instead of graph scan

1 participant