Repository navigation
test(check): run the valid-root control in its own repository - #4025
Conversation
check_rejects_missing_and_file_roots_without_leaking_the_git_invocation (#3882) ends with a control that runs a bare `ripr check --root <tmp>`. .cargo/config.toml sets TMPDIR to target/, so that temp dir sits inside the checkout running the tests, and the bare check diffs the enclosing branch against its default base. On any branch with more than 2000 changed Rust lines the control fails with diff_scope_oversized, which says nothing about --root validation. Seen on the #3982 stack (4580 lines across 14 files). The control now gives the workspace its own repository and an explicit `--base HEAD`, so it measures only that a valid root is analyzed. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Claimed as canonical test-proof repairI am taking this stale PR forward as the canonical owner of the hermetic valid-root control. Finding-specific comparison confirms #3987 carries the same patch only as an inherited cherry-pick; #4025 is the focused one-file PR and should land first. Plan:
This is test-proof hardening only. It does not close #3880 or claim that all temp-directory tests are hermetic. |
…4025-current-main
EffortlessSteven
left a comment
There was a problem hiding this comment.
Current published-head review — REVIEW_INCOMPLETE
No actionable source, test-oracle, process-policy, or scope findings remain in the candidate review.
reviewed_head_sha: 6404c810fe25154adb0ddcdc76c8d45db02ad4c6
integration_parent: 7547b700c432b03f83f1a24a5d6f316cd1da5414
current_main_observed: ee067207d0c63e494fbb79f06122c1faa800fc3e
claim_boundary: Test-proof hardening only; this control must be independent of the enclosing branch's diff, without changing production root validation or closing #3880.
changed_surfaces_and_semantic_owners_inspected: cli_smoke valid/missing/file root controls; existing fixture_git_ok process owner; current production ensure_command_root behavior; .cargo temp-root configuration; current-main combined relation.
blocking_findings: none
non_blocking_suggestions: Global commit signing or autocrlf configuration is not neutralized, consistent with surrounding fixtures and outside this focused repair; a real old-rustc process-shim is unrelated here.
refuted_or_stale_findings: enclosing-branch dependence — repaired; blanket-pass positive control — refuted; process-policy expansion — refuted; current-main conflict — refuted by clean merge-tree; #3987 ownership — #4025 is canonical.
proof_and_ci_observed: exact-head focused cli_smoke passed; large-diff control passed hardened and failed as intended after reversible removal with diff_scope_oversized at 8,793 Rust lines; fmt/diff, process policy, check-fast, and precommit pass; retained precommit binds head 6404c810 and one changed path.
proof_or_review_missing: exact-head hosted Rust result and hosted review are still in progress; no review threads exist.
affected_currentness_dimensions: test stimulus, test oracle, process owner, integration basis, candidate identity, hosted CI.
residual_assumptions_and_non_claims: no production change; no repository-wide temp-test audit; no closure of #3880.
disposition: REVIEW_INCOMPLETE — waiting exact-head hosted proof and final read-back.
The published head is mergeable with no failures. Merge remains blocked only while the routed Rust and review jobs are in flight.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Review — adopting this stale draft (idle ~12h, gate green)Surface. One test file ( What it pins. The valid-root control runs in its own repository: Stimulus/oracle. The test builds an isolated fixture repo (own Validation. Ripr Rust Small Result: SUCCESS on the current head; base is main and MERGEABLE. Claimed after 12h+ of bot inactivity per the queue-zero sweep rule. Disposition: REVIEW_READY. |
There was a problem hiding this comment.
Decision
- Needs one verification check before upstream.
Verification questions
- Confirm artifact-verifier failed (exit 2) on a tests-only diff; low trust impact since no production/artifact surface changes, but gate should record the witness target explanation.
Refuted
- Hardening expands the process-spawn policy surface.; refuted because: All five git calls go through the existing run_git helper backed by fixture_git_ok; no new process owner is introduced.
- Tautological positive control that always passes on its own repo regardless of --root validation; refuted because: The control still invokes production
ripr check --root <temp> --base HEAD; a broken --root path would fail. Missing-root and file-root negatives in the same test function continue to discriminate early validation and no argv leakage. Reversal test (remove setup + --base HEAD) fails with diff_scope_oversized at 8,793 lines per PR body proof.
Evidence gaps
- Late-evidence cargo-test receipt for cli_smoke has not yet landed at packet time; treating as scheduled-late rather than missing is consistent with always-on base packet policy.
- artifact-verifier exited 2; tests-only diff class with no produced artifacts suggests the verifier target is empty or witness missing.
- artifact-verifier failed with exit code 2 — does this affect trust in a tests-only diff?
- Model proof intent was rejected by deterministic validation.
EffortlessSteven
left a comment
There was a problem hiding this comment.
Exact-head review at 6404c810fe25154adb0ddcdc76c8d45db02ad4c6 (PR state at review time: MERGED, squash 88ef9b2afb169c6083f2e4da4582bd0924fb3392; required check Ripr Rust Small Result = success at this head). This is a post-merge substantive verification of the isolation claim and the surviving discrimination.
Claim verification (checked against head source, not the body)
-
Test isolation — verified. In
crates/ripr/tests/cli_smoke.rs(head,check_rejects_missing_and_file_roots_without_leaking_the_git_invocation, changed block at ~6491-6506), the valid-root control now initializes the temporary workspace as its own repository (run_git(&workspace, ["init"])), configures a local identity, commits the fixture, and runsripr check --root <tmp> --base HEAD. Because--rootis explicit,--base HEADresolves against the temp repository's own HEAD (the initial commit), so the control's result is independent of the enclosing branch's diff — the claimed isolation holds. -
Premise — verified.
.cargo/config.tomlat this head setsTEMP/TMP/TMPDIRto relativetarget, so temp workspaces are created inside the enclosing checkout; the previous bare control could indeed diff the enclosing branch against its default base and fail on branch size rather than exercising explicit-root validation. -
Process ownership — verified.
run_gitis the import aliasuse common::fixture_git::fixture_git_ok as run_git(cli_smoke.rs:18), so all five git operations route through the existing hardened helper (deadline + retry, #3742 Slice 1); no new process-spawn site, matching the PR's check-process-policy claim. Minor wording note (nit, no repair): the body's "through the existing fixture helper" could be misread asinit_git_fixture_repo; what landed is five explicitfixture_git_okcalls, which is what the body's process-owner claim actually says. -
Discrimination after isolation — verified. The missing-root and file-root negatives are unchanged (assert
is not a directory, the offending path named, nocore.quotePath/failed to run gitleak) and both pass--base HEAD. The valid control still fails if valid explicit roots were rejected, so the "not everything is rejected" discriminator survives. Residual (non-blocking, consistent with the PR's own claim boundary): with--base HEADthe basis is empty, so success proves early shared validation plus the Git-backed loader accept the root — it does not assert nonempty analysis of the root's files. The PR's acceptance criterion is exactly this narrower claim, so no repair required. -
Landed identity — verified. Current main carries the isolated control (
cli_smoke.rs:6498test,run_git initat ~6540); no commit after the merge reverted or weakened it; latercli_smoke.rsmerges (#4026, #3956) coexist with it.
Findings
No blocking findings. One non-blocking observation recorded above (empty-basis success semantics), already disclosed by the PR's claim boundary.
Merge readiness
Nothing remains — the PR is merged (squash 88ef9b2a, titled with this PR, landing exactly the reviewed one-file change into main). The duplicate-patch risk from inherited cherry-picks is closed: current main contains one correct copy of the control.
Observed: head source at 6404c810 (cli_smoke.rs test + import alias, common/fixture_git.rs, .cargo/config.toml); check runs at head (required Ripr Rust Small Result success); merge commit 88ef9b2a and current origin/main content of the test.
Reported: exact-head local run of the target test (1 passed), fmt/process-policy/check-fast/precommit pass; the isolated large-diff control experiment (244 paths / 8,795 lines passed; reverted setup failed with diff_scope_oversized); #3987 as an inherited cherry-pick carrier.
Not verified: local test executions and the large-diff control experiment were not rerun in this review.
Disposition: REVIEW_READY
Requested by Steven · project thread
Summary
check_rejects_missing_and_file_roots_without_leaking_the_git_invocationended with a valid-root control that ran bareripr check --root <temp>. Because.cargo/config.tomlplaces temporary directories undertarget/, that control could inspect the enclosing checkout and fail on the running branch's diff size instead of exercising explicit-root validation.The valid control now:
ripr check --root <temp> --base HEAD.Its result is independent of the enclosing branch's diff. Missing-root and file-root discriminators are unchanged.
Swarm / Source Boundary
ripr-swarmSource-of-truth Links
6404c810fe25154adb0ddcdc76c8d45db02ad4c67547b700c432b03f83f1a24a5d6f316cd1da5414ee067207d0c63e494fbb79f06122c1faa800fc3e7547b700c432b03f83f1a24a5d6f316cd1da5414The one-file candidate diff remains conflict-free with current main by read-only merge-tree inspection.
Scope Classification
Production delta:
Evidence/support delta:
HEADtoHEAD.fixture_git_okprocess owner, so no process-policy entry is added.Single acceptance criterion:
Non-goals:
--rootbehavior change.Decisions
TMPDIR; moving process-wide temp state would affect unrelated tests.--base HEAD, not--diff; the control should still exercise the Git-backed loader while owning an empty comparison basis.Support-tier Impact
Policy Impact
No production, generated, dependency, process-spawn, schema, or public-output change.
Proof
Exact-head local evidence
Candidate:
6404c810fe25154adb0ddcdc76c8d45db02ad4c6Retained
precommit-v2.jsonbinds head6404c810..., merge base7547b700..., one committed changed path, and successfulripr/xtaskClippy. Thecheck-fastselector independently reports one changed file.Discriminating control
An isolated large-diff clone used the candidate head as the enclosing default base: 244 changed paths, 62 Rust files, and approximately 8,795 changed Rust lines.
--base HEAD: failed as intended withdiff_scope_oversizedat 8,793 changed Rust lines.The original small-branch failure is therefore branch-size dependent; the hardened control is not. The reported 4,580-line #3982 reproduction remains author evidence; the larger 8,795-line control was independently executed for this head.
Claim Boundary
May claim:
Must not claim:
Rollback
Revert PR #4025's published test commit
ff64e0daf...or its net one-file patch. No persisted state, schema, configuration, or generated artifact is involved.Spec-Test-Code Traceability
crates/ripr/tests/cli_smoke.rs::check_rejects_missing_and_file_roots_without_leaking_the_git_invocationcrates/ripr/tests/common/fixture_git.rs::fixture_git_ok.cargo/config.toml(TEMP,TMP,TMPDIRundertarget/)crates/ripr/src/cli/commands/check.rsandcli::commands_context::ensure_command_rootStatic Language Check
killed,survived,untested,proven, andadequate.CI Economics
n/a
Engineering Check
_Generated with Claude Code
https://claude.ai/code/session_01JR38133FoyEXqWZtnC9UeK