Repository navigation
[TS] Preserve dense array search applicability after payload writes - #536
Merged
Merged
Conversation
CaelmBleidd
force-pushed
the
caelmbleidd/preserve-dense-array-search-domain
branch
from
October 16, 2026 13:00
47d897d to
58c39de
Compare
CaelmBleidd
deleted the
caelmbleidd/preserve-dense-array-search-domain
branch
October 16, 2026 13:01
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.
Array search guards used whole shared payload-region identity as a proof that no slots were missing. An in-range write, or a write to another array in that region, invalidated that test even when the receiver remained dense. Ordinary source programs such as splitting a string, updating an element, then indexOf(undefined) stopped as unsupported.
Use the existing per-receiver dense-shape proof for search applicability. It survives payload updates, checks the current length, and is revoked by own-slot deletion. No search loop, equality/NaN rule, callback semantics, bound or fallback policy changes. Other model guards that require stronger value snapshots are unchanged.
Validation: the new source regression fails with the previous guard (no completed states after an ordinary write), and passes for receiver writes, unrelated writes and boxed undefined values. A deletion regression still takes the indexOf residual path. Three focused test methods passed, including replay of the new witnesses and existing sequence/callback witnesses in Node; strict usvm-ts detektMain/detektTest passed. This is an applicability repair, not a measured general array-search performance claim. Full suites left to CI.