Repository navigation
fix(cli): reject ClawHub-only flags for source skills - #128162
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 23, 2026, 5:19 AM ET / 09:19 UTC. ClawSweeper reviewWhat this changesThe PR rejects ClawHub-only version, pending-scan, and risk-acknowledgement flags before Git or local skill installers run. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open for maintainer acceptance of the intentional CLI compatibility change. The source-dispatch guard is a focused, correct fix for flags that previously had no effect on Git/local installs. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: FAIL (failed) — execution before step 1 Assertions:
How this fits togetherThe skills CLI accepts ClawHub, Git, and local-directory install references through one command. It classifies the reference before handing it to either the ClawHub installer with trust controls or the source installer with local policy controls. flowchart LR
A[Operator command] --> B[Skills install CLI]
B --> C{Reference type}
C --> D[Source flag check]
D -->|Git or local| E[Source installer]
D -->|Unsupported flag| F[Clear exit-1 error]
C -->|ClawHub| G[ClawHub trust installer]
E --> H[Workspace skill]
G --> H
Decision needed
Why: This is a deliberate compatibility change for existing scripts, so code review cannot choose the upgrade policy on maintainers’ behalf. Before merge
Agent review detailsSecurityNone. PR surfaceSource +8, Tests +13. Total +21 across 2 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain one explicit pre-dispatch guard for all three ClawHub-only flags, preserving valid ClawHub installs while preventing a source install from implying trust controls ran. Do we have a high-confidence way to reproduce the issue? Yes—current main’s source branch forwards Git/local installs after checking only --version, while the source installer has no parameters for the two remaining ClawHub controls. This read-only review did not execute the CLI, but the PR supplies parser-boundary regression coverage and reported CLI runs. Is this the best way to solve the issue? Yes—the shared dispatcher is the correct owner because it knows the reference kind before either installer runs; rejecting inside the source installer would be later and would couple it to ClawHub-only CLI controls. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 3cb52f4bb869. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Maintainer decision and land-ready evidence for exact head
All actionable/rank-up evidence is resolved. Proceeding to the mandatory hosted Testbox prepare gate; the later duplicate ClawSweeper shard is rating refresh only and does not supersede the completed exact-head review. |
|
Hosted prepare completed successfully for exact head The native workflow reused the fully green exact-head hosted gate (CI run 32629618354), verified the remote PR tree equals the local prepared tree, required no changelog, and made no head change or rebase. Prepared and PR head remain byte-identical at |
|
Merged via squash.
|
What Problem This Solves
Fixes an issue where users installing a skill from Git or a local directory could pass
--force-installor--acknowledge-clawhub-risk, see the install proceed, and reasonably assume those ClawHub scan/trust controls had taken effect even though the source installer ignored them.Why This Change Was Made
The mixed-source
skills installcommand now classifies all three ClawHub-only options at the existing source-dispatch boundary and rejects them before either installer runs. This extends the command's existing--versionguard rather than adding a second parser path; ClawHub forwarding and source-owned--acknowledge-install-policy-warningbehavior remain unchanged.Production LOC: +10/-2 (net +8) | Tests: +13/-0. The production growth is the explicit parser/trust-boundary capability: identify each ClawHub-only option, preserve Commander casing compatibility for the acknowledgement flag, and return the exact rejected flag before mutation dispatch.
Best-fix verdict: This is the bounded owner-layer fix. Rejecting the flags in the source installer would be too late and would couple that lifecycle to CLI-only options; removing the shared options from the parser would also remove them from valid ClawHub installs.
Provenance: The mixed Git/local and ClawHub command was introduced in #84793, authored and self-merged by @Patrick-Erichsen on 2026-05-21.
--force-installwas later added in #90478, authored and self-merged by @Patrick-Erichsen on 2026-06-05, without extending the source-option rejection.--acknowledge-clawhub-riskwas added in #81364, authored and self-merged by @jesse-merhi on 2026-06-26, with the same omission. No automation merger or automerge trigger was involved in those three landings.User Impact
Git/local skill installs now fail fast with
<flag> is only supported for ClawHub skill installs.when either ClawHub-only trust flag is supplied. Operators no longer receive a successful install after requesting a scan/risk control that did nothing. This intentionally rejects previously accepted-but-ineffective invocations so the command matches its documented trust boundary.Evidence
90 passed, 4 failed.node scripts/run-vitest.mjs src/cli/skills-cli.commands.test.ts src/cli/skills-cli.test.ts→123/123 passed.node scripts/check-changed.mjs -- src/cli/skills-cli.ts src/cli/skills-cli.commands.test.tspassed production/test typechecks, lint, formatting, dead-code, import-cycle, database-first, and repository guards.pnpm buildpassed on the final source.--force-installat exit 1; the built CLI rejected a local install with--acknowledge-clawhub-riskat exit 1. Both emitted the expected flag-specific diagnostic, and neither published a skill under the isolated temporary workspace.Option.attributeName()with kebab-to-camel conversion innode_modules/commander/lib/option.js; a direct parser probe produced{"acknowledgeClawhubRisk":true,"forceInstall":true}and reported the exact option keysacknowledgeClawhubRisk/forceInstall.4bb438cc134b1645ed0a1046b2eb6c45206a3c60, includingopenclaw/ci-gateand all selected core shards.git diff --checkpassed.AI-assisted: yes. I understand and reviewed the command dispatch, installer boundaries, regression coverage, dependency option-key contract, and validation above. No agent transcript is attached.