Repository navigation
fix(javascript): preserve nested array iterator dependencies - #12558
Merged
Merged
Conversation
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] No newly reportable issue was found in the changes since the previous review. SummaryPreserves exact dependencies for one native array nested inside another. Records writes through reflected array prototype aliases and uses those facts before proving native iteration.
Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["Reflected array prototype alias"] --> B["Record shared prototype write"]
B --> C["Set arrayIterationUnknown"]
C --> D{"Native iteration still proved?"}
D -->|Yes| E["Preserve nested slot dependency"]
D -->|No| F["Keep dependency as candidate"]
Reviews (4) · Last reviewed commit: "test(javascript): keep array prototype a..." · Reviewed by Greptile |
morluto
enabled auto-merge (squash)
November 19, 2026 22:40
morluto
disabled auto-merge
November 19, 2026 22:41
Reuse the shared effect-log classifier first prepared for dense inline spread analysis.
morluto
enabled auto-merge (squash)
November 19, 2026 22:45
morluto
disabled auto-merge
November 19, 2026 22:48
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.
Follow-up in #12563. Static controls confirmed that the merged head can still lose the effect of a prototype alias stored through an array spread. The follow-up corrects the ambient source lookup and verifies the regression on current main.
Problem
A direct nested array pattern can lose an exact dependency even after the semantic graph proves which native array supplied the outer slot. This continues #7716 and follows #12551. The initial PR let an override through a reflected array prototype alias bypass the native iterator guard.
Change
Reuse the outer slot proof, check the inner iterator at acquisition, and end the proof at its close. Record writes through reflected array prototype aliases in the existing ambient effect log and seed the iterator guard from those facts before selecting slots. This keeps uncertain or deeper patterns as candidates and applies the existing conservative prototype policy to reflected aliases.
Validation
check:fast. Paired CLI output changed the overridden case from resolved to candidate and removed it from the default trace. Independent checks covered Object and Reflect aliases, early calls, harmless writes, and shadowed globals.