Repository navigation
Add stable selection of opaque stack items - #253
Merged
RobinLinus merged 2 commits intoOct 16, 2026
Merged
Conversation
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.
support::selection::compact_selected_items(n)consumes opaque payload/binary-selector pairs and returns the retained payloads in original order plus their exact count, preserving both caller stacks. Consuming pairs backward avoids forward ROLL routing and a final reversal. At 32 all-retained one-byte pairs it costs 496 fragment / 596 checked-leaf bytes and peaks at 65 combined items, versus 970 / 1,070 / 66 for the matched native forward schedule, with the same 64 entry data items, zero hints and 129 serialized witness bytes.The public contract requires native tapscript MINIMALIF for exact empty/01 flags. Payload content and selector meaning remain caller obligations. The API accepts 0..=499 pairs; 499 uses 998 entry items and peaks at 999, allowing exactly one caller item. Discarded payloads still count at entry. Explicit guarded comparison variants reach their frontier at 498 pairs. The existing numeric word selector retains its API; the shared audit only clarifies its four-byte numeric condition and lack of limb validation.
The deterministic 110-row report binds source/dependency hashes, execution options, final fragment/leaf hashes, witness/output hashes, typed failures and exact boundaries. Whole-leaf compilation is recorded independently: the 499-pair leaf checking 520-byte outputs is explicitly unoptimized NONE at 270,319 bytes, while its 8,339-byte selection fragment uses ALL. Local policy rejects oversized payloads even when discarded. All new configurations are
locally-reproduced/unclassified; no complete Core spend, relay acceptance or cryptographic security claim is made. The KB includes matched comparisons, NR-078 and OP-036.Validation at delivered commit
12d398f5fef3c287cf5348be954252e7bf05d530, with source artifacts pinned to666643cf20198f4e831e66f705a7192a216b33b2:CARGO_PROFILE_TEST_OPT_LEVEL=1 cargo test --locked -- --skip fields::on the clean delivered tree, including all active named metrics and artifact recomputation/source checks.