[PR #764] [MERGED] fix(semantics): preserve empty string property keys #2225

Closed
opened 2026-10-16 21:15:57 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/empty-property-semantic-keys-20261006


📝 Commits (1)

  • b453a6c fix(semantics): preserve empty string property keys

📊 Changes

11 files changed (+149 additions, -33 deletions)

View changed files

📝 src/application/JavaScriptSemanticGraphBuilder.test.ts (+39 -0)
📝 src/application/JavaScriptSemanticGraphValueProjection.ts (+1 -1)
📝 src/domain/javascriptAstValues.ts (+11 -4)
➕ src/domain/javascriptSemanticAnalysis.empty_keys.test.ts (+33 -0)
📝 src/domain/javascriptSemanticAnalysis.ts (+3 -6)
📝 src/domain/javascriptSemanticCalls.ts (+3 -3)
📝 src/domain/javascriptSemanticDataEffectHelpers.ts (+7 -5)
📝 src/domain/javascriptSemanticObjects.ts (+5 -5)
📝 src/domain/javascriptSemanticProjection.ts (+9 -4)
📝 src/domain/javascriptSemanticValues.ts (+5 -5)
📝 tests/acceptance/applications/applicationWorkflowCli.test.ts (+33 -0)

📄 Description

Summary

Analyze legal empty-string dictionary keys without treating them as dynamic or rejecting the graph display label. A root-route dictionary such as const routes = {'': 'HOME'} previously caused analyze-javascript-application to return unreadable_output with /label (too_small). Member reads and destructuring also lost the exact HOME value.

Use a nullable exact key for semantic value, object, projection and frontier recovery, preserving '' distinctly from an unknown key. Keep the legacy name helper's behavior for its existing consumers. Display the empty property slot as "" while retaining the raw key and source identity. Dynamic identifier keys remain unknown; schemas are unchanged.

Verification

  • Native JavaScript returns HOME for member read and destructuring; built public CLI previously failed both and now succeeds with an exact HOME literal for root.
  • Nonempty-key control remains unchanged.
  • Upstream regression attempt: 6 fail, 9 pass. Final relevant semantic/graph/application/CLI suites: 244 pass across 14 files.
  • npm run build:cached, npm run check, npm run check:fast pass (125 lint warnings, zero errors).
  • Test temporary directories use the repository's awaited lifecycle helper.
  • No real Hopper/Ghidra/IDA verification performed: this changes inert JavaScript analysis only.

Codex assisted on behalf of @rudycelekli. The signed DCO source received independent review before publication. Hosted CI is tracked separately.

Follow-up scope

This fix covers the tested property-read, destructuring, slot-identity, and display-label paths. Remaining configuration, method-name, provenance, and effect consumers of the legacy property-name helper are tracked in #783; their migration and API-name controls are separate follow-up work.


🔄 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/764 **Author:** [@rudycelekli](https://github.com/rudycelekli) **Created:** 10/6/2026 **Status:** ✅ Merged **Merged:** 10/7/2026 **Merged by:** [@N0zoM1z0](https://github.com/N0zoM1z0) **Base:** `main` ← **Head:** `fix/empty-property-semantic-keys-20261006` --- ### 📝 Commits (1) - [`b453a6c`](https://github.com/morluto/rea/commit/b453a6cc68cc072acf93486c477783d42b790c06) fix(semantics): preserve empty string property keys ### 📊 Changes **11 files changed** (+149 additions, -33 deletions) <details> <summary>View changed files</summary> 📝 `src/application/JavaScriptSemanticGraphBuilder.test.ts` (+39 -0) 📝 `src/application/JavaScriptSemanticGraphValueProjection.ts` (+1 -1) 📝 `src/domain/javascriptAstValues.ts` (+11 -4) ➕ `src/domain/javascriptSemanticAnalysis.empty_keys.test.ts` (+33 -0) 📝 `src/domain/javascriptSemanticAnalysis.ts` (+3 -6) 📝 `src/domain/javascriptSemanticCalls.ts` (+3 -3) 📝 `src/domain/javascriptSemanticDataEffectHelpers.ts` (+7 -5) 📝 `src/domain/javascriptSemanticObjects.ts` (+5 -5) 📝 `src/domain/javascriptSemanticProjection.ts` (+9 -4) 📝 `src/domain/javascriptSemanticValues.ts` (+5 -5) 📝 `tests/acceptance/applications/applicationWorkflowCli.test.ts` (+33 -0) </details> ### 📄 Description ## Summary Analyze legal empty-string dictionary keys without treating them as dynamic or rejecting the graph display label. A root-route dictionary such as `const routes = {'': 'HOME'}` previously caused `analyze-javascript-application` to return `unreadable_output` with `/label (too_small)`. Member reads and destructuring also lost the exact HOME value. Use a nullable exact key for semantic value, object, projection and frontier recovery, preserving `''` distinctly from an unknown key. Keep the legacy name helper's behavior for its existing consumers. Display the empty property slot as `""` while retaining the raw key and source identity. Dynamic identifier keys remain unknown; schemas are unchanged. ## Verification - Native JavaScript returns HOME for member read and destructuring; built public CLI previously failed both and now succeeds with an exact HOME literal for `root`. - Nonempty-key control remains unchanged. - Upstream regression attempt: 6 fail, 9 pass. Final relevant semantic/graph/application/CLI suites: 244 pass across 14 files. - `npm run build:cached`, `npm run check`, `npm run check:fast` pass (125 lint warnings, zero errors). - Test temporary directories use the repository's awaited lifecycle helper. - No real Hopper/Ghidra/IDA verification performed: this changes inert JavaScript analysis only. Codex assisted on behalf of @rudycelekli. The signed DCO source received independent review before publication. Hosted CI is tracked separately. ## Follow-up scope This fix covers the tested property-read, destructuring, slot-identity, and display-label paths. Remaining configuration, method-name, provenance, and effect consumers of the legacy property-name helper are tracked in #783; their migration and API-name controls are separate follow-up work. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-16 21:15:57 +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#2225
No description provided.