[PR #6206] [MERGED] feat(javascript): link assignment right-hand sides to their writes #7203

Closed
opened 2026-11-01 21:46:06 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/6206
Author: @IvenKooLab
Created: 10/22/2026
Status: ✅ Merged
Merged: 10/24/2026
Merged by: @gensokyo-dev

Base: main ← Head: feat/javascript-assignment-flow


📝 Commits (10+)

  • d278ec9 feat(javascript): link assignment right-hand sides to their writes
  • 5554589 Merge remote-tracking branch 'upstream/main' into feat/javascript-assignment-flow
  • b25895f chore: integrate current main for assignment analysis
  • 3224aca fix(javascript): preserve computed key assignment ownership
  • 8bf2b57 test(javascript): retain nested callback assignment ownership
  • 0fbd13b chore: integrate current main for JavaScript assignments
  • d55a0b3 docs(javascript): record assignment influence verification
  • 513b637 chore: integrate current main for assignment contracts
  • 4abe550 test(mcp): isolate mocks and acknowledge cancellation boundaries
  • 8f7b403 chore: integrate current main and retain isolated test ownership

📊 Changes

17 files changed (+702 additions, -35 deletions)

View changed files

📝 docs/javascript-application-workflows.md (+8 -0)
➕ docs/verification/javascript-assignment-influence-2026-10-24.md (+193 -0)
📝 scripts/lib/test-projects.mjs (+1 -8)
➕ src/application/javascript/JavaScriptSemanticGraphAssignmentProjection.ts (+63 -0)
➕ src/application/javascript/JavaScriptSemanticGraphAssignments.test.ts (+184 -0)
📝 src/application/javascript/JavaScriptSemanticGraphBuilder.ts (+9 -1)
📝 src/application/javascript/JavaScriptSemanticGraphFlowProjection.ts (+2 -0)
📝 src/application/javascript/JavaScriptSemanticGraphObjectProjection.ts (+4 -0)
📝 src/application/javascript/JavaScriptSemanticGraphProjection.ts (+7 -1)
📝 src/domain/javascript/javascriptSemanticDerivedAnalysis.ts (+43 -1)
📝 src/domain/javascript/javascriptSemanticIr.ts (+13 -0)
📝 src/domain/javascript/javascriptSemanticProjection.ts (+7 -0)
📝 src/javascript/analysis/JavaScriptAnalysisWorkerSchemas.ts (+1 -0)
➕ tests/boundary/cli/javascriptAssignmentInfluence.test.ts (+87 -0)
📝 tests/boundary/filesystem/ciTestProjects.test.ts (+9 -8)
📝 tests/process-global/evidenceBundleHeadroom.test.ts (+8 -6)
📝 tests/process-global/javascriptAnalysisCancellation.test.ts (+63 -10)

📄 Description

Fixes #6193.

A forward trace from 0.001 could stop at a read instead of reaching speed = accel, a property write or a compound write. The semantic IR now records assignment inputs once; projection links reads to writes and retains both compound operands. Logical right-hand inputs remain candidates. These relations do not evaluate arithmetic or establish execution order or the resulting value.

Computed method keys use the enclosing callable's ownership. The parser retains their ranges, the shared graph lookup consumes that fact, and the strict worker schema carries it across processes. Method parameters/body and nested callbacks retain their own ownership. Assignment collection uses the existing cooperative traversal. No cache or execution authority is added.

Integration coverage also fixes two module-mock tests' ownership: Evidence-bundle headroom and SDK cancellation now use the existing isolated process-global project. The SDK fixture holds its selected progress boundary until cancellation is acknowledged through an ordered ping, releases that gate during cleanup, and checks that the gate actually participated. A stale native introductory-text precheck was removed from the oversized discovery workflow; its metadata/schema/paging assertions remain.

Validation on main 85e38ac1 integration:

  • Full npm run check, documentation and test-discovery checks pass; all 2,314 test files have one owner. The expanded selection passes 526 checks, including all 15 assignment, 22 MCP view, worker/cancellation and 14 test-policy cases. The complete five-fixture public assignment CLI workflow passes separately after build completion.
  • Computed-key positives fail before the ownership fix. Removing the owner filter makes both deferred-callback negatives fail; bypassing the fixture's progress gate makes both SDK cancellation cases fail. No target code is executed; other platforms and actual native providers were not newly verified for this JavaScript feature.
  • One CLI process-exit failure occurred while this operator accidentally overlapped runtime compilation and built tests. Its subprocess cause is unknown; the attempt is retained, and the fixture now reports stderr. Build completion precedes the passing public CLI check. This failure is not attributed to main.
  • Current-head CI 40051184925: 12 successful / 3 failed / 19 skipped / 3 cancelled jobs. All six failed/cancelled logs are audited. The only functional failure is the native dispatch snapshot replay fixture (missing snapshot.json), reproduced with matching failure messages on exact CI main 85e38ac1 and actual merge 96723aa9. Aggregation repeats it; other jobs are fail-fast cancellations. Cancelled jobs do not establish unexecuted coverage. The maintainer explicitly authorizes bypass for established main failures.

Three alternating pairs per fixture use two fresh CLI commands per answer and compare complete semantic answers, provenance and coverage:

Task Output token estimate before → after Elapsed median s CPU median s Sampled family RSS median MiB
1 function 18,430 → 18,431 5.160 → 4.809 6.017 → 5.696 497.1 → 503.8
32 functions 588,112 → 588,112 8.356 → 6.277 7.483 → 7.784 557.2 → 561.6

These are tokenx estimates, not model usage. Saved query payload costs are separate in the report. No speedup is claimed: elapsed ranges overlap; the 32-function CPU median increases about 0.30 s (4.0%), RSS about 4.5 MiB (0.8%). The host was shared, OS caches were not flushed, and later main-integration performance was not remeasured.

Verification report pins revisions, fixtures, complete controls and measurement limitations.

Author readiness

Human owner: @IvenKooLab

  • 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.

🔄 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/6206 **Author:** [@IvenKooLab](https://github.com/IvenKooLab) **Created:** 10/22/2026 **Status:** ✅ Merged **Merged:** 10/24/2026 **Merged by:** [@gensokyo-dev](https://github.com/gensokyo-dev) **Base:** `main` ← **Head:** `feat/javascript-assignment-flow` --- ### 📝 Commits (10+) - [`d278ec9`](https://github.com/morluto/rea/commit/d278ec9981f112462ca9d6a77a4caa2caa9855d9) feat(javascript): link assignment right-hand sides to their writes - [`5554589`](https://github.com/morluto/rea/commit/55545893fb37225eab8efdf581a1ec33dd4391a7) Merge remote-tracking branch 'upstream/main' into feat/javascript-assignment-flow - [`b25895f`](https://github.com/morluto/rea/commit/b25895f9522a3432f0c2f9dfd2fc3e819510298f) chore: integrate current main for assignment analysis - [`3224aca`](https://github.com/morluto/rea/commit/3224acae383501c5559c43ef521220406f3fee5d) fix(javascript): preserve computed key assignment ownership - [`8bf2b57`](https://github.com/morluto/rea/commit/8bf2b57e6937b277388c489ba54c8c45e3981965) test(javascript): retain nested callback assignment ownership - [`0fbd13b`](https://github.com/morluto/rea/commit/0fbd13b77b15c6906138eaac232456d3a2141ac5) chore: integrate current main for JavaScript assignments - [`d55a0b3`](https://github.com/morluto/rea/commit/d55a0b3982d05bdf6cddc84fc5d064fc172f20f4) docs(javascript): record assignment influence verification - [`513b637`](https://github.com/morluto/rea/commit/513b63735ab8abcef3c75e4b1566f83ced39d9a0) chore: integrate current main for assignment contracts - [`4abe550`](https://github.com/morluto/rea/commit/4abe5509404ea459a0270d5fe30536961e42f97f) test(mcp): isolate mocks and acknowledge cancellation boundaries - [`8f7b403`](https://github.com/morluto/rea/commit/8f7b403a0b1349700a819eda373d3dcac0e6133f) chore: integrate current main and retain isolated test ownership ### 📊 Changes **17 files changed** (+702 additions, -35 deletions) <details> <summary>View changed files</summary> 📝 `docs/javascript-application-workflows.md` (+8 -0) ➕ `docs/verification/javascript-assignment-influence-2026-10-24.md` (+193 -0) 📝 `scripts/lib/test-projects.mjs` (+1 -8) ➕ `src/application/javascript/JavaScriptSemanticGraphAssignmentProjection.ts` (+63 -0) ➕ `src/application/javascript/JavaScriptSemanticGraphAssignments.test.ts` (+184 -0) 📝 `src/application/javascript/JavaScriptSemanticGraphBuilder.ts` (+9 -1) 📝 `src/application/javascript/JavaScriptSemanticGraphFlowProjection.ts` (+2 -0) 📝 `src/application/javascript/JavaScriptSemanticGraphObjectProjection.ts` (+4 -0) 📝 `src/application/javascript/JavaScriptSemanticGraphProjection.ts` (+7 -1) 📝 `src/domain/javascript/javascriptSemanticDerivedAnalysis.ts` (+43 -1) 📝 `src/domain/javascript/javascriptSemanticIr.ts` (+13 -0) 📝 `src/domain/javascript/javascriptSemanticProjection.ts` (+7 -0) 📝 `src/javascript/analysis/JavaScriptAnalysisWorkerSchemas.ts` (+1 -0) ➕ `tests/boundary/cli/javascriptAssignmentInfluence.test.ts` (+87 -0) 📝 `tests/boundary/filesystem/ciTestProjects.test.ts` (+9 -8) 📝 `tests/process-global/evidenceBundleHeadroom.test.ts` (+8 -6) 📝 `tests/process-global/javascriptAnalysisCancellation.test.ts` (+63 -10) </details> ### 📄 Description Fixes #6193. A forward trace from `0.001` could stop at a read instead of reaching `speed = accel`, a property write or a compound write. The semantic IR now records assignment inputs once; projection links reads to writes and retains both compound operands. Logical right-hand inputs remain candidates. These relations do not evaluate arithmetic or establish execution order or the resulting value. Computed method keys use the enclosing callable's ownership. The parser retains their ranges, the shared graph lookup consumes that fact, and the strict worker schema carries it across processes. Method parameters/body and nested callbacks retain their own ownership. Assignment collection uses the existing cooperative traversal. No cache or execution authority is added. Integration coverage also fixes two module-mock tests' ownership: Evidence-bundle headroom and SDK cancellation now use the existing isolated process-global project. The SDK fixture holds its selected progress boundary until cancellation is acknowledged through an ordered ping, releases that gate during cleanup, and checks that the gate actually participated. A stale native introductory-text precheck was removed from the oversized discovery workflow; its metadata/schema/paging assertions remain. Validation on main `85e38ac1` integration: - Full `npm run check`, documentation and test-discovery checks pass; all 2,314 test files have one owner. The expanded selection passes **526** checks, including all 15 assignment, 22 MCP view, worker/cancellation and 14 test-policy cases. The complete five-fixture public assignment CLI workflow passes separately after build completion. - Computed-key positives fail before the ownership fix. Removing the owner filter makes both deferred-callback negatives fail; bypassing the fixture's progress gate makes both SDK cancellation cases fail. No target code is executed; other platforms and actual native providers were not newly verified for this JavaScript feature. - One CLI process-exit failure occurred while this operator accidentally overlapped runtime compilation and built tests. Its subprocess cause is unknown; the attempt is retained, and the fixture now reports stderr. Build completion precedes the passing public CLI check. This failure is not attributed to main. - Current-head [CI 40051184925](https://github.com/morluto/rea/actions/runs/40051184925): **12 successful / 3 failed / 19 skipped / 3 cancelled jobs**. All six failed/cancelled logs are audited. The only functional failure is the native dispatch snapshot replay fixture (missing snapshot.json), reproduced with matching failure messages on exact CI main `85e38ac1` and actual merge `96723aa9`. Aggregation repeats it; other jobs are fail-fast cancellations. Cancelled jobs do not establish unexecuted coverage. The maintainer explicitly authorizes bypass for established main failures. Three alternating pairs per fixture use two fresh CLI commands per answer and compare complete semantic answers, provenance and coverage: | Task | Output token estimate before → after | Elapsed median s | CPU median s | Sampled family RSS median MiB | | --- | ---: | ---: | ---: | ---: | | 1 function | 18,430 → 18,431 | 5.160 → 4.809 | 6.017 → 5.696 | 497.1 → 503.8 | | 32 functions | 588,112 → 588,112 | 8.356 → 6.277 | 7.483 → 7.784 | 557.2 → 561.6 | These are `tokenx` estimates, not model usage. Saved query payload costs are separate in the report. No speedup is claimed: elapsed ranges overlap; the 32-function CPU median increases about 0.30 s (4.0%), RSS about 4.5 MiB (0.8%). The host was shared, OS caches were not flushed, and later main-integration performance was not remeasured. [Verification report](https://github.com/IvenKooLab/rea/blob/e178a07846766dda0142c5d92c7fcc2a125e6fe8/docs/verification/javascript-assignment-influence-2026-10-24.md) pins revisions, fixtures, complete controls and measurement limitations. ## Author readiness Human owner: @IvenKooLab - [x] 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. - [x] I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps. - [x] I declare this PR ready for initial maintainer review. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-01 21:46:06 +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#7203
No description provided.