Repository navigation
test(gate): root exception inputs at hermetic temp dir, add planted-delta control - #3757
Conversation
…elta control The exception-policy inputs rooted the gate at the process working directory while passing absolute input paths. The root looked dead but silently coupled the default-path causal loads (root.join(target/ripr/pr/canonical-delta.json)) to ambient generated state. Root both sites at the temp dir and assert the report echoes it. Add gate_reads_root_planted_canonical_delta_for_causal_decisions: a root-planted complete delta keeps the acknowledgeable blocker and renders its attribution; re-attributing the gap non-causal flips the decision advisory, proving the gate reads the artifact from the explicit root.
|
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 19 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 (1)
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
- plant_canonical_delta writes schema_version 0.1 with deltas having null base_state/head_state and empty attribution_basis; the production contract for canonical-delta is not asserted by this test beyond delta_attribution + decision. If a future schema tightens required fields (e.g. non-empty attribution_basis for high confidence), this test would still pass without exercising that requirement.
Verification questions
- Confirm sibling source-route gap: only two absolute-path-input call sites in tests.rs are re-rooted. Other GateEvaluateInput constructions in this module that may pass absolute paths while keeping root: PathBuf::from(".") were not enumerated in the PR; a broad meta-class sweep across GateEvaluateInput literal sites is not in evidence.
- Confirm artifact-verifier sensor failed (exit code 2) on a test-only PR; no production artifact is produced by these tests, so the failure is unlikely to gate correctness but should be confirmed as not-a-build-witness regression before merge.
Refuted
- The new planted-delta test could be vacuously green if the gate never reads target/ripr/pr/canonical-delta.json; refuted because: Both gate readers (CausalDeltaAuthority::load and CausalDeltaArtifact::load) default to root.join("target/ripr/pr/canonical-delta.json"); the test asserts both decision and parsed delta_attribution values that would fail on a no-op reader; arm2's flip to "advisory" requires the attribution to be consumed.
- Default-path causal load sites CausalDeltaAuthority::load and CausalDeltaArtifact::load still resolve against GateEvaluateInput.root, so other test modules that pass absolute paths with root: PathBuf::from(".") remain CWD-coupled.; refuted because: Out of stated PR scope: author explicitly notes corpus-relative tests root at repo_root() by construction; the patch is a mutation-bound defect repair per slice 3 of 3. Lane cannot refute the existence of other sites without a scan, but the claim itself is bounded-correct — demoted to source-route-gap observation rather than a blocker.
- The default-path causal loads in production (CausalDeltaAuthority::load / CausalDeltaArtifact::load) should also be re-rooted away from CWD in this PR.; refuted because: Out of scope: PR is test-only by design; production --root default (
.) is documented UX, not the defect. Re-rooting production would cross the rollback boundary and is rightly deferred.
Parked follow-ups
- cargo-test receipt is absent at packet time and is scheduled late. PR body claims 95/95 gate::tests green on exact head, but the lane cannot independently verify until receipt lands.
Evidence gaps
- PR notes focused suite 95/95 green on exact head aea4ab6 and check-fast/precommit pass; cargo-test late-evidence receipt is scheduled but not yet landed in this packet.
- Model proof intent was rejected by deterministic validation.
- artifact-verifier failed with exit code 2; no failing artifact detail in packet. PR is test-only and rollback is a single commit, but this is the only failed sensor.
- cargo-test receipt is absent at packet time and is scheduled late. PR body claims 95/95 gate::tests green on exact head, but the lane cannot independently verify until receipt lands.
EffortlessSteven
left a comment
There was a problem hiding this comment.
Inspection record (published head)
reviewed_head_sha: aea4ab69e80831d5cddcec48c9b6a6508609b70a
integration_basis: origin/main bb879c6c0 (merge-base verified; basis unchanged)
claim_boundary: #3742 slice 3 — gate test inputs root at explicit hermetic dir; planted-delta root-honoring control. Test-only; no production change.
changed_surfaces_and_semantic_owners_inspected: crates/ripr/src/output/gate/tests.rs only (+102/-2). Semantic owner output::gate untouched; consumers (gate CLI, goldens, schemas) untouched — verified no other files in published diff.
blocking_findings: none.
non_blocking_suggestions: none.
refuted_or_stale_findings: pr-tmp/ files are tracked PR bodies, not residue; CLI --root default "." is legitimate UX, out of scope; corpus-relative tests root at repo_root() by construction.
proof_and_ci_observed: root-echo assertion failed pre-repair (left "." vs temp dir) and passes post-repair; planted-delta pair discriminates artifact-ignoring/CWD-reading fakes (blocking+rendered attribution vs advisory); 95/95 output::gate:: lib tests green on exact head; fmt+clippy clean; check-fast 10 gates + precommit pass on exact head. Remote: Ripr Rust Small Result, Rust gates, ub-review, cargo-deny, dependency-review, GitGuardian, docs, pr-plan all SUCCESS on the published head; 0 review threads; 0 comments. mergeState UNSTABLE reflects only advisory droid-review (still queued), not the required discriminator.
proof_or_review_missing: none for this claim.
affected_currentness_dimensions: exact-head CI receipts + review threads refreshed since candidate review; no head movement, no other dimension changed.
residual_assumptions_and_non_claims: CLI --root default unchanged; corpus-relative tests unchanged; droid-review advisory noise not waited on.
disposition: REVIEW_READY
Ready to merge (test-only, single commit, revertible by revert). #3529 untouched.
Refs #3742 (slice 3 of 3; slices 1-2 merged as e4c3da1 and bb879c6).
Production delta
None. Test-only change to
crates/ripr/src/output/gate/tests.rs(+102/-2).Evidence delta
exception_inputand the missing/malformed-ledger test rooted the gate at the process working directory (root: PathBuf::from(".")) while passing absolute input paths. The root looked dead but silently coupled the default-path causal loads (root.join("target/ripr/pr/canonical-delta.json")in bothCausalDeltaAuthority::loadandCausalDeltaArtifact::load) to ambient generated state. Both sites now root at the hermetic temp dir; the active-ledger test asserts the report echoes that root.gate_reads_root_planted_canonical_delta_for_causal_decisions: a root-planted complete delta attributing the ledger gap (pricing::discount::threshold) asintroduced_by_changekeeps the acknowledgeable blocker and renders the attribution; re-attributing the same gap asbaseline_existingflips the decision advisory. An implementation that ignored the artifact (or read it from the CWD) reports blocking in both arms.Acceptance matrix
left: \".\"vs temp dir) and passes post-repair — bound to this mutation.output::gate::lib tests green on the exact head.cargo fmt --check,cargo clippy -p ripr --all-targetsclean.cargo xtask check-fast: 10 gates pass, base=origin/main, 1 file changed.cargo xtask precommitpasses.Proof actually run
Focused gate tests pre-repair (observed red + green), post-repair rerun 95/95, check-fast and precommit on exact head
aea4ab69e.Limitations and non-claims
--rootCLI default (.) is unchanged — invoking from the repo root is legitimate UX, not this defect.repo_root()by construction (relative fixture paths require it); only the absolute-path inputs are re-rooted here.Rollback boundary
Revert this one commit; no production, golden, schema, or contract surface changes.
Candidate
Exact head:
aea4ab69e80831d5cddcec48c9b6a6508609b70a, basebb879c6c0.