fix(cli): short-circuit leaf command help - #46
Conversation
Route registered terminal paths containing a help flag to canonical help before runtime dispatch. This prevents invalid preceding arguments from triggering runtime work. Fixes QoderAI#37. Spec: docs/specs/2026-07-31-37-leaf-command-help.md Test: node --test test/better-harness-cli.test.mjs; npm run pack:verify Co-authored-by: Codex (GPT 5.6 Sol) <codex@openai.com>
|
Thanks for taking this on, and especially for adding a traceable spec and inventory-driven coverage. The centralized dispatch change is a useful direction. I tested the exact current head,
Suggested next steps:
Thanks again for the contribution—the dispatcher routing is a solid foundation, but the leaf-owner and test-boundary gaps need to be closed for the issue contract to be satisfied. |
Complete the QoderAI#37 help contract by preserving discovery commands, restricting help normalization to explicit flags, and returning early from every remaining runtime owner. The inventory test now verifies exact owner dispatch, canonical help output, and blocked side effects from an isolated non-Git directory. Spec: docs/specs/2026-07-31-37-leaf-command-help.md Test: node --test test/better-harness-cli.test.mjs; node --test test/doc-link-graph.test.mjs; npm run pack:verify Co-authored-by: Codex (GPT 5.6 Sol) <codex@openai.com>
|
Addressed in
Validation:
The new CI run is awaiting maintainer approval. |
Merge upstream/main through 76cb732 into PR QoderAI#47. Preserve both the leaf-command help side-effect guards from QoderAI#46 and the delegated machine-failure contract coverage from this branch. Test: node --test test/better-harness-cli.test.mjs; node --test --test-name-pattern=record-fix-output test/task-loop-report.test.mjs; node --test test/scripts-refactor-contract.test.mjs; node --test test/doc-link-graph.test.mjs; npm run pack:verify Co-authored-by: Codex (GPT 5.6 Sol) <codex@openai.com>
Summary
Complete side-effect-free
--helpand-hhandling for every registered leaf command.Why
Traceability and Scope
docs/specs/2026-07-31-37-leaf-command-help.mdcloc;dependency-governance;harness checkup;core-change-watchhelp handlersChange Type
Test and Review Evidence
node --test test/better-harness-cli.test.mjsnode --test test/doc-link-graph.test.mjsnpm run pack:verifynpm testThe inventory test runs every registered terminal path from an isolated non-Git directory, compares canonical help output, verifies exact owner dispatch, and activates filesystem, stdin, process/Git, and network canaries.
Risk and Recovery
AI Involvement