Skip to content

test(gate): root exception inputs at hermetic temp dir, add planted-delta control - #3757

Merged
EffortlessSteven merged 1 commit into
mainfrom
lane-3742-s3-gate-root-honoring
Sep 16, 2026
Merged

EffortlessSteven merged 1 commit into
mainfrom
lane-3742-s3-gate-root-honoring

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

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_input and 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 both CausalDeltaAuthority::load and CausalDeltaArtifact::load) to ambient generated state. Both sites now root at the hermetic temp dir; the active-ledger test asserts the report echoes that root.
  • New gate_reads_root_planted_canonical_delta_for_causal_decisions: a root-planted complete delta attributing the ledger gap (pricing::discount::threshold) as introduced_by_change keeps the acknowledgeable blocker and renders the attribution; re-attributing the same gap as baseline_existing flips the decision advisory. An implementation that ignored the artifact (or read it from the CWD) reports blocking in both arms.

Acceptance matrix

  • Root-echo assertion failed pre-repair (left: \".\" vs temp dir) and passes post-repair — bound to this mutation.
  • Planted-delta pair passes pre- and post-repair (contract lock; production already honors an explicit root).
  • Focused suite: 95/95 output::gate:: lib tests green on the exact head.
  • cargo fmt --check, cargo clippy -p ripr --all-targets clean.
  • cargo xtask check-fast: 10 gates pass, base=origin/main, 1 file changed.
  • cargo xtask precommit passes.
  • Remote required checks (pending; see CI).

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

  • The --root CLI default (.) is unchanged — invoking from the repo root is legitimate UX, not this defect.
  • Corpus-relative tests still root at repo_root() by construction (relative fixture paths require it); only the absolute-path inputs are re-rooted here.
  • Candidate review disposition pre-publication: REVIEW_INCOMPLETE (remote evidence missing by definition).

Rollback boundary

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

Candidate

Exact head: aea4ab69e80831d5cddcec48c9b6a6508609b70a, base bb879c6c0.

…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.
@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 19 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: 1977d200-d955-49bc-872d-18401b0238f1

📥 Commits

Reviewing files that changed from the base of the PR and between bb879c6 and aea4ab6.

📒 Files selected for processing (1)
  • crates/ripr/src/output/gate/tests.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

  • 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 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: 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.

@EffortlessSteven
EffortlessSteven merged commit b1d1011 into main Sep 16, 2026
24 of 25 checks passed
@EffortlessSteven
EffortlessSteven deleted the lane-3742-s3-gate-root-honoring branch September 16, 2026 22:21
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