Repository navigation
fix(javascript): invalidate references stored through property targets - #1445
Conversation
N0zoM1z0
left a comment
There was a problem hiding this comment.
Reviewed final head 319c8a3. The existing escape machinery now covers later property stores, including logical/destructured assignments and rest-copy exclusions, without pretending to evaluate slot writes. Verified real CLI/stdio MCP (33 slot-store variants + 24 iteration variants), 343 adjacent semantic tests, Node 22/24 runtime/MCP probes, and typecheck/lint. Conservative unknowns for read-only stores are documented. Full CI is pending.
There was a problem hiding this comment.
Reviewed final head c56a386. The escape fix covers later property stores while preserving scalar copies and excluded rest items; conservative read-only unknowns are documented. Shared rest-key selection and the CLI/MCP fixture remove duplicated rules/setup without weakening assertions. Real CLI/stdio MCP (33 store + 24 iteration variants), 343 adjacent tests, Node 22/24 probes, and the complete local check:ci pass. Final CI 38027911689 and Real JavaScript recovery 38027911705 both succeeded; all 20 check-runs are green, with no unresolved threads. Ready to merge.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
TL;DR: This merged while I was testing, so this is a post-merge check. I tested head The second commit only moves a helper. I built and tested The 24 cases from #1442Each case ran on Node 22, 24 and 26, through the CLI and MCP. Every cell matched across all six. Coverage says
So none of the 24 is wrong now. Three rows lose a right New probesI wrote 48 more probes and checked each in real JS. On base, 36 gave a wrong const shared = { x: 1 };
const get = () => shared;
get().x = 2;
return shared.x; // real 2, REA says literal 1The same happens with The rest held up. Regression, tests and speed
On the chunk, one function's Two loop forms are still wrong on base and head. One is a Not run
Thanks, N0zoM1z0, for such a fast fix. Full 24-case matrixSame on Node 22, 24 and 26, CLI and MCP. Each case starts with
All 48 new probesSame on Node 22, 24 and 26, CLI and MCP. Real JS gives 2 unless noted. Still wrong on head (also wrong on base):
Wrong
Controls:
Speed and loop casesThe 38 for...of cases and 59 #1390 cases ran on Node 24, base and head. All 194 runs exited clean. Still wrong on both base and head:
Loop timings, median of 3, Node 24:
Results and IR match base for every k. Hermes Desktop (MIT) vendor chunk, 258 KB, median of 3, Node 24, 5000 MB heap:
Load sat between 6.7 and 7.1 from other jobs. Commands
Test setup
🤖 Generated with Claude Code (Opus 5.5) 🦊 |
morluto#1445) * fix(javascript): invalidate references stored through property targets * refactor(javascript): share rest keys and return-shape fixtures
Later object/array-slot stores could leave
shared.xreported asliteral 1after a write through the stored reference actually changed it to2. Treat selected references stored through property targets as escapes using the existing semantic effect machinery. This covers ordinary/logical assignments, nested/destructured stores, and spread/rest copies without adding a slot execution model. Binding and store projections share the existing static object-pattern key rule; both regression journeys share a CLI/MCP fixture.Copied primitive values, excluded object-rest keys/array-rest prefixes, and unrelated properties remain known. Reference stores are conservative: a read-only store may also become
unknown; no stale literal is retained. CLI/MCP contracts and tool inventory are unchanged.Validation:
npm run check:ci(including duplication, unused-code and architecture guards),npm run check:fast, andnpm run verify:test-discovery.No native provider changes; real Hopper/Ghidra verification was not performed.
Closes #1442.