Repository navigation
test(harness): explicit re-bless opt-in, staged spawn binaries, #3742 learnings - #3760
Conversation
…learnings #3742 classes (a) and (e), no production changes. - Shared fixture_rebless_enabled() helper (crate::testing::rebless): only RIPR_UPDATE_FIXTURES=1 rewrites; bare presence asserts. Adopted at both is_ok() sites (gate assert_repo_fixture, review_comments assert_text_fixture). The crate forbids unsafe_code and set_var is unsafe in edition 2024, so the leak simulation runs through the ambient environment (RIPR_UPDATE_FIXTURES= cargo test ... gate_rebless), observed red pre-repair (silent Ok rewrite) and green post-repair in bare, opt-in, and unset modes. - eval_sweep_refresh tests stage a private binary copy under the test temp root (staged_ripr_binary, copy retry + fail-closed) and pass it as --ripr-bin at all five call sites, so a concurrent cargo relink of target/debug can no longer break spawns mid-run. - docs/LEARNINGS.md gains the #3742 five-mechanism write-up with file:line evidence and the per-slice resolution map.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
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 reachedNext included review available in 38 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (6)
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 |
There was a problem hiding this comment.
Decision
- Needs reviewer attention before upstream: findings remain.
Confirmed findings
- Module boundary choice (testing::rebless inside the ripr crate vs xtask-level helper) is acceptable here because both call sites live in the same crate's #[cfg(test)] modules, but worth noting that any future fixture-pin test outside ripr crate would need its own copy or promotion to xtask/testing.
- Meta-class coverage for env-triggered re-bless is bounded to the two patched call sites plus the new rebless.rs helper; a repo-wide guarantee that no future test introduces another
is_ok()-style bare-env rewrite was not established.
Verification questions
- Confirm no sibling env-triggered re-bless or env-var-as-bool test gate was proven absent across the full repo; bounded scan within changed surfaces found none, but a parallel fork in tests/common/, xtask fixtures, or a future doctest could reintroduce the leak.
Refuted
- Bare leaked
RIPR_UPDATE_FIXTUREScould silently re-bless fixtures because env reads normalize empty values to truthy; refuted because: The newrebless_enabled_forpredicate usesvalue.is_some_and(\|v\| v == FIXTURE_REBLESS_OPT_IN)withOPT_IN="1";Some("")returns false, matching the in-file unit test assertion!rebless_enabled_for(Some("")). Noset_varmutation path exists in thisunsafe_code-forbidden crate. - No resizable-buffer / ArrayBuffer / TypedArray / detach / transfer mechanics exist in this Rust test+docs PR; ub-active-view surface is empty by construction.
- Diff has no JS worker/transfer/detach surfaces; the crate is Rust with #![forbid(unsafe_code)], so lane-specific JS-memory-crossing risks do not apply.
- staged_ripr_binary enables path traversal or arbitrary-file-write via a crafted source path; refuted because: source originates from built_ripr_binary (CARGO_BIN_EXE_ripr / target/debug/) under test control; staged destination is
root.join("ripr-under-test<EXE_SUFFIX>")— a fixed basename under the test temp root asserted via starts_with in the unit test; no user-controlled segment is joined; copy retry is bounded and fails closed with no live-path fallback.
Evidence gaps
- Model proof intent was rejected by deterministic validation.
- artifact-verifier failed (exit 2) but this lane cannot determine whether the failure is unrelated to memory-safety; treat as missing-evidence for build/cargo side, defer to other lanes.
Parked follow-ups
staged_ripr_binaryis introduced in eval_sweep_refresh.rs and adopted at all five spawn sites in that module; no other xtask/ripr module spawns a built ripr binary undertarget/debug/, so this is the only site needing the helper within scope.- No unsafe, no FFI, no network, no secret material, no production behavior change in this diff. unsafe-review sensor reports 0 new_gaps / 0 worsened / 0 comment-plan candidates. Diff is test-only + docs.
EffortlessSteven
left a comment
There was a problem hiding this comment.
Inspection record (published head)
reviewed_head_sha: 03995b6aa2acc13a56194948929d8a2a0239d5a8
integration_basis: origin/main b1d101134 (merge-base verified at candidate time)
claim_boundary: #3742 slice 4 — harness edges: explicit re-bless opt-in, staged spawn binaries, LEARNINGS write-up. Test-only + docs; no production changes.
changed_surfaces_and_semantic_owners_inspected: testing/rebless.rs (new shared helper), testing/mod.rs, gate/tests.rs + review_comments.rs (the two is_ok sites + controls), eval_sweep_refresh.rs (stage helper + 5 call sites + unit tests), LEARNINGS.md. Production owners untouched; consumers unchanged (documented =1 flow preserved; staged bytes identical).
blocking_findings: none.
non_blocking_suggestions: none.
refuted_or_stale_findings: none (one pre-commit finding — unsafe env mutation vs forbid(unsafe_code) — repaired on-candidate via ambient-env simulation + pure predicate before commit).
proof_and_ci_observed: re-bless control failed pre-repair (silent Ok rewrite under bare var), green post-repair in bare/opt-in/unset modes; stage unit tests green; full refresh module 27/27 on staged binaries; affected ripr suites 147/147; fmt/clippy/check-fast(10)/precommit(33)/fixture-contracts green on exact head. Remote: Rust gates, ub-review, cargo-deny, dependency-review, GitGuardian, docs, pr-plan SUCCESS on published head; 0 threads. UNSTABLE = advisory droid-review only.
proof_or_review_missing: none for this claim.
affected_currentness_dimensions: exact-head CI + threads refreshed; no head movement since candidate review.
residual_assumptions_and_non_claims: corpus-relative matrix still repo-rooted (next slice); Windows load proof not run here.
disposition: REVIEW_READY
Merging (agent-owned merge per working agreement). #3529 untouched.
Refs #3742 (slice 4 of the de-flake family; slices 1-3 merged). Test-only + docs; no production changes.
Evidence delta
crate::testing::rebless::fixture_rebless_enabled(): onlyRIPR_UPDATE_FIXTURES=1rewrites fixtures; bare presence asserts. Adopted at bothis_ok()sites (gateassert_repo_fixture, review-commentsassert_text_fixture). The crate forbidsunsafe_codeandset_varisunsafein edition 2024, so the leak simulation runs through the ambient environment.eval_sweep_refreshtests stage a private binary copy under the test temp root (staged_ripr_binary: copy retry + fail-closed, no live-path fallback) and pass it as--ripr-binat all five call sites, so a concurrent cargo relink oftarget/debug/can no longer break spawns mid-run.docs/LEARNINGS.mdgains the five-mechanism write-up with file:line evidence and the per-slice map, noting the corpus-relative matrix residual.Acceptance matrix
Okrewrite under bare var) and passes post-repair in bare, opt-in, and unset modes.Non-claims
repo_root()(residual, next slice).Rollback
Revert this one commit; no production, golden, schema, or contract changes.
Candidate
Exact head:
03995b6aa2acc13a56194948929d8a2a0239d5a8, baseb1d101134.