feat(cli): Route commands through selected project roots - #116
Conversation
Propagate explicit project and setup roots across CLI commands, validate the selected project even with an explicit setup root, and document the behavior. Signed-off-by: GPT-5.6 Sol <codex@openai.com> Co-Authored-By: GPT-5.6 Sol <codex@openai.com>
ResolveGlobalRoots keeps the logical recovered root for plain projects and uses the canonical physical roots only for linked worktrees. Setup and doctor canonicalize their resolved root so config, hooks, and output paths agree (macOS /var -> /private/var). Doctor accepts hooks whose executable is the running binary (test or renamed artifact) and matches the local-scope MCP project key in either the logical or canonical spelling. The malformed project-gitfile rejection test accepts both the merged gitfile-validation and projectpath messages. Co-Authored-By: Whale integration <whale@local>
RuntimeRoot was untested: cover the plain-project canonical root, the linked-worktree local runtime root, and the cleaned-input fallback when selection fails. Co-Authored-By: Whale integration <whale@local>
JordanCoin
left a comment
There was a problem hiding this comment.
Blocking integration finding: the selected project root is not propagated to config or skills loading in a standard linked worktree. I built this head and reproduced against : it reports no config from the linked worktree, and explicit still does the same. The command-routing tests pass because they do not exercise config.ConfigPath/Load or skills.LoadSkills through a linked worktree. Please route those consumers through the resolved selected/setup root and add an end-to-end linked-worktree test before merge. The current hook migration also does not reconcile duplicate plain legacy Codex registrations; I am handling that separately as a focused fix.
JordanCoin
commented
Aug 12, 2026
Correction with the exact reproduction details omitted by shell formatting in my review: |
JordanCoin
commented
Aug 12, 2026
Maintainer repair pushed at 2d3d89a. This integrates current main, preserves the original project/setup/runtime split, and closes the requested-changes gap by routing ConfigPath and project skill loading through the selected setup root. Added linked-worktree and explicit-setup regression coverage. Local verification passed: go test ./config ./skills ./cmd -count=1; go test ./... -count=1; go test -race ./config ./skills ./cmd -count=1; git diff --check; and a built binary now resolves both config show and the primary project skill from the real Codex linked worktree. |
JordanCoin
left a comment
There was a problem hiding this comment.
Re-reviewed the complete current head 2d3d89a after the maintainer repair. The selected setup root now reaches config and project skill consumers for both automatic linked worktrees and explicit setup roots; current main is integrated; focused, full, race, and real linked-worktree proofs pass; all 12 CI jobs are green. No remaining blocking findings. Approved.
Uh oh!
There was an error while loading. Please reload this page.
What does this PR do?
Propagates explicit project and setup roots across CLI commands and documents their behavior.
Verification
go test ./cmd .Developed with carefully directed, manually reviewed AI assistance.