fix(cli): describe exact leaf command paths - #36
Open
rrrrrredy wants to merge 1 commit into
Open
Conversation
Resolve two-segment command describe requests through the root registry so human and JSON output identify the exact registered leaf without invoking its capability. Unknown leaves and longer paths now fail instead of falling back to parent metadata. Implements QoderAI#33 using docs/specs/2026-07-31-33-describe-leaf-command-paths.md. Focused CLI and frozen-contract tests passed; broader Windows failures were limited to baseline EBUSY and EPERM host behavior. Co-authored-by: Codex (GPT 5.6 Sol) <codex@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
command describenow resolves the complete registered command path. Describinga leaf returns that leaf's canonical path and metadata without executing its
capability.
Why
instead of silently receiving metadata for its parent.
Traceability and Scope
docs/specs/2026-07-31-33-describe-leaf-command-paths.mdscripts/better-harness-cli/registry.mjsandscripts/better-harness-cli/cli.mjscapability-owned scripts, and global option parsing
Change Type
Test and Review Evidence
node --test --test-concurrency=1 test/better-harness-cli.test.mjs test/scripts-refactor-contract.test.mjsnode scripts/doc-link-graph/cli.mjs skills/better-harnessnode --test test/doc-link-graph.test.mjsnpm run pack:verifynode --testEBUSYcleanup orEPERMsymlink host errorsorigin/mainEBUSY/EPERMfailure classes; no changed CLI assertion failedgit diff --checkManual or visual evidence:
command describe harness render --jsonreturnsname: "render",path: ["harness", "render"], and the registered render script.Command: harness render.UNKNOWN_SUBCOMMAND; third path segments returnINVALID_COMMAND_PATH.Risk and Recovery
unchanged; leaf JSON gains an additive canonical
pathfield.boundary change; the frozen root-help fixture and changelog are updated.
description behavior.
privileges unavailable on this host; CI remains the cross-platform gate.
AI Involvement
focused, full, documentation, and package validation results before submission.
Checklist
AGENTS.md,CONTRIBUTING.md, and the relevant canonical-owner guidance.CHANGELOG.md.