Repository navigation
Verify unique orientations of opaque pairs - #339
Merged
RobinLinus merged 1 commit intoNov 9, 2026
Merged
Conversation
brenorb
marked this pull request as ready for review
November 7, 2026 20:25
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Result
Verify that each independently supplied quartet of opaque byte strings admits exactly one matching orientation and return its canonical orientation bit. The branch uses one raw equality to eliminate the impossible orientation and explicitly checks distinctness where that first equality cannot imply it. Both caller stacks survive. The eager baseline computes both raw orientation flags and requires them to differ.
The alternating fixtures include exact checks of every orientation bit and terminal true. Witness bytes cover the count and lengths of the data items, all of which coexist at entry. They exclude leaf, control block, annex, and transaction. The branch preserves one caller item on each stack at width 249 and reaches exactly 1,000. Eager reaches the limit before caller items. Both schedules use zero hints and zero signature charge.
An existential match accepts an all-equal quartet and cannot establish a unique orientation. The focused tests reproduce this counterexample, enumerate all raw equality patterns over four distinct byte vectors, mutate every batch item, and test the 80/81-byte, 520/521-byte, and combined stack boundaries.
The raw multiset in #308 can match across a full list and checks multiplicities. The opaque common prefix in #312, unique mismatch in #329, and lag match count in #332 expose different relations. All four exact-head merge simulations were clean.
Evidence is
locally-reproduced. Execution isunclassified. The stack-limited local tapscript profiles use a synthetic transaction and disable experimental OP_CAT.Verification
cargo test --locked --lib support::unique_pair_orientation::testscargo test --locked --test primitive_metrics opaque_pair_orientation_metrics_are_currentpython3 tools/kb.py validatecargo fmt --all -- --check