Repository navigation
fix(javascript): retain proven property presence at reads - #12477
Merged
Merged
Conversation
The read-time IR and projection boundary builds on the destructuring work in #7716. This change adds an indexed own-slot proof and uses it for ordinary member reads as well. Co-authored-by: SII-YDD <[email protected]>
morluto
marked this pull request as ready for review
November 19, 2026 18:55
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. |
Contributor
[Medium impact] The PR appears safe to merge; no new blocking issue was found. SummaryRetains property dependencies proven at the read, even when later writes change the merged object value.
Reviews (3) · Last reviewed commit: "fix(javascript): retain destructuring pr..." · Reviewed by Greptile |
morluto
enabled auto-merge (squash)
November 19, 2026 19:07
This was referenced Nov 19, 2026
13 tasks
15 of 22 tasks
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.
Summary
Keep a JavaScript property dependency resolved when the source establishes the property at the read and a later write to that property changes the merged object value. Fixes #7559. This builds on the read-time IR design in #7716 and also covers ordinary member reads.
Change
The value evaluator records proven own data-slot presence using its existing capture timing and effect-path index. It indexes each direct object literal once and checks the requested path. The graph consumes that read-time fact for both property reads and destructuring. The existing fallback still handles operations without proof.
Earlier relevant writes, getters, opaque effects, and ambiguous paths retain the existing uncertainty. Restoring the dependency edge can make it traversable while a separate aggregate graph edge still makes the overall trace ambiguous.
Evidence and validation
Four focused regressions reproduced the missed dependency and four controls retained their original results on the base. The candidate passed all 333 focused tests, including the graph projection paths.
The compiled CLI regression verifies that the ordinary read and destructuring edges remain resolved and the default trace traverses the destructuring dependency.
A 14-case control matrix retained uncertainty for earlier deletes, receiver or binding replacements, getters, and opaque effects. Validation used authored source and did not execute analyzed applications.
The patch preserves public CLI and MCP contracts. The shared IR gains an optional proof consumed by its existing graph projection.
npm run check:ci:fastpassed on the published revision, including type checking, lint, and formatting.At
a1ff085335, the collector retains leaf proof in pattern evaluation order and asks the effect log for its recorded-effect check. All 340 focused tests, the compiled CLI default-trace regression, andcheck:fastpassed on the corrected revision. Earlier uncertain pattern effects still limit the proof.Author readiness
Human owner: @morluto