Repository navigation
fix(oracle-gaps): preserve optional call continuations - #308
Closed
KyleAMathews wants to merge 2 commits into
Closed
KyleAMathews wants to merge 2 commits into
KyleAMathews wants to merge 2 commits into
Conversation
🦋 Changeset detectedLatest commit: 4637fd4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. |
1 of 3 tasks
This was referenced Dec 1, 2026
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.
The gap runner can make a valid unmutated baseline throw when an optional call crosses a TypeScript non-null assertion. This blocked the indexed-snapshot oracle audit in TanStack/db#2502.
For example, this expression skips the continuation when
bucketsis absent:The instrumenter saw the assertion as the call's consumer and inserted a value wrapper. That wrapper ended the optional chain before
.add. The fix follows expression wrappers before identifying receiver and callee uses. Parentheses retain their original semantics.The existing validity owner now varies wrapper kind, wrapper depth and property, element, call and method continuations. It compares authored-source execution with instrumented execution on nullish and present receivers.
The complete validation also exposed quadratic reach indexing.
baselineOfnow appends to each site's fresh list rather than copying the growing list for every test. The existing classification oracle checks that order, membership and classification stay unchanged.Evidence
The evidence record includes exact commands, controls, the stopped run and the deterministic reach-index measurement. Source and oracle lint pass. The package build passes.