[PR #3480] [MERGED] fix(javascript): preserve exact static property keys #5769

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/3480
Author: @ShuaixinHuang
Created: 10/14/2026
Status: ✅ Merged
Merged: 10/15/2026
Merged by: @baron

Base: main ← Head: codex/fix-electron-empty-option-keys


📝 Commits (3)

  • 8660ec5 fix(javascript): preserve Electron options with static empty keys
  • d7fe2a7 Merge commit '6060de329d' into codex/fix-static-member-keys
  • 0e71d24 fix(javascript): retain exact computed member keys

📊 Changes

7 files changed (+323 additions, -8 deletions)

View changed files

📝 src/domain/javascript/electronStaticAnalysisOptions.test.ts (+134 -0)
📝 src/domain/javascript/electronStaticAnalysisValues.ts (+2 -3)
📝 src/domain/javascript/javascriptSemanticAnalysis.member_depth.test.ts (+8 -0)
📝 src/domain/javascript/javascriptStaticAnalysisCalleeBoundary.test.ts (+167 -0)
📝 src/domain/javascript/javascriptStaticAnalysisHelpers.ts (+2 -5)
📝 src/domain/javascript/javascriptStaticPathResolution.test.ts (+8 -0)
📝 tests/boundary/filesystem/javascript-applications/javascriptApplicationTemplateLiterals.test.ts (+2 -0)

📄 Description

Summary

Preserve exact static property keys across Electron option lookup and callee-name consumers. Both consumers previously reinterpreted Babel node types after the shared semantic key owner had already established an exact key.

Problem and expected behavior

  • A later unrelated empty template or TypeScript-wrapped key makes known Electron preload/service-name options appear dynamic. An empty key cannot override webPreferences, preload, or serviceName.
  • path[`join`](__dirname, "preload.js") loses the known preload/utility path; client[`get`]("/api/items") loses its endpoint while reporting complete parsing. Equivalent quoted keys work. TypeScript-wrapped method keys have the same defect.

No separate issue was opened: these are reproduced residual consumer defects, distinct from the preference projection already adopted from #3105. The related correction stays in this PR as required by the contribution guidelines.

Change and scope

Use the existing semanticStaticPropertyKey result in both consumers. Preserve "" as a legal key; only null denotes an unknown key. Keep reverse-order option overrides and computed-member placeholders for genuine dynamic, interpolated, and invalid-cooked keys. This removes both raw-node type exceptions.

Seven files; two small production changes. Existing syntax-based path/endpoint classification remains an inference and does not establish function identity. No CLI/MCP schema, provider, authority, dependency, generated metadata, or release changes. This is an ordinary inert static-analysis correction; no separate advance scope decision applies.

Expected effects:

  • Read existing files or captured data.

Evidence and validation

Windows, pinned Node 24.18.0/npm 11.16.0, locked dependencies; synchronized with main 6060de329de9f3636f63e24a2419847fd9d3f889. Final head: 0e71d24359b47ffafb0ddd5f10afe9ac2f4512ba.

  • Original empty-option-key baseline on unmodified main 92a0edf: 6 failed, 14 passed; fixed options file: 20 passed.
  • Final callee/path/depth regressions against the unchanged callee producer at synchronization commit d7fe2a71c1c75fd36768ae0e311537f71aa4c55a: 10 failed, 84 passed. With the producer correction: 94 passed. The final tests were rerun against that baseline, including the endpoint candidate/exclusion controls.
  • npm run test:local -- selecting those three files, seven existing Electron files, RPC/beacon, and web-bundle coverage: 508 passed in 13 files. Assertions include exact preload/utility values and contexts, endpoint values/mechanisms, legal empty/BigInt keys, 12,000-member depth, dynamic/parser-error retention, and configuration/collection exclusions.
  • npm run check: all 6 tasks, module boundaries, and architecture guards passed; lint 0 errors, 1,384 warnings. git diff --check passed.
  • Added two cases to the existing application-graph template suite. npm run test:focused -- tests/boundary/filesystem/javascript-applications/javascriptApplicationTemplateLiterals.test.ts: runtime preparation succeeded; exit 1, all 7 cases failed before semantic assertions, because this Windows checkout lacks native/windows/build/manifest.json. This is unavailable local boundary coverage, not a semantic failure reproduction or a passing graph result. No native mock or authority workaround was used.

The prior published head 8660ec5 passed its CI workflow. Greptile has re-reviewed the current 0e71d24 head at 5/5 with no actionable finding. The current-head CI run is still running; supported-host graph coverage remains pending. Public CLI/MCP, supervised worker, and live Electron coverage remain unverified locally; source tests parse inert code.

Author readiness

Human owner: @ShuaixinHuang

  • 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

  • This PR addresses a concrete problem and has one focused outcome.
  • Tests cover changed behavior and meaningful uncertainty paths.
  • Contract and generated metadata changes are not needed.
  • Human initial-readiness declaration is complete.
  • Supported-host application-graph regressions and required current-head CI checks pass.
  • PR readiness publishes a confirmed head status.

🔄 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/3480 **Author:** [@ShuaixinHuang](https://github.com/ShuaixinHuang) **Created:** 10/14/2026 **Status:** ✅ Merged **Merged:** 10/15/2026 **Merged by:** [@baron](https://github.com/baron) **Base:** `main` ← **Head:** `codex/fix-electron-empty-option-keys` --- ### 📝 Commits (3) - [`8660ec5`](https://github.com/morluto/rea/commit/8660ec55ad5c8833ba68af4d21dc4cdfc894578c) fix(javascript): preserve Electron options with static empty keys - [`d7fe2a7`](https://github.com/morluto/rea/commit/d7fe2a71c1c75fd36768ae0e311537f71aa4c55a) Merge commit '6060de329de9f3636f63e24a2419847fd9d3f889' into codex/fix-static-member-keys - [`0e71d24`](https://github.com/morluto/rea/commit/0e71d24359b47ffafb0ddd5f10afe9ac2f4512ba) fix(javascript): retain exact computed member keys ### 📊 Changes **7 files changed** (+323 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `src/domain/javascript/electronStaticAnalysisOptions.test.ts` (+134 -0) 📝 `src/domain/javascript/electronStaticAnalysisValues.ts` (+2 -3) 📝 `src/domain/javascript/javascriptSemanticAnalysis.member_depth.test.ts` (+8 -0) 📝 `src/domain/javascript/javascriptStaticAnalysisCalleeBoundary.test.ts` (+167 -0) 📝 `src/domain/javascript/javascriptStaticAnalysisHelpers.ts` (+2 -5) 📝 `src/domain/javascript/javascriptStaticPathResolution.test.ts` (+8 -0) 📝 `tests/boundary/filesystem/javascript-applications/javascriptApplicationTemplateLiterals.test.ts` (+2 -0) </details> ### 📄 Description ## Summary Preserve exact static property keys across Electron option lookup and callee-name consumers. Both consumers previously reinterpreted Babel node types after the shared semantic key owner had already established an exact key. ## Problem and expected behavior - A later unrelated empty template or TypeScript-wrapped key makes known Electron preload/service-name options appear dynamic. An empty key cannot override `webPreferences`, `preload`, or `serviceName`. - ``path[`join`](__dirname, "preload.js")`` loses the known preload/utility path; ``client[`get`]("/api/items")`` loses its endpoint while reporting complete parsing. Equivalent quoted keys work. TypeScript-wrapped method keys have the same defect. No separate issue was opened: these are reproduced residual consumer defects, distinct from the preference projection already adopted from #3105. The related correction stays in this PR as required by the contribution guidelines. ## Change and scope Use the existing `semanticStaticPropertyKey` result in both consumers. Preserve `""` as a legal key; only `null` denotes an unknown key. Keep reverse-order option overrides and computed-member placeholders for genuine dynamic, interpolated, and invalid-cooked keys. This removes both raw-node type exceptions. Seven files; two small production changes. Existing syntax-based path/endpoint classification remains an inference and does not establish function identity. No CLI/MCP schema, provider, authority, dependency, generated metadata, or release changes. This is an ordinary inert static-analysis correction; no separate advance scope decision applies. Expected effects: - [x] Read existing files or captured data. ## Evidence and validation Windows, pinned Node 24.18.0/npm 11.16.0, locked dependencies; synchronized with main `6060de329de9f3636f63e24a2419847fd9d3f889`. Final head: `0e71d24359b47ffafb0ddd5f10afe9ac2f4512ba`. - Original empty-option-key baseline on unmodified main `92a0edf`: **6 failed, 14 passed**; fixed options file: **20 passed**. - Final callee/path/depth regressions against the unchanged callee producer at synchronization commit `d7fe2a71c1c75fd36768ae0e311537f71aa4c55a`: **10 failed, 84 passed**. With the producer correction: **94 passed**. The final tests were rerun against that baseline, including the endpoint candidate/exclusion controls. - `npm run test:local --` selecting those three files, seven existing Electron files, RPC/beacon, and web-bundle coverage: **508 passed in 13 files**. Assertions include exact preload/utility values and contexts, endpoint values/mechanisms, legal empty/BigInt keys, 12,000-member depth, dynamic/parser-error retention, and configuration/collection exclusions. - `npm run check`: **all 6 tasks, module boundaries, and architecture guards passed**; lint **0 errors, 1,384 warnings**. `git diff --check` passed. - Added two cases to the existing application-graph template suite. `npm run test:focused -- tests/boundary/filesystem/javascript-applications/javascriptApplicationTemplateLiterals.test.ts`: runtime preparation succeeded; **exit 1, all 7 cases failed before semantic assertions**, because this Windows checkout lacks `native/windows/build/manifest.json`. This is unavailable local boundary coverage, not a semantic failure reproduction or a passing graph result. No native mock or authority workaround was used. The prior published head `8660ec5` passed its [CI workflow](https://github.com/morluto/rea/actions/runs/38565746745). Greptile has re-reviewed the current `0e71d24` head at [5/5 with no actionable finding](https://github.com/morluto/rea/pull/3480#issuecomment-6168816375). The [current-head CI run](https://github.com/morluto/rea/actions/runs/38579806349) is still running; supported-host graph coverage remains pending. Public CLI/MCP, supervised worker, and live Electron coverage remain unverified locally; source tests parse inert code. ## Author readiness Human owner: @ShuaixinHuang - [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. ## Before merge - [x] This PR addresses a concrete problem and has one focused outcome. - [x] Tests cover changed behavior and meaningful uncertainty paths. - [x] Contract and generated metadata changes are not needed. - [x] Human initial-readiness declaration is complete. - [ ] Supported-host application-graph regressions and required current-head CI checks pass. - [ ] PR readiness publishes a confirmed head status. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-31 01:09:17 +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#5769
No description provided.