[PR #1445] [MERGED] fix(javascript): invalidate references stored through property targets #2892

Closed
opened 2026-10-17 21:11:28 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/1445
Author: @N0zoM1z0
Created: 10/10/2026
Status: ✅ Merged
Merged: 10/10/2026
Merged by: @N0zoM1z0

Base: main ← Head: fix/javascript-stored-slot-aliases


📝 Commits (2)

  • 319c8a3 fix(javascript): invalidate references stored through property targets
  • c56a386 refactor(javascript): share rest keys and return-shape fixtures

📊 Changes

7 files changed (+271 additions, -98 deletions)

View changed files

📝 docs/javascript-application-workflows.md (+4 -2)
📝 src/domain/javascript/javascriptAstValues.ts (+10 -0)
📝 src/domain/javascript/javascriptSemanticAnalysis.ts (+5 -9)
📝 src/domain/javascript/javascriptSemanticIterationSources.ts (+57 -12)
📝 tests/acceptance/applications/javascriptIterationAliases.test.ts (+6 -75)
➕ tests/acceptance/applications/javascriptSlotStores.test.ts (+98 -0)
➕ tests/fixtures/javascriptReturnShapes.ts (+91 -0)

📄 Description

Later object/array-slot stores could leave shared.x reported as literal 1 after a write through the stored reference actually changed it to 2. 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:

  • Real compiled CLI and SDK stdio MCP acceptance: 33 slot-store variants, plus the existing 24 iteration-alias variants; text/structured Evidence parity and subsequent ping.
  • Source-owned runtime oracles and public MCP probes on Node 22.22.2 and 24.18.0.
  • Six adjacent semantic suites: 343 tests.
  • npm run check:ci (including duplication, unused-code and architecture guards), npm run check:fast, and npm run verify:test-discovery.

No native provider changes; real Hopper/Ghidra verification was not performed.

Closes #1442.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/morluto/rea/pull/1445 **Author:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Created:** 10/10/2026 **Status:** ✅ Merged **Merged:** 10/10/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `fix/javascript-stored-slot-aliases` --- ### 📝 Commits (2) - [`319c8a3`](https://github.com/morluto/rea/commit/319c8a38492ea7d72d0d7c137b87459b6d29b319) fix(javascript): invalidate references stored through property targets - [`c56a386`](https://github.com/morluto/rea/commit/c56a3866be44b71d5b70938ddfa017be8952a4de) refactor(javascript): share rest keys and return-shape fixtures ### 📊 Changes **7 files changed** (+271 additions, -98 deletions) <details> <summary>View changed files</summary> 📝 `docs/javascript-application-workflows.md` (+4 -2) 📝 `src/domain/javascript/javascriptAstValues.ts` (+10 -0) 📝 `src/domain/javascript/javascriptSemanticAnalysis.ts` (+5 -9) 📝 `src/domain/javascript/javascriptSemanticIterationSources.ts` (+57 -12) 📝 `tests/acceptance/applications/javascriptIterationAliases.test.ts` (+6 -75) ➕ `tests/acceptance/applications/javascriptSlotStores.test.ts` (+98 -0) ➕ `tests/fixtures/javascriptReturnShapes.ts` (+91 -0) </details> ### 📄 Description Later object/array-slot stores could leave `shared.x` reported as `literal 1` after a write through the stored reference actually changed it to `2`. 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: - Real compiled CLI and SDK stdio MCP acceptance: 33 slot-store variants, plus the existing 24 iteration-alias variants; text/structured Evidence parity and subsequent ping. - Source-owned runtime oracles and public MCP probes on Node 22.22.2 and 24.18.0. - Six adjacent semantic suites: 343 tests. - `npm run check:ci` (including duplication, unused-code and architecture guards), `npm run check:fast`, and `npm run verify:test-discovery`. No native provider changes; real Hopper/Ghidra verification was not performed. Closes #1442. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:11:28 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#2892
No description provided.