[PR #3297] [CLOSED] fix(javascript): preserve default export capture timing #5709

Closed
opened 2026-10-31 01:08:49 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/3297
Author: @xu91102
Created: 10/14/2026
Status: ❌ Closed

Base: main ← Head: codex/default-export-callable-values


📝 Commits (4)

  • 39c7346 fix(javascript): retain captured identifier default exports
  • 0f6d409 Merge upstream main and preserve source-mode test assertions
  • 6baf369 fix(javascript): retain default capture availability during integration
  • f20eb0f fix(ci): align Hopper discovery and version fixture assertions

📊 Changes

3 files changed (+90 additions, -24 deletions)

View changed files

📝 src/domain/javascript/javascriptSemanticMutationInitializers.ts (+58 -22)
📝 src/domain/javascript/javascriptSemanticReturns.ts (+11 -2)
📝 tests/acceptance/applications/exportedFunctionBindingsCli.test.ts (+21 -0)

📄 Description

Summary

Fixes #3261

For export default run; { var run = () => ({answer:42}); }, Node exports undefined, while REA attributed the later function's return shape to the captured default. Check initializer availability at the shared read-position owner after upstream's latest-initializer selection. Preserve pre-export assignments, hoisted declarations, after-export snapshots, named live bindings and parser-owned CommonJS semantics. Extend the existing Node/CLI/stdio MCP workflow; remove the superseded parallel compiled regression.

The initial capture work has already been adopted upstream with contributor credit. This PR retains only the verified availability gap. Public schemas, providers, execution authority and dependency metadata remain unchanged; source identity and Evidence provenance are preserved.

Validation

Final head: f20eb0f8570386c9c3616a3640a706ff82a6e187, incorporating main f75b1a416ba67b8421e7dbd248160afedb79581f.

  • The three-path contribution is byte-identical to the independently reviewed patch. Earlier 47-file / 1228-test PASS evidence is retained after checking production, build, lock and 46 unchanged test inputs; this is not a fresh 47-file run.
  • Fresh accepted-upstream checks: Hopper/release-notes 6 tests and Rizin boundary 15 tests PASS; six code-check tasks plus architecture guards and six documentation tasks plus five consistency tests PASS. The Rizin checks use boundary fixtures, not an installed engine.
  • Twelve completed public CLI observations established the before/after result and exact positive-control Evidence/provenance preservation. Small samples, uncontrolled caches and sampled process-family RSS do not establish a speedup; token usage was not measured.

Old CI 38544603462 and 38554026248 failed Linux Hopper fixture assertions. This update accepts upstream's separated availability/version assertions and retained installation path; production doctor/ldd behavior is unchanged. Full old failure logs are preserved. Final-SHA CI 38559112862 completed successfully: source tests, all five portable shards, static checks, build, docs, JavaScript recovery and required CI. Its complete log was read and retained; old failures remain failures. The separate Draft readiness status still awaits the human declaration. Windows and real native engines were not executed locally.

Author readiness

Human owner: @xu91102. Keep Draft; human declarations remain unchecked.

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

Before merge

  • Human readiness, final-revision CI and actionable review findings completed.

🔄 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/3297 **Author:** [@xu91102](https://github.com/xu91102) **Created:** 10/14/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `codex/default-export-callable-values` --- ### 📝 Commits (4) - [`39c7346`](https://github.com/morluto/rea/commit/39c7346c90b4459c324403f3e71d11ac0273ea76) fix(javascript): retain captured identifier default exports - [`0f6d409`](https://github.com/morluto/rea/commit/0f6d409fd78293ccc3438d4b8de7df9d2131030f) Merge upstream main and preserve source-mode test assertions - [`6baf369`](https://github.com/morluto/rea/commit/6baf369a2166d7be4f2f8a5492478ec6ea3f7042) fix(javascript): retain default capture availability during integration - [`f20eb0f`](https://github.com/morluto/rea/commit/f20eb0f8570386c9c3616a3640a706ff82a6e187) fix(ci): align Hopper discovery and version fixture assertions ### 📊 Changes **3 files changed** (+90 additions, -24 deletions) <details> <summary>View changed files</summary> 📝 `src/domain/javascript/javascriptSemanticMutationInitializers.ts` (+58 -22) 📝 `src/domain/javascript/javascriptSemanticReturns.ts` (+11 -2) 📝 `tests/acceptance/applications/exportedFunctionBindingsCli.test.ts` (+21 -0) </details> ### 📄 Description ## Summary Fixes #3261 For `export default run; { var run = () => ({answer:42}); }`, Node exports `undefined`, while REA attributed the later function's return shape to the captured default. Check initializer availability at the shared read-position owner after upstream's latest-initializer selection. Preserve pre-export assignments, hoisted declarations, after-export snapshots, named live bindings and parser-owned CommonJS semantics. Extend the existing Node/CLI/stdio MCP workflow; remove the superseded parallel compiled regression. The initial capture work has already been adopted upstream with contributor credit. This PR retains only the verified availability gap. Public schemas, providers, execution authority and dependency metadata remain unchanged; source identity and Evidence provenance are preserved. ## Validation Final head: `f20eb0f8570386c9c3616a3640a706ff82a6e187`, incorporating main `f75b1a416ba67b8421e7dbd248160afedb79581f`. - The three-path contribution is byte-identical to the independently reviewed patch. Earlier 47-file / 1228-test PASS evidence is retained after checking production, build, lock and 46 unchanged test inputs; this is not a fresh 47-file run. - Fresh accepted-upstream checks: Hopper/release-notes 6 tests and Rizin boundary 15 tests PASS; six code-check tasks plus architecture guards and six documentation tasks plus five consistency tests PASS. The Rizin checks use boundary fixtures, not an installed engine. - Twelve completed public CLI observations established the before/after result and exact positive-control Evidence/provenance preservation. Small samples, uncontrolled caches and sampled process-family RSS do not establish a speedup; token usage was not measured. Old CI `38544603462` and `38554026248` failed Linux Hopper fixture assertions. This update accepts upstream's separated availability/version assertions and retained installation path; production doctor/ldd behavior is unchanged. Full old failure logs are preserved. Final-SHA CI `38559112862` completed successfully: source tests, all five portable shards, static checks, build, docs, JavaScript recovery and required CI. Its complete log was read and retained; old failures remain failures. The separate Draft readiness status still awaits the human declaration. Windows and real native engines were not executed locally. ## Author readiness Human owner: @xu91102. Keep Draft; human declarations remain unchecked. - [ ] 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. ## Before merge - [ ] Human readiness, final-revision CI and actionable review findings completed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:08:49 +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#5709
No description provided.