Repository navigation
fix(cli): refuse a mistyped --root in reports ci-packet and feedback (#14222) - #14322
Conversation
…14222) reports ci-packet and feedback export created a missing --root as a new directory tree and exited 0; feedback record shared the unvalidated root. All three now go through the shared ensure_command_root validator. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016EQRViKVcCRPKXpZ4nm2UY
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 55 minutes. View limit details
|
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
EffortlessSteven
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY
Source review of head 92837d3eb6b52c0fee78ad782fc8f1a450ceebd6.
Inspected
- Complete diff (4 files):
reports ci-packet,feedback exportandfeedback recordnow call the existing sharedensure_command_rootright after option parsing and before the output-containment check. No second validator, and no decision moved into a renderer or helper. - Consumers: a valid directory root takes the same path as before, so existing output and goldens are unchanged. A missing or non-directory root now exits 2 with the shared message before anything is created.
- Test stimulus and oracle: the real binary is run with a missing nested root and a file root for all three commands, asserting exit 2, the exact shared message, that the missing path was not created, and that the file is untouched. A revert makes
ci-packetandexportexit 0 and create the tree, so the test cannot pass by accident. - Scope limit, stated in the PR: five other commands also accept a bad
--root; they stay on #14222 for a follow-up rather than widening this change.
Not established here
cargo test -p ripr --libcannot build in the 16 GB cloud container; the hosted shards cover it. The focused real-binary tests passed locally.- Hosted qualification of this head is not run yet; this review requests it.
Generated by Claude Code
|
Generated by Claude Code |
EffortlessSteven
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY
Source review of head 92837d3eb6b52c0fee78ad782fc8f1a450ceebd6, refreshed after the Devin thread was answered and resolved.
- Complete diff inspected:
reports ci-packet,feedback exportandfeedback recordcall the existing sharedensure_command_rootright after option parsing, before the output-containment check. No second validator. - A valid directory root takes the same path as before, so output and goldens are unchanged; a missing or non-directory root exits 2 with the shared message before anything is created.
- The real-binary test covers a missing nested root and a file root for all three commands and asserts exit 2, the shared message, that nothing was created, and that the file is untouched.
- Scope: five other commands also accept a bad
--root; they stay on #14222 for a follow-up. - Local limit: the lib-test binary cannot be built in the 16 GB cloud container, so hosted shards cover it. Hosted qualification of this head is requested by this review.
Generated by Claude Code
ripr static exposure checkCommit Took 50s. |
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY
Final pass on head 92837d3eb6b52c0fee78ad782fc8f1a450ceebd6.
- Source: the earlier complete-diff review stands. The three commands call the existing shared
ensure_command_root; no second validator; the real-binary test covers a missing and a file root for all three commands. - Exact-head hosted evidence inspected:
Ripr Rust Small Resultsucceeded at 12:13Z on this head, as did the hosted Rust small job behind it. The latest run of every other check on this head is green exceptcargo-deny, which is the repository-wide RUSTSEC-2026-0486 advisory (red onmaintoo, not required, owned by the rustix bump in #14240). - Review threads: the one Devin thread has a source-backed reply and is resolved. No other review or comment is open.
- Not claimed: the other five commands that accept a bad
--rootstay on #14222.
Generated by Claude Code
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016EQRViKVcCRPKXpZ4nm2UY
|
Conflict reproduction (2026-11-12): |
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY
Review of head 1aefb564c503bc1f9d4a891c1b0717cd5b5ff133. This head merges main f6cd8bd into the previously reviewed head 92837d3. The only textual overlap was cli_smoke.rs, where both sides appended independent tests; both blocks are kept and no production file changed in the merge. The mistyped-root test passes on this head locally. Hosted qualification of this head is still to run.
Generated by Claude Code
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016EQRViKVcCRPKXpZ4nm2UY
EffortlessSteven
left a comment
There was a problem hiding this comment.
REVIEW_READY
Review of head fa2a4a10a33335784a579c28ff43c2d1945fbfaa. Relative to the previously reviewed merge head 1aefb56 this removes one stray blank line in cli_smoke.rs that the formatting preflight flagged; no code changed. The earlier review of the mistyped-root change stands.
Generated by Claude Code
|
Independent reconciliation follow-up: the source owner has advanced this PR to The isolated reconciliation I tested has identical production files and identical test bodies; comparison with the published head shows only relocation of the unchanged 52-line The existing source owner retains qualification and queue convergence. No duplicate hosted run or queue mutation was initiated by this pass. |
|
Exact published-head independent verification completed on
This supersedes the prior comment's limitation that runtime evidence was only from the equivalent isolated merge tree. It remains focused Linux evidence, not a full-suite or merge-group result. No queue operation or duplicate hosted run was initiated; the existing owner retains convergence. |
EffortlessSteven
left a comment
There was a problem hiding this comment.
SOURCE_REVIEW_READY
VERDICT: APPROVE fa2a4a1
Static review of the root-validation fix at this head.
Change. ensure_command_root is now called before any write in reports ci-packet, feedback record, and feedback export. It is the same shared validator ripr check uses.
Checks performed.
- Placement is ahead of side effects:
ci_packet()validates immediately after parsing and beforeensure_report_output_contained/packet steps;run_recordandrun_exportvalidate immediately after parsing and beforeensure_report_output_contained/the app call. - The fix is load-bearing:
reconcile_rootonly reconciles repeated--rootvalues and never checks existence or directory-ness. - Error surface matches the test: a missing path or a non-directory yields
"<command> root <path> is not a directory; pass the directory that contains the workspace ...";main.rsmapsErrto exit 2. - The integration test drives the real CLI for all three commands against both a missing nested path and a file path, asserts exit 2, the expected message, and that nothing was created or modified.
- Parsing prerequisites the test relies on are real:
--snapshotand--reason useful_actionableare accepted, and--rootis accepted byreports ci-packet.
Non-blocking note. The missing-path case is a nested path whose first component does not exist (scratch/nope/deep). A missing single leaf under an existing directory is not a separate case in the test; the old code also created that leaf, so the regression coverage would be marginally stronger with it. Not blocking.
Not checked: no build or test run; this is static source plus test-shape reading.
Requested by Steven Zimmerman · project thread
Summary
reports ci-packetandfeedback exportcreated a missing--rootas a new directory tree and exited 0;feedback recordshared the unvalidated root.ensure_command_root(the owner behindripr checksince ux(cli): an explicit check --root that is not a directory returns git's argv instead of naming the path #3880/fix(cli): validate an explicit check --root instead of handing back git's argv (#3880) #3882), so a missing path or a file path exits 2 and nothing is created.Swarm / Source Boundary
ripr-swarmSource-of-truth Links
Governing issue or accepted claim: #14222
Acceptance delta (one sentence): a mistyped
--rootis refused by the shared root validator in these three commands instead of being created.Candidate Relationships
Candidate branch:
claude/fuzz-command-root-14222Stack parent or prerequisite PR (if any): none (independent of #14137 and #14221)
Scope
--rootvalidation in three commands.Production delta:
cli/commands/ci_packet.rs,cli/commands/feedback.rs: callensure_command_rootright after option parsing, before the output-containment check.Evidence/support delta:
mistyped_root_is_refused_and_not_created(missing and file roots, three commands, asserts exit 2, the shared message, and that nothing was created).14222-mistyped-root-refused.md.Single acceptance criterion: a missing or non-directory
--rootexits 2 with the shared message and creates nothing.Non-goals:
policy readiness,policy waiver-aging,pr-comments plan,reports indexandreports ci-summaryalso accept a bad--roottoday; they are listed on #14222 and left for a follow-up so this stays one reviewable change.Proof
Skipped:
cargo test -p ripr --libcannot build in the cloud container (OOM); hosted shards prove it.Claim Boundary
May claim: these three commands refuse a bad explicit
--root. Must not claim: all rooted commands are covered.Rollback
Revert the commit; no schema, config or workflow change.
Static Language Check
killed,survived,untested,proven, andadequate.CI Economics
n/a
Generated by Claude Code