Skip to content

fix(analysis): require same-test pairing for predicate exposed (#4828) - #4876

Merged
EffortlessSteven merged 14 commits into
mainfrom
cursor/split-test-boundary-oracle-29fc
Sep 29, 2026
Merged

EffortlessSteven merged 14 commits into
mainfrom
cursor/split-test-boundary-oracle-29fc

Conversation

@EffortlessSteven

@EffortlessSteven EffortlessSteven commented Sep 29, 2026 •

Copy link
Copy Markdown
Member

Closes #4828

Summary

A predicate probe no longer reads exposed when one test feeds a boundary input without an oracle and a different test holds a discriminating oracle far from the boundary. exposed requires one test that both feeds a boundary input to the owner and holds a discriminating oracle on that call's result. Otherwise the finding stays at most weakly_exposed and names same_test_pairing_missing.

assert_eq!(gate(10), true) stays exposed. Pairing reuses activation's == facts so named-constant and helper-hop same-test controls keep their class. Pairing matches the predicate parameter slot, not an unused argument; same-line split calls and shadowed let bindings stay unpaired. Does not absorb #4486, #4760, #4574, or #4715.

Landed RIPR-SPEC-0181 is the inline test-module region cage (#4783). Landed RIPR-SPEC-0182 is the governed identity registry (#4804). Landed RIPR-SPEC-0183 is the executed-control contract (#4641). Landed RIPR-SPEC-0184 is the typed public command catalog (#4822). Landed RIPR-SPEC-0185 is CLI analysis progress on stderr (#4810). This claim is RIPR-SPEC-0186.

Swarm / Source Boundary

This PR targets EffortlessMetrics/ripr-swarm, the normal development trunk for trusted same-repo ripr work. Confirm the change belongs here:

  • ordinary feature, analyzer, editor, docs, spec, fixture, badge, dependency, or repo-ops development for ripr-swarm

Source-of-truth Links

Proposal: none
Spec: RIPR-SPEC-0186
ADR: none
Plan item: none
Governing issue or accepted claim: #4828
Acceptance delta: a split-test boundary input plus far exact oracle is at most weakly_exposed and names same_test_pairing_missing; same-call pairing stays exposed.

Candidate Relationships

Candidate branch: cursor/split-test-boundary-oracle-29fc
Stack parent or prerequisite PR: none

No equivalent PR implements #4828. #4486 landed as #4499. #4760, #4574, and #4715 remain out of scope.

Scope Classification

  • One production behavior

Production delta: after infect Yes and discriminate Yes on a predicate, require one related test that both sits on the boundary and holds a discriminating oracle on that owner call.

Single acceptance criterion: split-test boundary input + far oracle is below exposed and names same_test_pairing_missing; same-test pairing stays exposed.

Non-goals: #4574/#4715 helper credit; #4486 proximity-only oracles; #4760 bare-name method relation; schema bump; runtime mutation vocabulary.

Support-tier Impact

  • none

Policy Impact

  • doc artifacts

Proof

cargo test -p ripr --lib analysis::classify::boundary_pairing
# 13 passed on 639392adf
cargo xtask goldens bless split_test_boundary_oracle
# human.txt only: #4777 findings-below wording; check.json class counts unchanged

Hosted Ripr Rust Small Result failed on 639392adf at goldens check: live human output after merging #4777 uses findings below and a test gap to inspect or repair (top_gap). Blessed that fixture only. Classes stay 0 exposed / 2 weakly_exposed; the predicate still names same_test_pairing_missing. Hosted PR CI owns the merge-gate matrix.

Exact candidate SHA: 02ee4ec3eb7248e5973f1ff9763280b24e3aaa6e

Claim Boundary

May claim: a predicate does not read exposed from a split between a boundary call without an oracle and a far exact oracle.

Must not claim: runtime mutation outcomes; helper-call credit; proximity-only oracle changes; bare-name method relation.

Rollback

Revert this squash.

Spec-Test-Code Traceability

  • Spec: RIPR-SPEC-0186
  • Tests: crates/ripr/src/analysis/classify/boundary_pairing.rs
  • Code: boundary_pairing.rs, classifier/evidence.rs, classify/decision.rs
  • Golden outputs: fixtures/split_test_boundary_oracle/expected/
  • Metrics: same_test_boundary_oracle_pairing

Static Language Check

  • Static output avoids killed, survived, untested, proven, and adequate.

CI Economics

n/a

Engineering Check

  • No new panic, unwrap, expect, todo, or unimplemented in production code or tests.
Open in Web Open in Cursor 

cursoragent and others added 2 commits September 29, 2026 07:01
A predicate no longer reads exposed when one test feeds a boundary
input and a different test holds the discriminating oracle. Pairing
reuses activation == facts so named-constant and helper-hop controls
stay exposed; the split names same_test_pairing_missing.

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
git diff --check rejects a new blank line at EOF.

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 43173e41-9941-4a3c-9a4c-95c8903e2aca


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.

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

Author self-review on exact head 53a7a5c7e2fc6623fdc25de7831901c9ab2914bf (COMMENT; GitHub cannot request changes from the author). This is not approval.

reviewed_head_sha: 53a7a5c7e2fc6623fdc25de7831901c9ab2914bf
integration_basis: origin/main 6ce04820581bc417dc95fd3732d24f5954d9d272 (behind-only; no restack)
claim_boundary: #4828 / RIPR-SPEC-0181 — predicate exposed requires one test that both feeds a boundary input and holds a discriminating oracle on that owner call; split names same_test_pairing_missing; same-call control stays exposed. Does not absorb #4486, #4760, #4574, #4715.
changed_surfaces_and_semantic_owners_inspected:
- analysis/classify/boundary_pairing.rs (pairing authority)
- analysis/classifier/evidence.rs (gate after infect Yes + discriminate Yes)
- analysis/classify/decision.rs (missing evidence names the split token)
- fixtures/split_test_boundary_oracle (reproduction)
- honesty corpus rust_split_test_boundary_oracle (must_not_promote)
- consumers: RIPR-SPEC-0001 exposed paragraph, STATIC_EXPOSURE_MODEL Discrimination vs Coverage, CHANGELOG Unreleased Fixed
blocking_findings: none on source/oracle from this inspection
non_blocking_suggestions:
- RIPR-SPEC-0181 is the next unused number on this main; sibling in-flight PRs also took 0181 independently. First to land wins; this PR does not restack for that.
refuted_or_stale_findings: none yet (no external review threads)
proof_and_ci_observed:
- cargo test -p ripr --lib analysis::classify::boundary_pairing: 7 passed
- cargo xtask goldens check: pass, 0 existing-fixture drift
- split fixture: 0 exposed, 2 weakly_exposed; predicate names same_test_pairing_missing; return_value stays weakly_exposed (observation_unverified); no class gain
- strong_boundary_oracle expected exposed unchanged
- cargo xtask precommit: pass on this head
- hosted checks at review time: GitGuardian success only; required merge-gate jobs not yet current
proof_or_review_missing:
- hosted exact-head required checks, artifacts, and external review
- published-head re-entry of this procedure after those exist
affected_currentness_dimensions: production implementation, test stimulus, test oracle, public claim, generated relationships, candidate head identity
residual_assumptions_and_non_claims:
- pairing reuses activation == facts so helper-hop and named-constant same-test controls stay paired; it does not credit helper-call assertions or proximity-only oracles
- static weakly_exposed is not a runtime mutation outcome
disposition: REVIEW_INCOMPLETE

Oracle challenge: the split fixture would have classified the predicate exposed before the gate (infect Yes from boundary + discriminate Yes from far). After the gate it is weakly_exposed and names same_test_pairing_missing. Removing the pairing call in evidence.rs would restore the false exposed. Same-call assert_eq!(gate(10), true) and strong_boundary_oracle stay paired via call-argument matching / activation == facts.

Rendered behavior: live ripr check on the fixture produced the blessed expected JSON/human (0 exposed).

No blocker found for the claim on this committed head. Merge convergence waits on current published-head hosted evidence.

gemini-code-assist[bot]

This comment was marked as resolved.

letter = gate(10) is not a let-binding. let got: bool = gate(10) still
pairs when a later exact assertion observes got.

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>

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

Author self-review on exact head 30edfbb9025f934df1ff884bee44ae6343589288 after Gemini let_binding_name repair. COMMENT; not approval.

reviewed_head_sha: 30edfbb9025f934df1ff884bee44ae6343589288
integration_basis: origin/main 6ce048205 (behind-only)
claim_boundary: unchanged #4828 / RIPR-SPEC-0181
changed_surfaces_and_semantic_owners_inspected: boundary_pairing::let_binding_name and pairing tests
blocking_findings: none on this repair
non_blocking_suggestions: none new
refuted_or_stale_findings: Gemini discussion_r4130697536 repaired (keyword boundary + type ascription)
proof_and_ci_observed: 9 pairing unit tests passed on this head; hosted merge-gate not yet current for 30edfbb90
proof_or_review_missing: hosted exact-head required checks and artifacts for this SHA
affected_currentness_dimensions: production implementation, test stimulus, test oracle, candidate head identity
residual_assumptions_and_non_claims: typed-let pairing is static; not runtime mutation proof
disposition: REVIEW_INCOMPLETE

cursoragent and others added 2 commits September 29, 2026 07:26
…tries

Conflicted only CHANGELOG.md and docs/LEARNINGS.md. Both 2026-09-29
entries are retained. Analyzer pairing for #4828 is unchanged.

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
Landed RIPR-SPEC-0181 is the inline test-module region cage (#4783).
Retain the #4828 changelog and learning beside newly landed entries.

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
@EffortlessSteven
EffortlessSteven marked this pull request as ready for review September 29, 2026 07:34
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-29T07:38:07.693588Z fd39f54 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: fd39f54e59

ℹ️ 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".

@devin-ai-integration devin-ai-integration 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.

Devin Review found 6 potential issues.

Devin Review

cursoragent and others added 9 commits September 29, 2026 07:50
…ring

Pairing now matches the predicate parameter slot, not any argument
literal, and only owner calls inside the assertion subject. Same-line
split calls, unused marker arguments, and shadowed let bindings stay
unpaired. Short let-bound names still pair.

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
…is RIPR-SPEC-0183

Main landed RIPR-SPEC-0182 for the governed identity registry (#4804).
Keep that id and move the #4828 same-test pairing claim to RIPR-SPEC-0183.

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
Ripr Rust Small precommit failed clippy -D warnings on two let...else
searches that return Option. Same pairing tests still pass.

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
Hosted merge-ref failed: pairing FunctionSummary literals missed impl_attrs
from #4868. Keep both changelog/learning entries; pairing stays RIPR-SPEC-0183.

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
…s RIPR-SPEC-0184

GitHub reported the PR CONFLICTING after later main commits. Landed 0183 is
the executed-control contract (#4641). Move the #4828 pairing claim to 0184.

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
…ring is RIPR-SPEC-0185

Main landed RIPR-SPEC-0184 for the typed public command catalog (#4822) and
FunctionFact.impl_context (#4558). Keep those ids and fields; move the #4828
same-test pairing claim to RIPR-SPEC-0185 and fill impl_context on pairing
FunctionSummary literals.

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
…PR-SPEC-0186

Main landed RIPR-SPEC-0185 for CLI analysis progress on stderr (#4810). Keep
that id and move the #4828 same-test pairing claim to RIPR-SPEC-0186. Retain
the #4828 changelog entry beside the landed cache-warning fix.

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>
Hosted goldens check failed on 639392a: live human output now says
"findings below" and "a test gap to inspect or repair (top_gap)". Classes
stay 0 exposed / 2 weakly_exposed; the predicate still names
same_test_pairing_missing.

Co-authored-by: Steven Zimmerman, CPA <EffortlessSteven@users.noreply.github.com>

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

Author self-review on exact published head 02ee4ec3eb7248e5973f1ff9763280b24e3aaa6e (COMMENT; GitHub cannot request changes from the author). This is not approval.

reviewed_head_sha: 02ee4ec3eb7248e5973f1ff9763280b24e3aaa6e
integration_basis: origin/main 3510e1fc4 (behind-only vs later LSP-diagnostics #4851 and hunk-span #4439; no restack; no real merge-tree conflict hunks; RIPR-SPEC-0186 unused on main)
claim_boundary: #4828 / RIPR-SPEC-0186 — predicate exposed requires one test that both feeds a boundary input and holds a discriminating oracle on that owner call; split names same_test_pairing_missing; same-call control stays exposed. Does not absorb #4486, #4760, #4574, #4715.
changed_surfaces_and_semantic_owners_inspected:
- analysis/classify/boundary_pairing.rs (pairing authority)
- analysis/classifier/evidence.rs (gate after infect Yes + discriminate Yes)
- analysis/classify/decision.rs (missing evidence names the split token)
- fixtures/split_test_boundary_oracle (reproduction; 0 exposed, 2 weakly_exposed)
- honesty corpus rust_split_test_boundary_oracle (must_not_promote / maximum_class weakly_exposed)
- consumers: RIPR-SPEC-0001 exposed paragraph, STATIC_EXPOSURE_MODEL Discrimination vs Coverage, CHANGELOG Unreleased Fixed, RIPR-SPEC-0186
blocking_findings: none on source/oracle from this inspection
non_blocking_suggestions: none new on this head
refuted_or_stale_findings:
- Gemini let_binding_name repaired (keyword boundary + type ascription)
- Codex/Devin unused-arg, same-line split, shadowing, short names repaired on 1aedca3e1
- #4760 bare-name and #4574/#4715 helper credit replied out of scope
- hosted goldens check failure on 639392adf was #4777 human-wording drift only; blessed human.txt; check.json classes unchanged
proof_and_ci_observed:
- cargo test -p ripr --lib analysis::classify::boundary_pairing: 13 passed
- goldens bless split_test_boundary_oracle: human.txt findings-below wording; 0 exposed / 2 weakly_exposed; predicate names same_test_pairing_missing; return_value stays observation_unverified; no class gain
- hosted Ripr Rust Small on GitHub Hosted / Rust gates: success (job 109378123017)
- hosted Ripr Rust Small Result: success (job 109389625946) on 02ee4ec3e
- 9 review threads resolved (repair or out-of-scope reply)
proof_or_review_missing:
- CodeRabbit skipped (quota/OSS); missing provider review, not a finding
- classic branch-protection REST 403 (evidence gap); ruleset required_approving_review_count=0, required_review_thread_resolution=true, squash allowed
affected_currentness_dimensions: production implementation, test stimulus, test oracle, public claim, generated relationships, conflict resolution, candidate head identity, exact-head CI receipts
residual_assumptions_and_non_claims:
- pairing reuses activation == facts so helper-hop and named-constant same-test controls stay paired; it does not credit helper-call assertions or proximity-only oracles
- static weakly_exposed is not a runtime mutation outcome
- later main movement is behind-only unless a spec-id or FunctionSummary field collision reappears
disposition: REVIEW_READY

Oracle challenge: the split fixture would have classified the predicate exposed before the gate (infect Yes from boundary + discriminate Yes from far). After the gate it is weakly_exposed and names same_test_pairing_missing. Removing the pairing call in evidence.rs would restore the false exposed. Same-call assert_eq!(gate(10), true) and strong_boundary_oracle stay paired.

Rendered behavior: fixture expected JSON/human stay 0 exposed; hosted goldens check passed on this head after the #4777 wording refresh.

No blocker for merge convergence on this published head.

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.

rust: a boundary input from a test that asserts nothing plus an exact oracle from another test reads exposed (false exposed)

2 participants