[PR #673] [CLOSED] fix(javascript): keep nonfinite values outside JSON lattice #2156

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

📋 Pull Request Information

Original PR: https://github.com/morluto/rea/pull/673
Author: @rudycelekli
Created: 10/6/2026
Status: ❌ Closed

Base: main ← Head: fix/rea-nonfinite-values-20261006


📝 Commits (1)

  • 3d9a92f fix(javascript): keep nonfinite values outside JSON lattice

📊 Changes

2 files changed (+25 additions, -1 deletions)

View changed files

📝 src/domain/javascriptSemanticAnalysis.dataflow.test.ts (+16 -0)
📝 src/domain/javascriptSemanticPrimitives.ts (+9 -1)

📄 Description

What changed

Keep nonfinite numbers outside the JSON-compatible static value lattice. NaN/Infinity expression results become unknown, and nonfinite numeric literals are not promoted to exact JSON primitives. A candidate set containing an unsupported number remains unknown instead of discarding that branch.

Real application reproduction

A real owned main.mjs with +"not-a-number", 1e308 + 1e308, or 1e309 previously caused the complete built public analyzeJavaScriptApplication workflow to return AnalysisProtocolError while validating its semantic graph. The repaired workflow succeeds, preserves those values as unknown, and keeps the unrelated finite 1 + 2 literal as 3. A separate native Node classification confirms NaN/positive Infinity; JSON's serialization of those numbers as null is not treated as evidence that their values are null.

Verification

  • Five new nonfinite/uncertain-branch regression cases fail before.
  • Focused dataflow + graph tests: 28 passed after.
  • npm run check, npm run check:fast, npm run build:cached passed.
  • Built public analysis: no protocol error; unsupported values have no exact graph literal; finite control preserved.
  • Native Node classification and git diff --check passed.

No new tool/schema or provider authority. Hopper/Ghidra were not exercised: this changes static JavaScript value normalization. AI assistance was used for investigation, implementation and verification.


🔄 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/673 **Author:** [@rudycelekli](https://github.com/rudycelekli) **Created:** 10/6/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/rea-nonfinite-values-20261006` --- ### 📝 Commits (1) - [`3d9a92f`](https://github.com/morluto/rea/commit/3d9a92ffb95b4e2390cf66589c046d376161e4fb) fix(javascript): keep nonfinite values outside JSON lattice ### 📊 Changes **2 files changed** (+25 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/domain/javascriptSemanticAnalysis.dataflow.test.ts` (+16 -0) 📝 `src/domain/javascriptSemanticPrimitives.ts` (+9 -1) </details> ### 📄 Description ## What changed Keep nonfinite numbers outside the JSON-compatible static value lattice. NaN/Infinity expression results become unknown, and nonfinite numeric literals are not promoted to exact JSON primitives. A candidate set containing an unsupported number remains unknown instead of discarding that branch. ## Real application reproduction A real owned `main.mjs` with `+"not-a-number"`, `1e308 + 1e308`, or `1e309` previously caused the complete built public `analyzeJavaScriptApplication` workflow to return `AnalysisProtocolError` while validating its semantic graph. The repaired workflow succeeds, preserves those values as unknown, and keeps the unrelated finite `1 + 2` literal as 3. A separate native Node classification confirms NaN/positive Infinity; JSON's serialization of those numbers as null is not treated as evidence that their values are null. ## Verification - Five new nonfinite/uncertain-branch regression cases fail before. - Focused dataflow + graph tests: 28 passed after. - `npm run check`, `npm run check:fast`, `npm run build:cached` passed. - Built public analysis: no protocol error; unsupported values have no exact graph literal; finite control preserved. - Native Node classification and `git diff --check` passed. No new tool/schema or provider authority. Hopper/Ghidra were not exercised: this changes static JavaScript value normalization. AI assistance was used for investigation, implementation and verification. --- <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:00 +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#2156
No description provided.