Skip to content

fix(javascript): preserve uncertainty after immutable pattern targets - #12673

Merged
morluto merged 2 commits into
mainfrom
audit/partial-destructuring-after-immutable-target
Nov 20, 2026
Merged

morluto merged 2 commits into
mainfrom
audit/partial-destructuring-after-immutable-target

Conversation

@morluto

@morluto morluto commented Nov 20, 2026 •

Copy link
Copy Markdown
Owner

Problem

A destructuring assignment could report later bindings as resolved when an earlier write to an immutable binding prevents evaluation from reaching them.

Change

Walk targets in source order and let the binding state identify immutable write targets. Preserve earlier reads. Keep later identifiable source paths as partial candidates and omit them from the default trace. Temporal dead zone and general abrupt completion remain separate.

Validation

Eight discriminator cases failed on the exact base and passed with the fix. The review follow-up adds the binder’s assignment semantics for inner class names and named function expressions. Five new cases failed on the previous head. The updated head passed 449 focused tests, including compiled CLI graph and default-trace behavior, and check:fast. The ordering follows ECMAScript destructuring assignment.

Author readiness

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-20T01:56:38.255043Z f01c6fb New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge based on the code reviewed.

Summary

Preserves uncertainty in destructuring links after writes to immutable bindings, including private class and function names.

  • Destructuring links follow the order assignment targets run.

The previous class-name finding is fixed. No new actionable issues were found. Validation was source-based; tests were not rerun.

Reviews (2) · Last reviewed commit: "fix(javascript): retain self-name assign..." · Reviewed by Greptile

@morluto
morluto enabled auto-merge (squash) November 20, 2026 01:57
@morluto
morluto merged commit a5f19cb into main Nov 20, 2026
43 checks passed
@morluto
morluto deleted the audit/partial-destructuring-after-immutable-target branch November 20, 2026 02:01
@morluto morluto added bug Something isn't working area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior labels Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: native Native analysis and decompilation, including Ghidra, IDA, and Hopper analysis behavior bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant