Repository navigation
test(windows): legal metacharacter root; native capture-hint paths; JSON-escaped gap start (#9272) - #10109
Conversation
…ative capture-hint paths (#9272) hostile_repos: Windows forbids | in a file name, so mkdir failed before ripr ran. The Windows root keeps $(), backtick, ; and & and adds the cmd.exe metacharacters ^, % and !, with mkdir as the injected command. task_first_facade: the printed root uses / separators on Windows, so the raw --root substring did not match. The test now splits the printed command with the shared host-aware splitter and compares the root as a path. cli::commands tests: the capture hint's redirect operand keeps the native path spelling (#8240), but two tests expected the display_path form, which uses / on Windows. They now expect shell_arg of the native path. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsF3ov6sfWbX4wmQd5EWeZ
|
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 22 minutes. View limit details
Comment |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- The changelog and PR body overstate the Windows fixture as a legal filename without evidence that Windows accepted it; the failed ripr sensor adds unresolved diagnostic risk.
Verification questions
- Confirm the Windows hostile-root fixture does not make every injected metacharacter create the PWNED marker, weakening the claimed execution oracle.
- Confirm the Windows hostile-root filename contains characters whose legality is asserted but not demonstrated;
%and!are not cmd.exe command substitutions, and%CD%expands as a variable rather than executing a command. - Confirm the continue-command test now parses words but does not establish that each parsed argument is uniquely attributable to its option; a root value beginning with an option-like token could make the
--rootlookup consume the wrong word.
Refuted
- The changed capture-hint assertions might require a production-code update.; refuted because: The diff is confined to test expectations and uses the existing shell_arg helper; it changes no production rendering route.
- The hostile-root fixture weakens the existing security test on Windows.; refuted because: The Windows branch preserves multiple shell metacharacters and the marker-based execution check, replacing only the illegal | character and touch with mkdir.
- Changing from substring matching to decoded word matching weakens verification of the resumed attempt.; refuted because: The revised assertion still requires the command prefix, an equal path-valued root, and the final
--attempttoken to equal the original attempt ID.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
- Windows execution and the scheduled late cargo-test receipt are needed to close the remaining platform-specific validation gap; the seeded PR claims Windows CI proof, but that receipt is not present here.
- Windows execution and the scheduled cargo-test receipt are not present in the supplied packet, so full cross-platform and suite proof remains unavailable to this lane.
…nventory (#9272) On Windows shell_arg double-quotes HEAD~1 (~ is outside the bare set), and the JSON inventory writes those quotes as \", so the raw substring check missed. The test now JSON-escapes the expected command before matching. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsF3ov6sfWbX4wmQd5EWeZ
Windows advisory shards on this PRI dispatched
The shard jobs still fail on rows outside this PR's quoting cluster. They also fail on main: they match the #9272 hand-off and the previous control run. The rows are doctor create-denial ×3, cache_clear_safety different_cwd, cli_smoke check_from_a_package_source_dir / check_from_a_subcrate / pr_evidence_with_missing_artifacts, trybuild_fixture_disclosure ×2, cli_progress worktree scope, decision_helpers path scan, the facade Generated by Claude Code |
Required check red: not this PR's
This PR touches no corpus file. The same test fails on current main 5d7229f, where it reports 135 vs 143. The parallel corpus-measurement merges (#10117, #10105 and others) moved the blessed missed credit past the committed ceiling in Fixing it means either raising a ratchet ceiling or repairing the rows, and that call belongs to the corpus owners, so I'm not porting a number into this test-only PR. No fix PR exists yet. I've raised the break with the coordinator. Once main has the fix, I'll merge main into this branch and re-request CI. Generated by Claude Code |
Review of recordHeads: 9ea8243 (independent review) and a6406b7 (adds one more test-only fix of the same kind) Angles
Findings
Evidence
Merge waits on main's ceiling fix, then a base merge and a green required check. Generated by Claude Code |
|
Dependency handoff for the existing owner: the main-branch ceiling blocker reported above is resolved. Verified main is The accepted #10133 tree Please resume the already-planned owner integration from accepted main, review the actual successor head/composition, then use one existing supported required-qualification campaign if none has already been admitted. Retain the five-case Windows evidence in 6390903796 and the bounded review dispositions in 6390974455; recheck affected integration changes rather than repeating unrelated advisory failures. At handoff, head remains |
There was a problem hiding this comment.
Decision
- Needs verification checks before upstream.
Verification questions
- Confirm the continue-command oracle finds the first --root token and does not reject duplicate, option-like, or misplaced root arguments; the comment claims host decoding, but not strict option uniqueness.
- Confirm the continue-command assertion finds the first --root token and compares its following word to the root path, but does not prove that the option/value pair is the intended one if the printed command contains repeated or option-like root values.
Refuted
- The capture-hint expectations may have required a production output change.; refuted because: The diff changes only test expectations and uses the existing shell_arg helper; production rendering remains unchanged.
- The hostile Windows fixture would make every injected metacharacter create PWNED, weakening the execution oracle.; refuted because: The test still requires PWNED to be absent in each checked location, so an injected command creating the marker fails the test rather than being accepted as a valid oracle.
- The hostile Windows fixture may no longer provide a meaningful execution oracle because the metacharacters differ from the Unix fixture.; refuted because: The Windows name remains legal under the stated NTFS restrictions and retains command-injection syntax plus a marker-producing mkdir command; the test still runs check and pilot and checks marker absence. Seeded Windows shard evidence reports the test passed on Windows. The difference is localized to platform-legal fixture construction.
- The Windows root fixture may be illegal, and
%CD%/!CD!are not command substitutions.; refuted because: Those expansions are supplementary injection syntax rather than the claimed substitutions; the legal-name check,mkdirinjections, and marker oracle address the relevant execution risk.
Parked follow-ups
- Windows proof covers the five in-scope rows, while unrelated shard failures also occur on main and are outside this PR's accepted scope.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
|
|
…-c75u2c # Conflicts: # crates/ripr/tests/task_first_facade.rs
Integration update (head adf0891)I merged main into this branch, and one hunk conflicted: the task_first_facade continue-command assertion. #10161 (ea24da4) already fixed that row upstream with The remaining delta is four rows: the hostile_repos metacharacter root, the two cli::commands capture hints, and the gap-bound agent-status inventory. That's 4 files and +40/−7, and none of them overlap with #10161. The Windows evidence for these rows still holds: shards 40141192565 passed all of them, and their code is unchanged since then. On adf0891, the focused tests pass locally (3 lib + hostile_repos + main's facade test) and Generated by Claude Code |
There was a problem hiding this comment.
Decision
- Needs verification checks before upstream.
Verification questions
- Confirm the Windows hostile fixture claims command execution but
%CD%and!CD!are variable expansions, not command substitutions;mkdir PWNEDalso conflicts with the oracle's existing-marker invariant. - Confirm the changelog describes the hostile root as using a legal filename, but the diff does not demonstrate that Windows accepts the complete name.
- Confirm the Windows hostile-root name is legal because it omits reserved Windows filename characters, but the diff and seeded evidence do not directly demonstrate execution of the intended injected command.
Refuted
- Changing capture-hint expectations might require a production rendering update.; refuted because: The producer already uses shell_arg for redirect operands; this patch only makes the expectations match that existing producer route and changes no production code.
- The changed capture-hint assertions might require a production-code update.; refuted because: The diff is test-only, and all three expectations construct the native redirect operand with the existing shell_arg helper used by the producer; production output is unchanged.
- Changing expectations to shell_arg(native path) requires a production rendering change.; refuted because: The diff is test-only and constructs the same shell_arg form used by the existing producer; the relevant Windows tests passed without a production delta.
Evidence gaps
- The ripr sensor failure leaves unresolved diagnostic risk, while the seeded focused and Windows test receipts cover the changed rows but not a complete current-head suite.
- Model proof intent was rejected by deterministic validation.
|
Independent delivery-evidence reconciliation, 2026-10-25 05:36 UTC. Subject: head Observed new completed evidence: Rust gates job 121074021417 succeeded, including policy, all-target/all-feature checks, strict Clippy, doctests, golden/fixture contracts and corpora. Its actual checkout was Native receipt reuse: directly inspected Windows shard 1 and shard 3: checkout Argument identity has existing runtime coverage too: Windows paste job 121073897458 checked out the same b0ea85b merge and passed 11 tests, pasting 119 distinct printed commands across bash, pwsh and powershell. The harness uses argv recorders, checks cross-shell argument equality and fixture-root resolution, and detects canary/foreign-directory writes. This is shell/argv evidence, not execution of every recorded product operation or cmd.exe qualification. Source dispositions: snapshot_capture_hint already quotes the native path as a single operand. The gap-status test checks the raw semantic recovery command and excludes seam-id routes before checking its JSON-escaped inventory spelling. The historical parsed-first---root concern is superseded: task_first_facade.rs is byte-identical to the comparison base; main's product_root_spelling assertion wins. The Windows hostile test exercises check and pilot and rejects PWNED in three locations; %CD%/!CD! are expansion hazards, not separate marker-producing execution claims. The native PASS closes filename-legality uncertainty without claiming every metacharacter independently creates a marker. No actionable source finding emitted. Frozen later main Next owner action: reconcile these terminal receipts and the existing review dispositions in the final delivery judgment; refresh the stale five-row/printed_words PR-body description when convenient. Windows Advisory 40161516543 was still in progress when inspected; no whole-Windows-suite pass, protection satisfaction, REVIEW_READY transition, merge, or landing acceptance is claimed. Supplementary CLI run enumeration returned Forbidden and was stopped without retry; the cited connected job/log reads succeeded. No branch edits, local experiments, hosted dispatches or transition actions were performed. |
Final review of record (head adf0891)
Disposition: REVIEW_READY. Squash-merging with expected head adf0891. Generated by Claude Code |
Summary
This fixes four Windows test failures from the #9272 quoting cluster (control run 39864899332). In every case the test expected the wrong form. Production output is unchanged.
hostile_repos::shell_metacharacter_root_name_does_not_execute|in a file name, so creating the fixture failed (os error 123) before ripr ran.$(), backtick,;and&, adds the cmd.exe metacharacters^,%and!, and injectsmkdir PWNED, which the existing marker check detects. The Unix name is unchanged.cli::commands::tests::outcome_command_reports_read_failures,calibrate_missing_inputs_name_the_caller_capture_commanddisplay_pathform, which uses/on Windows.shell_argof the native path, matching the producer and the sibling spaced-path test.app::agent_status::tests::gap_bound_attempt_status_recovers_with_a_gap_start_not_a_seam_idshell_arg("HEAD~1")prints"HEAD~1"(~is outside the bare set), and the JSON inventory escapes those quotes as\", so the raw substring check missed. Found on the shard run of this PR's first head.The facade
repeated_repair_resumes…row from the same run was fixed upstream by #10161, so this PR took main's version of that file at the merge. The threecli_smoke agent_status_*rows in the same run were already fixed by #9776. That run's head (c0ff013) predates it.Swarm / Source Boundary
ripr-swarmSource-of-truth Links
Proposal: n/a
Spec: n/a
ADR: n/a
Plan item: #9272
Governing issue or accepted claim: #9272
Acceptance delta (one sentence): The four Windows quoting-cluster rows (hostile_repos metacharacter root, two cli::commands capture hints, and the gap-bound agent-status inventory) assert what the Windows host actually prints.
Candidate Relationships
Candidate branch (GitHub PR head is authoritative after publication): claude/project-thread-c75u2c
Stack parent or prerequisite PR (if any): none
Proposed replacement of PR (if any; not yet accepted): none
Acceptance retained from a replaced candidate (if any): n/a
Accepted winner and losing candidate disposition (when decided): n/a
Scope
app::agent_statusunit test,crates/ripr/tests/hostile_repos.rs, thecli::commandsunit tests, and a changelog fragment.Scope Classification
Production delta: none.
Single acceptance criterion:
Non-goals:
Support-tier Impact
Policy Impact
Proof
Windows proof: shard run 40137035587 on 9ea8243 passed the first four tests on Windows (shards 1 to 3). The gap-bound fix gets its own shard run on a6406b7.
Claim Boundary
Rollback
Spec-Test-Code Traceability
Static Language Check
killed,survived,untested,proven, andadequate.CI Economics
n/a
Engineering Check
panic,unwrap,expect,todo, orunimplementedin production code.panic,unwrap,expect,todo, orunimplementedin tests.Generated by Claude Code