Skip to content

test(rust): witness derived-local tuple arm inside closure - #3770

Closed
EffortlessSteven wants to merge 2 commits into
mainfrom
test/1728-derived-local-tuple
Closed

EffortlessSteven wants to merge 2 commits into
mainfrom
test/1728-derived-local-tuple

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Summary

Test-first implementation front for EffortlessMetrics/ripr#1728, under ripr#1714/#1453.

Base is protected ripr-swarm/main@6ab836c2e4d8497aed3dabdf59469fb6ed67bdd2, the reviewed merge of direct-function tuple discriminator #3767. Production is unchanged in this commit.

Exact consumer-shaped witness

The fixture mirrors the unsupported ub-review#1306 structure:

terminalize_proof
→ filter_map closure
→ request_identity_matches derived from receipt/request membership
→ task_identity_matches derived from receipt/task equality
→ match over the ordered local tuple
→ false/false early return None
→ relation propagated into `join=<relation>` output
→ direct higher-level equality oracle

The changed arm is:

(true, false) => "request_identity_v2"

The positive oracle calls the outer owner and observes:

receipt-1:join=request_identity_v2

The sibling control exercises (false, true) and must leave the changed request-only arm WeaklyExposed / observation_unverified.

Intended red witness

The merged #3767 implementation intentionally supports only a statement-free tail match over two direct Boolean parameters. It must not infer this closure/local/result-flow shape.

The first hosted run should therefore:

  • compile and execute the new public integration fixture;
  • retain the related higher-level test/oracle;
  • pass the task-only sibling negative;
  • fail only the request-only positive at its ExposureClass::Exposed assertion because the actual class remains weak/unverified.

If the run fails earlier in fixture selection, related-test discovery, source currentness, formatting, or compilation, repair the witness before changing production.

Next production boundary

After the exact red witness is retained, implement only the bounded contract in ripr#1728:

  • one exact owner and closure;
  • two immutable derived local booleans with one dominating initializer each;
  • no mutation, shadowing, reassignment, or alias write before the match;
  • ordered direct-name tuple scrutinee;
  • exact parser-owned selected arm;
  • explicit handling of the return None sibling;
  • one supported result-flow route into the outer projection oracle;
  • fail-closed behavior for every unsupported or ambiguous shape.

Do not implement a general interpreter, broad assertion proximity, guards, alternation, Result/Option, return/error/field widening, source-role changes, or consumer rewrites.

Authority boundary

This development PR cannot authorize a RIPR release, ub-review analyzer pin, suppression, threshold change, Required-policy change, or ub-review#1306 merge. Frozen consumer comparison and adoption remain separately governed by ub-review#813.

Gates

  • Exact test-only red witness reaches the positive class oracle.
  • Production repair is bounded to the derived-local closure contract.
  • Positive becomes exposed; sibling and adversarial controls remain weak/unknown.
  • Exact-head fmt/check/strict Clippy/full nextest, evidence honesty, policy, goldens, and fixtures pass.
  • Substantive current-head review completes.
  • Frozen consumer replay is retained as comparison-only evidence.

@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 19, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 41 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: 501594e4-a747-420d-b4d2-4c5c5503b133

📥 Commits

Reviewing files that changed from the base of the PR and between 6ab836c and 827a02e.

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

Copy link
Copy Markdown
Member Author

Closing as a duplicate implementation front of earlier draft #3769.

#3769 predates this PR, is based on the same protected merge 6ab836c2, and already carries the more complete consumer-shaped corpus: request-only positive, task-only/both/neither siblings, reordered and transformed tuple negatives, and fixture confinement. This PR's simpler outer-projection witness does not justify a second authority-bearing branch.

No production code was committed here. Its initial run stopped at formatting, so it is not a behavioral red witness. The issue #1728 implementation and retained red/green evidence will continue only in #3769.

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