Repository navigation
fix(cli): use flag terminator constant - #84438
humanbeingz-7 wants to merge 3 commits into
Conversation
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: this PR is a correct duplicate candidate for the same CLI parser bug, and the remaining landing path is the newer open proof-backed PR at #89897. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Land #89897 as the canonical fix, optionally folding in this PR's invocation-level coverage if maintainers want that extra caller test. So I’m closing this here and keeping the remaining discussion on #89897. Review detailsBest possible solution: Land #89897 as the canonical fix, optionally folding in this PR's invocation-level coverage if maintainers want that extra caller test. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection on current main and Is this the best way to solve the issue? No for this branch as the landing path. The production fix is the right one, but #89897 now owns the same remaining work as an open proof-backed canonical PR. Security review: Security review cleared: The diff only changes local CLI argv parsing and tests, with no dependency, workflow, package, permission, secret, download, or supply-chain surface. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against 96c8338d5bfa. |
|
ClawSweeper PR egg ✨ Hatched: 🥚 common Velvet Clawlet Hatch commandComment Hatchability rules:
Rarity: 🥚 common. What is this egg doing here?
|
34c7da4 to
e5fb651
Compare
e5fb651 to
eaaea01
Compare
|
Heads up: this PR needs to be updated against current |
|
🦞✅ Reason: structured ClawSweeper close marker: close-required (sha=c6134e422bb741833e304b70b3330ac7fed4d032) Closed:
|
Summary
--comparison in command path parsing withFLAG_TERMINATORFixes #83902
Test plan
corepack pnpm exec vitest run src/cli/argv.test.ts src/cli/argv-invocation.test.ts --config vitest.config.tscorepack pnpm exec oxfmt --check src/cli/argv.ts src/cli/argv.test.ts src/cli/argv-invocation.test.tsgit diff --checkReal behavior proof
behavior: CLI argv command-path resolution stops at the shared
FLAG_TERMINATOR. Tokens after the terminator are ignored, sostatus -- ignored --helpresolves as thestatuscommand and does not treat the trailing--helpas root help.environment: Real local OpenClaw checkout at
/Users/abz/.openclaw/workspace/openclaw, branchfix/issue-83902, commiteaaea01644, Node.js22.22.1, pnpm via Corepack, macOS Darwin arm64.steps:
FLAG_TERMINATORbetween the command and extra tokens.statuscommand path and did not classify the invocation as root help.evidence:
observedResult: The resolver returned
commandPath: ["status"],primary: "status", andisRootHelpInvocation: false. That proves the after-terminatorignoredand--helptokens did not change command routing.notTested: I did not run a packaged/installable OpenClaw binary with a modified non-
--FLAG_TERMINATOR; the current shipped terminator is--. This PR covers the source-level bug by using the shared constant in implementation and exercising that constant through focused local runtime proof plus regression tests.