[PR #1557] [MERGED] fix(javascript): yield during receiver and reference classification #2970

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

📋 Pull Request Information

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

Base: main ← Head: fix/javascript-cooperative-receiver-reference-phases-1462


📝 Commits (2)

  • 54e3730 fix(javascript): yield during receiver and reference classification
  • a310f19 Merge remote-tracking branch 'origin/main' into fix/javascript-cooperative-receiver-reference-phases-1462

📊 Changes

5 files changed (+109 additions, -39 deletions)

View changed files

📝 src/application/javascript/JavaScriptArtifactAnalysis.ts (+3 -3)
📝 src/domain/javascript/javascriptSemanticAnalysis.ts (+42 -28)
📝 src/domain/javascript/javascriptSemanticAnalysisSteps.test.ts (+45 -2)
📝 src/domain/javascript/javascriptSemanticProjection.ts (+15 -4)
📝 src/domain/javascript/javascriptStaticAnalysis.ts (+4 -2)

📄 Description

Large JavaScript files still run definition gathering, receiver classification, Electron alias classification and lexical-reference collection as uninterrupted scans. Drive these scans through the existing cooperative AST iterator and JavaScript analysis checkpoints, preserving synchronous domain facades, reference ordering and complete analysis results.

Refs #1462 and #1065. This does not close #1462: parsing and other semantic phases still have long steps.

Validation:

  • Pinned Node 24.18/npm 11.16, CPUs 13/15, nice 10, 2304 MiB process-family RSS guard.
  • 147 focused source tests; 44 compiled/public workflow tests including actual CLI/stdio MCP cancellation and wide receiver returns; 27 adjacent Electron tests including CLI/MCP preload overrides; cached typecheck/lint passed.
  • After merging current main (including #1537), 162 tests in four affected suites passed. Thirty complete-IR corpus digests still match the original baseline.
  • Real unchanged 121-file ASAR: analysis 113.67 s, peak family RSS 1774424064 bytes; exact complete Evidence identity matched the pre-change baseline. Typed oversized-transport error retained the complete analysis; summary/pages, trace, identity rejection and close/stale/ping checks passed. This single run does not establish a throughput improvement.
  • Real largest ASAR module: open classification max step 1122.58 → 84.65 ms; Electron classification 763.13 → 35.40 ms; static analysis 790.18 → 69.35 ms. All four complete output digests matched, including the 91441981-byte semantic IR. Other semantic steps still reached ~980 ms.
  • Warmed real SDK cancellation: abort at ~202 ms, next ping ~35.66 ms, zero retained Evidence from the cancelled operation, then successful small analysis and cleanup. Input remained unchanged.

No tool schema, result limit or provider authority changes. Real Hopper/Ghidra verification is not applicable to these JavaScript-only changes and was not performed for this patch.


🔄 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/1557 **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-cooperative-receiver-reference-phases-1462` --- ### 📝 Commits (2) - [`54e3730`](https://github.com/morluto/rea/commit/54e373056ec57f041c59671f956d16d5a3b42c2a) fix(javascript): yield during receiver and reference classification - [`a310f19`](https://github.com/morluto/rea/commit/a310f1902e96c66336079fdcdf32ea3b683f0260) Merge remote-tracking branch 'origin/main' into fix/javascript-cooperative-receiver-reference-phases-1462 ### 📊 Changes **5 files changed** (+109 additions, -39 deletions) <details> <summary>View changed files</summary> 📝 `src/application/javascript/JavaScriptArtifactAnalysis.ts` (+3 -3) 📝 `src/domain/javascript/javascriptSemanticAnalysis.ts` (+42 -28) 📝 `src/domain/javascript/javascriptSemanticAnalysisSteps.test.ts` (+45 -2) 📝 `src/domain/javascript/javascriptSemanticProjection.ts` (+15 -4) 📝 `src/domain/javascript/javascriptStaticAnalysis.ts` (+4 -2) </details> ### 📄 Description Large JavaScript files still run definition gathering, receiver classification, Electron alias classification and lexical-reference collection as uninterrupted scans. Drive these scans through the existing cooperative AST iterator and JavaScript analysis checkpoints, preserving synchronous domain facades, reference ordering and complete analysis results. Refs #1462 and #1065. This does not close #1462: parsing and other semantic phases still have long steps. Validation: - Pinned Node 24.18/npm 11.16, CPUs 13/15, nice 10, 2304 MiB process-family RSS guard. - 147 focused source tests; 44 compiled/public workflow tests including actual CLI/stdio MCP cancellation and wide receiver returns; 27 adjacent Electron tests including CLI/MCP preload overrides; cached typecheck/lint passed. - After merging current main (including #1537), 162 tests in four affected suites passed. Thirty complete-IR corpus digests still match the original baseline. - Real unchanged 121-file ASAR: analysis 113.67 s, peak family RSS 1774424064 bytes; exact complete Evidence identity matched the pre-change baseline. Typed oversized-transport error retained the complete analysis; summary/pages, trace, identity rejection and close/stale/ping checks passed. This single run does not establish a throughput improvement. - Real largest ASAR module: open classification max step 1122.58 → 84.65 ms; Electron classification 763.13 → 35.40 ms; static analysis 790.18 → 69.35 ms. All four complete output digests matched, including the 91441981-byte semantic IR. Other semantic steps still reached ~980 ms. - Warmed real SDK cancellation: abort at ~202 ms, next ping ~35.66 ms, zero retained Evidence from the cancelled operation, then successful small analysis and cleanup. Input remained unchanged. No tool schema, result limit or provider authority changes. Real Hopper/Ghidra verification is not applicable to these JavaScript-only changes and was not performed for this patch. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:12:24 +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#2970
No description provided.