Repository navigation
test(xtask): pin first-run --install-published CARGO_HOME isolation - #7115
Conversation
Extract the timed cargo-install spec so a unit test can reject an install child that inherits the caller Cargo home. Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. Summary by CodeRabbit
WalkthroughThe published-install setup now uses a specification for its working directory, locked Cargo arguments, isolated ChangesPublished Install Setup
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Other · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to No merge-blocking issue is evident from the supplied change context; the PR is mergeable after normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
A rabbit checks the Cargo trail, Comment |
EffortlessSteven
left a comment
There was a problem hiding this comment.
Author self-review on exact head 691b70b8a10ad5924d64a520d79cf7759fd7a22c (GitHub cannot REQUEST_CHANGES from the author; this COMMENT is the disposition record, not approval).
reviewed_head_sha: 691b70b8a10ad5924d64a520d79cf7759fd7a22c
integration_basis: origin/main c483d202ba83a38a38365f75dde3bd5188448be9
claim_boundary: pin that --install-published times cargo install with CARGO_HOME under --out; isolation itself landed in #6787. Hosted compare-and-baseline stays #5983.
changed_surfaces_and_semantic_owners_inspected: xtask/src/first_run.rs only. Owner is the first-run walk. Consumer is run() → timed_with_envs → capture_output_in_dir_with_envs (xtask/src/run.rs, unread for edit; env overlay is command.env, no env_remove for RUSTUP_HOME/PATH).
blocking_findings: none for source/oracle.
non_blocking_suggestions: none that belong in this PR.
refuted_or_stale_findings: none yet (no bot threads on this head).
proof_and_ci_observed:
- red: deleting the
CARGO_HOMEentry frompublished_install_specfailed the new test withinstall child has no CARGO_HOME override(compiled; unusedcargo_homewas a warning only) - green:
cargo test -p xtask --bin xtask first_run23 passed;cargo xtask precommitexit 0;cargo xtask check-fast1 file / 10 gates - hosted checks: not yet observed on this Ready transition
proof_or_review_missing: required hosted checks and Ripr Rust Small Result on this SHA; no independent reviewer yet
affected_currentness_dimensions: production implementation (extract only), test stimulus, test oracle, public claim (PR body), candidate head identity
residual_assumptions_and_non_claims: - the test binds
published_install_spec, whichrun()currently calls; it does not inspect a spawned cargo process - emptiness is
prepare_out_dirleaving<out>/cargo-homeabsent, not a wipe inside the helper - does not measure a hosted cold install or commit a baseline
disposition:REVIEW_INCOMPLETEuntil exact-head hosted checks exist; source/oracle inspection found no blocker. Re-enter after Ready CI forREVIEW_READY/ merge convergence.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 691b70b8a1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Drive the isolation test through run() and record timed_with_envs arguments so dropping the env slice fails the proof. Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
EffortlessSteven
left a comment
There was a problem hiding this comment.
Author self-review on exact head 7b546e932eda69bf76287edd284ac4c1ca05ad99 (COMMENT is the disposition record, not approval).
reviewed_head_sha: 7b546e932eda69bf76287edd284ac4c1ca05ad99
integration_basis: origin/main c483d202ba83a38a38365f75dde3bd5188448be9
claim_boundary: pin that run() forwards CARGO_HOME under --out into timed_with_envs for --install-published. Isolation itself landed in #6787. Hosted compare-and-baseline stays #5983.
changed_surfaces_and_semantic_owners_inspected: xtask/src/first_run.rs only (published_install_spec, run(), test-only timed_with_envs intercept). xtask/src/run.rs unread for edit.
blocking_findings: none for source/oracle after the Codex P1 repair.
non_blocking_suggestions: none in this PR.
refuted_or_stale_findings: Codex P1 accepted and repaired; reply on the thread; thread resolved (PRRT_kwDOSiSx0c6qIt_s).
proof_and_ci_observed:
- red:
run()passing&[]intotimed_with_envsfailed withinstall child has no CARGO_HOME override - green:
cargo test -p xtask --bin xtask first_run23 passed; clippy-D warningspass;cargo xtask precommitexit 0 - hosted checks: not yet observed on this Ready re-toggle
proof_or_review_missing: required hosted checks and Ripr Rust Small Result on this SHA
affected_currentness_dimensions: test stimulus, test oracle, candidate head identity (repair after first review)
residual_assumptions_and_non_claims: - intercept records
timed_with_envsargs and short-circuits before spawned cargo - emptiness is
prepare_out_dirleaving<out>/cargo-homeabsent - does not measure a hosted cold install or commit a baseline
disposition:REVIEW_INCOMPLETEuntil exact-head hosted checks exist; source/oracle inspection found no blocker. Re-enter after Ready CI forREVIEW_READY/ merge convergence.
|
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 one verification check before upstream.
Verification questions
- Confirm cargo-home absence assertion depends on prepare_out_dir having just replaced --out.
Refuted
- Box::from(slice) allocation-failure paths could regress in the new code; refuted because: Diff is a behavior-preserving extract plus test-only intercept; no Box::from(slice) or equivalent allocation-failure-sensitive code added. Objection not raised by diff or thread.
- Asserting cargo_home.exists()==false proves cold-install isolation; refuted because: Assertion runs after run() returns but before any real cargo process is spawned (intercept short-circuits); it verifies prepare_out_dir wiped --out, not that cargo observed an absent home at process spawn.
Parked follow-ups
- Sensor ripr failed (exit 2); cargo-test scheduled late. PR is test/extract only; isolated runtime cargo behavior is not in scope.
Hosted required-check diagnosis (not this claim)
This file is not in this PR. Reproduced on exact github-actions verification questionConfirmed: |
…o-home-proof-f7c4 Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
|
Integration-basis update only: merged That inherited required-check failure was reproduced on exact former base Head is now |
|
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.
Author self-review on exact head 1b9ec7a0ee5704b6a21a8c9d237e0151919e4bed (COMMENT is the disposition record, not approval).
reviewed_head_sha: 1b9ec7a0ee5704b6a21a8c9d237e0151919e4bed
integration_basis: origin/main 2c634e517f146727683c2c09e75f5e11e05133f7 (#7112 merged into this branch so the inherited hostile_repos --committed pin is on the tree; PR still diffs only xtask/src/first_run.rs)
claim_boundary: pin that run() forwards CARGO_HOME under --out into timed_with_envs for --install-published. Isolation itself landed in #6787. Hosted compare-and-baseline stays #5983.
changed_surfaces_and_semantic_owners_inspected: xtask/src/first_run.rs only (published_install_spec, run(), test-only timed_with_envs intercept). Consumer capture_output_in_dir_with_envs in xtask/src/run.rs overlays command.env and does not env_remove RUSTUP_HOME/PATH; unread for edit (#6815).
blocking_findings: none for source/oracle.
non_blocking_suggestions: none in this PR.
refuted_or_stale_findings: Codex P1 repaired on 7b546e932 and thread PRRT_kwDOSiSx0c6qIt_s resolved. github-actions cargo-home absence question answered: !exists() is prepare_out_dir, not a helper wipe. Gemini quota is missing review, not a finding. CodeRabbit docstring-coverage warning is out of scope for this extract/test pin.
proof_and_ci_observed:
- red: deleting
CARGO_HOMEfrom the spec, andrun()passing&[]intotimed_with_envs, both failinstall child has no CARGO_HOME override - green on this SHA:
cargo test -p xtask --bin xtask first_run23 passed;cargo xtask precommitexit 0 - hosted:
Ripr Rust Small on GitHub Hosted / Rust gatesin progress on run 37706954296;Ripr Rust Small Resultnot completed yet
proof_or_review_missing: required hosted check conclusion on this SHA
affected_currentness_dimensions: integration basis (merge of #7112); production/test/oracle unchanged since7b546e932
residual_assumptions_and_non_claims: - intercept records
timed_with_envsargs and short-circuits before spawned cargo - emptiness is
prepare_out_dirleaving<out>/cargo-homeabsent - does not measure a hosted cold install or commit a baseline
disposition:REVIEW_INCOMPLETEuntil exact-headRipr Rust Small Resultsucceeds; source/oracle inspection found no blocker. Re-enter forREVIEW_READY/ merge convergence after that check.
There was a problem hiding this comment.
Refuted
- Box::from(slice) allocation-failure paths could regress in the new code; refuted because: Not in scope; diff is behavior-preserving extract plus test-only intercept; no Box::from(slice) or Vec::with_capacity-style allocation added to production. Objection was raised in seeded thread and refuted.
- Asserting cargo_home.exists()==false proves cold-install isolation; refuted because: Assertion runs after run() but before any real cargo spawn; it verifies prepare_out_dir wiped --out, not that cargo observed an absent home at process spawn. Author reply + claim boundary already state this limit; red-first demonstration passes &[] at the production call site, which is the claim's acceptance criterion.
- The helper extraction duplicates the literal env/cwd/args shape enough to drift from the production call site and silently lose the CARGO_HOME pin.; refuted because: The single production call site (line 232) is the only consumer; spec.envs() round-trips the same key/value. The new test asserts install.envs == spec.env_pairs() exactly, so any drift in helper shape is caught. No second caller exists.
Parked follow-ups
- Intercept short-circuits before spawning cargo; assertion !cargo_home.exists() verifies prepare_out_dir wipe, not a real process env.
- ripr sensor failed (exit 2); cargo-test scheduled late. Test/extract-only PR; runtime cargo behavior is out of scope.
Evidence gaps
- ripr sensor failed (exit 2); cargo-test scheduled late. Test/extract-only PR; runtime cargo behavior is out of scope.
|
Independent verification for merge convergence (driving lane's self-review stands as the inspection record). reviewed_head_sha: 1b9ec7a Independently read the full diff vs current origin/main (only the CARGO_HOME spec + intercept test; caught_by/verdict_reading already on main). Mutation grip confirmed by driving lane (CARGO_HOME removal and &[] passthrough both red). No new findings. disposition: REVIEW_READY |
Closes #6803.
Isolation already shipped in #6787 (
d52764d3). This PR adds the missing proof that the timed--install-publishedinstall child receives an isolated Cargo home. Hosted cold-install measurement and the baseline commit remain #5983.Summary
Before:
run()setCARGO_HOME=<out>/cargo-homeforcargo install ripr --locked, but nothing pinned that env. Deleting the entry, or passing&[]at thetimed_with_envscall site, would still compile and the walk would inherit the caller cache.After:
published_install_specis the install-step specrun()uses (cwd = temp dir; argsinstall ripr --locked --root <out>/install-root; envCARGO_HOME=<out>/cargo-home). A unit test callsrun(["--install-published", "--out", ...])and records thetimed_with_envsarguments so dropping environment forwarding fails.RUSTUP_HOMEandPATHare not overridden.The helper names
<out>/cargo-home; it does not mkdir or empty it.run()callsprepare_out_dirfirst, so the path is absent when cargo starts. The test asserts that absence rather than inventing a second wipe. The test intercept is infirst_run.rsonly;xtask/src/run.rsis unchanged.Swarm / Source Boundary
ripr-swarmSource-of-truth Links
Governing issue or accepted claim: #6803 (follow-up proof for #6787; parent metric/baseline remains #5983)
Acceptance delta: a unit test fails if
run()launches the install child without aCARGO_HOMEoverride under--out.Candidate Relationships
Candidate branch:
cursor/first-run-cargo-home-proof-f7c4Stack parent or prerequisite PR: none
Proposed replacement of PR: none
Scope
One helper extraction, a test-only launch intercept, and one unit test in
xtask/src/first_run.rs.Scope Classification
Production delta: behavior-preserving extract of the existing
--install-publishedinstall-step spec. Env, cwd, args, and--rootare unchanged. Productiontimed_with_envsstill callscapture_output_in_dir_with_envs.Evidence/support delta:
first_run::tests::the_published_install_child_gets_an_isolated_cargo_home_under_out.Single acceptance criterion: passing
&[]instead of the spec env slice intotimed_with_envsfromrun()makes the new test fail.Non-goals:
xtask/src/run.rs(#6815), scan_proc / #5461 / #5470, #5359,crates/ripr/src/output/gate/tests.rs(#6725),crates/ripr/src/agent/loop_commands.rs,xtask/src/reports/operator.rs,xtask/src/tests.rs(#7072), workflows,scoreboards.toml, hosted baseline (#5983), #6811/#7095, #6832/#6834.Support-tier Impact
Policy Impact
Red-first evidence
CARGO_HOMEentry frompublished_install_spec(restored): FAILinstall child has no CARGO_HOME override.run()passing&[]intotimed_with_envs(restored; unusedenvswas a warning only): FAILinstall child has no CARGO_HOME override.Both compiled; neither was a compile-error stand-in.
Proof
cargo test -p xtask --bin xtask first_run cargo clippy -p xtask --all-targets -- -D warnings cargo xtask precommitOn claim head
7b546e932eda69bf76287edd284ac4c1ca05ad99:cargo test -p xtask --bin xtask first_run: 23 passed, 0 failedcargo clippy -p xtask --all-targets -- -D warnings: passcargo xtask precommit: exit 0On published head
1b9ec7a0ee5704b6a21a8c9d237e0151919e4bed(merge oforigin/main2c634e517/ #7112;first_run.rsunchanged):cargo test -p xtask --bin xtask first_run: 23 passed, 0 failedcargo xtask precommit: exit 0Integration basis includes the already-landed inherited
hostile_repos--committedpin. That file is not this claim; the PR still diffs onlyxtask/src/first_run.rsagainst current main.Hosted required checks own merge. Re-toggled Draft → Ready on this head so Ripr Rust Small Result can run.
Claim Boundary
May claim:
run()forwardsCARGO_HOMEunder--outintotimed_with_envsfor--install-published, and a unit test notices if that slice is dropped.Must not claim: runtime mutation results; that cargo-home is wiped by the helper itself; that a hosted cold install was measured; that a baseline is committed; that a spawned
cargoprocess environment was inspected; thatxtask/src/run.rswas changed.Rollback
Revert the PR. Isolation behavior remains as shipped in #6787; only the helper extract, intercept, and pin are lost.
Spec-Test-Code Traceability
xtask/src/first_run.rs::tests::the_published_install_child_gets_an_isolated_cargo_home_under_outxtask/src/first_run.rs::published_install_specandrun()→timed_with_envsStatic Language Check
killed,survived,untested,proven, andadequate.CI Economics
n/a (no workflow or lane change)
Engineering Check
panic,unwrap,expect,todo, orunimplementedin production code.panic,unwrap,expect,todo, orunimplementedin tests.Exact candidate SHA:
1b9ec7a0ee5704b6a21a8c9d237e0151919e4bed