Skip to content

test(harness): explicit re-bless opt-in, staged spawn binaries, #3742 learnings - #3760

Merged
EffortlessSteven merged 1 commit into
mainfrom
lane-3742-s4-harness-edges
Sep 16, 2026
Merged

EffortlessSteven merged 1 commit into
mainfrom
lane-3742-s4-harness-edges

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Refs #3742 (slice 4 of the de-flake family; slices 1-3 merged). Test-only + docs; no production changes.

Evidence delta

  • New shared crate::testing::rebless::fixture_rebless_enabled(): only RIPR_UPDATE_FIXTURES=1 rewrites fixtures; 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.
  • eval_sweep_refresh tests 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-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 five-mechanism write-up with file:line evidence and the per-slice map, noting the corpus-relative matrix residual.

Acceptance matrix

  • Re-bless control failed pre-repair (silent Ok rewrite under bare var) and passes post-repair in bare, opt-in, and unset modes.
  • Stage helper unit tests (bytes-under-root, missing-source fails closed); full refresh module 27/27 green on staged binaries.
  • Affected ripr suites 147/147 green; fmt, clippy, check-fast (10), precommit (33), check-fixture-contracts green on exact head.
  • Remote required checks (pending; see CI).

Non-claims

  • The corpus-relative gate matrix still roots at repo_root() (residual, next slice).
  • Windows parallel-load proof not run here.
  • Candidate review pre-publication: REVIEW_INCOMPLETE (remote evidence missing by definition).

Rollback

Revert this one commit; no production, golden, schema, or contract changes.

Candidate

Exact head: 03995b6aa2acc13a56194948929d8a2a0239d5a8, base b1d101134.

…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.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 38 minutes.

Check out review usage here.

View limit details

Limit 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: dd074a8d-6c4d-468a-9722-24fa1c1f1fc5

📥 Commits

Reviewing files that changed from the base of the PR and between b1d1011 and 03995b6.

📒 Files selected for processing (6)
  • crates/ripr/src/output/gate/tests.rs
  • crates/ripr/src/output/review_comments.rs
  • crates/ripr/src/testing/mod.rs
  • crates/ripr/src/testing/rebless.rs
  • docs/LEARNINGS.md
  • xtask/src/reports/eval_sweep_refresh.rs

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_FIXTURES could silently re-bless fixtures because env reads normalize empty values to truthy; refuted because: The new rebless_enabled_for predicate uses value.is_some_and(\|v\| v == FIXTURE_REBLESS_OPT_IN) with OPT_IN="1"; Some("") returns false, matching the in-file unit test assertion !rebless_enabled_for(Some("")). No set_var mutation path exists in this unsafe_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_binary is 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 under target/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 EffortlessSteven left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant