fix(cli): keep root flags aligned - #4053
Conversation
|
Signed CI census review — GJC, 2026-08-09 Disposition: cancelled plan run plus superseded history; bounded hold. Dev CI run Smallest repair lane: rebase |
Yeachan-Heo
left a comment
There was a problem hiding this comment.
REQUEST_CHANGES
Red-team review of exact head 7cfc2dc1c9af65f5ff32e248ada4ae134eb982dc against live dev 95c00d09e7f68fc39469c185a4019385f331676b found blocking root-CLI regressions:
-wfeature/demoand-w=feature/demoare accepted byparseLaunchWorktreeModebut rejected by the new exact-token check inpackages/coding-agent/src/cli/args.ts; add full launch-route coverage.--worktree -- --modle @prompt.mdconsumes--inparseLaunchWorktreeMode, so the second parser rejects a literal prompt after worktree preparation. Preserve the delimiter.- Retired
--extension,--hook,-e,--skills, and related flags are silently ignored; e.g.--extension /tmp/policy.jsturns the path into a prompt. Fail explicitly rather than silently changing execution semantics. --does not protect root--help/--versionfast paths orgjc launch -- --help; stop fast-path scans at the delimiter.--worktreeis advertised as optional-value behavior but its shared string descriptor renders/generates a required argument.
The PR is also behind live dev (merge base 4474e3f8; current dev is not an ancestor). Its only required check is failing at Affected path validation / Fail closed on producer and live dependency results; I am not attributing that red result to this PR until it is rebased and CI reruns. Linked issue #4023 remains open, so its closure claim is not yet satisfied.
Focused parity/completion tests pass locally (9/9). Broader CLI tests are blocked by the review worktree's missing/mismatched native addon, not counted as PR failures.
— GJC red-team review
7cfc2dc to
095a8bb
Compare
|
OWNER_CONFIRMATION_REQUIRED Maintainer repair published to the permitted PR branch at Local verification: 29 focused CLI/root-flag/completion/worktree tests passed; Biome check passed. Package typecheck is blocked by pre-existing missing generated — GJC red-team review |
095a8bb to
4a1ece1
Compare
|
REQUEST_CHANGES Fresh red-team QA on repaired head
Also fix the help/completion drift for value-optional — GJC red-team review |
4a1ece1 to
8ddaf7e
Compare
|
REQUEST_CHANGES Final red-team review of — GJC red-team review |
8ddaf7e to
00a6c58
Compare
|
BOUNDED_OWNER_HOLD — exact-head review completed for The implementation diff and parser/worktree/completion contracts were inspected; the prior root-routing findings are addressed at this SHA. Automated review history contains no unaddressed automated line comments. The head descends from its recorded PR base This is not MERGE_READY / LGTM against live Local mutation-teeth were not run because — |
00a6c58 to
3ac8e4b
Compare
Yeachan-Heo
left a comment
There was a problem hiding this comment.
Signed exact-head adversarial review — GJC, 2026-08-09
REQUEST_CHANGES for 3e1ee8b6e20a1f25d36733a6cbd876c8eed73500.
P1 — compact -w launch routing remains broken when a root fast flag follows the compact worktree token. rootFlagDescriptor() in packages/coding-agent/src/cli.ts:224-230 recognizes only an exact short token (-w); it does not recognize parser-accepted -wfoo or -w=foo. Consequently hasRootFastFlag() at :254-261 does not consume the compact token/value. Because runCli() evaluates root help/version at :467-480 before default-launch/worktree routing, gjc -wfeature/demo help renders root help instead of launching the feature/demo worktree with prompt help; gjc -w=feature/demo --version similarly takes the root version fast path. This reopens the historical combined-worktree-token launch-routing blocker.
cli-root-flags.test.ts currently proves parseArgs() and parseLaunchWorktreeMode() separately, but not this pre-routing runCli() behavior. Extend the shared fast scanner to consume both compact forms parser/worktree routing accepts and add invocation-level help/version regression coverage.
The delimiter preservation, retired extension/hook/skills rejection, help/version delimiter boundary, and optional-value completion/help descriptor changes were inspected and are present. GitHub reports this exact head CLEAN/MERGEABLE with 22 successful and no pending/failed checks. Current dev #4103 overlaps only packages/coding-agent/CHANGELOG.md and merges cleanly; that does not repair this defect.
Contributor sj0618 has read permission and the head is an external fork. Per external-PR policy, no contributor-branch mutation was made from this review; repair and re-review are required on a new exact head.
a0a0447 to
c220442
Compare
Yeachan-Heo
left a comment
There was a problem hiding this comment.
Signed exact-head review — GJC, 2026-08-09
MERGE_READY for c2204426828093003382d1a180537e69e46bf569.
The compact worktree repair is rebased on current dev a5f8f34d1d54bb0537856cccb354eaefd9fd25b2. The shared root fast-path scanner now treats exactly the selector forms accepted by launch worktree routing (--worktree, -w, --worktree=…, -w=…, and -w…) as a launch boundary. This prevents root help/version from preempting compact worktree routing without consuming unrelated short flags.
Invocation-level coverage verifies both compact forms through launch help and command version behavior, preserves a literal delimiter into worktree validation, and retains root version behavior for an unrelated short flag. The prior exact-head blockers remain addressed: compact forms, delimiter preservation, retired extension/hook/skills rejection, delimiter-aware help/version, and optional-value help/completion parity.
Exact-head Dev CI 31327820051 is terminal: 22 successful checks, 0 failures/pending; five platform/deployment checks are intentionally skipped. It includes CLI command-surface/root-flag/worktree/completion/utils tests, coding-agent check/type build, CLI smoke, install methods, native build, Darwin tab-worker smoke, virtual integration, evidence aggregation, and state gates. No automated review comments were posted for this head. GitHub reports CLEAN and mergeable.
External contributor branch repair was limited to the permitted maintainer-modifiable PR branch. No merge was performed from this session.
Share root launch flag metadata across help and completion, expose the working fork/worktree flags, hide retired flags, and fail closed on unknown options.\n\nAdds a parity test that exercises every advertised flag against its runtime parser.\n\nFixes Yeachan-Heo#4023
Compact -w selectors bypassed the shared help/version scanner, so an invocation could skip worktree setup and execute a root fast path instead. Treat every worktree selector accepted by launch routing as a fast-path boundary and cover compact help/version, delimiter, and unrelated short-flag cases. Lore-id: issue-4023-compact-worktree-fast-path Constraint: preserve root fast paths for unrelated short options Confidence: high Scope-risk: narrow Reversibility: easy Tested: git diff --check Not-tested: focused suite blocked by a local pi_natives version mismatch
c220442 to
8c0858f
Compare
Yeachan-Heo
left a comment
There was a problem hiding this comment.
Signed exact-base refresh review — GJC, 2026-08-09
MERGE_READY for 8c0858faecebbad1f01b831646e164b7b0a3ff78.
This is the existing maintainer-modifiable external branch, rebased without source conflict onto current dev 2e8965065a56d692b7401357e9ad26dd39a724c1 (#4110). The #4110 GC changes have no source-path overlap with the root CLI implementation or its invocation tests. Remote ancestry is proven; GitHub reports this exact head CLEAN and mergeable.
The compact -w/-w= fast-path repair and all prior #4023 contracts remain intact. Exact-head Dev CI 31329534863 is terminal: 22 successful checks, 0 failures/pending, and 5 intentional platform/deployment skips. It includes CLI command-surface/root-flag/worktree/completion/utils coverage, coding-agent check/type build, CLI smoke, install methods, native build, Darwin tab-worker smoke, virtual integration, evidence aggregation, and state gates. No automated line comments or final-head review findings remain.
No duplicate PR or merge was created from this session.
Summary
--forkand--worktreeflags while removing retired extension/skill flags--preserving dash-prefixed prompt textVerification
bun --cwd=packages/coding-agent run checkupstream/devFixes #4023