[PR #1326] [CLOSED] fix(javascript): avoid positive-zero evidence for signed zero #2803

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

📋 Pull Request Information

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

Base: main ← Head: fix/javascript-negative-zero-evidence


📝 Commits (1)

  • e1d2e68 fix(javascript): avoid positive-zero evidence for signed zero

📊 Changes

4 files changed (+70 additions, -1 deletions)

View changed files

➕ src/application/javascript/JavaScriptApplicationSignedZero.test.ts (+26 -0)
➕ src/domain/javascript/javascriptSemanticAnalysis.signed_zero.test.ts (+35 -0)
📝 src/domain/javascript/javascriptSemanticPrimitives.ts (+5 -0)
📝 src/domain/javascript/javascriptSemanticValues.ts (+4 -1)

📄 Description

JavaScript distinguishes negative zero from positive zero, but the JSON primitive evidence lattice cannot preserve its sign. Set deduplication and serialization currently turn export const value = -0 into positive-zero certainty. Treat negative-zero results as unknown before deduplication and normalize numeric literals through the same primitive boundary. Controls retain ordinary zero, negative integers, and the string "-0".

Validation: public application and semantic regressions fail on the exact baseline (6 failures, 5 controls pass). The fixed regressions pass all 11 tests, with 142 tests passing across 10 affected suites. npm run check succeeds across 6 tasks and whitespace checks pass. Tests use inert source and owned temporary fixtures; no provider or full repository suite claim. Prepared with AI assistance.


🔄 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/1326 **Author:** [@rudycelekli](https://github.com/rudycelekli) **Created:** 10/9/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/javascript-negative-zero-evidence` --- ### 📝 Commits (1) - [`e1d2e68`](https://github.com/morluto/rea/commit/e1d2e68d3cfcf37b3a923824b3768fd00d00eca1) fix(javascript): avoid positive-zero evidence for signed zero ### 📊 Changes **4 files changed** (+70 additions, -1 deletions) <details> <summary>View changed files</summary> ➕ `src/application/javascript/JavaScriptApplicationSignedZero.test.ts` (+26 -0) ➕ `src/domain/javascript/javascriptSemanticAnalysis.signed_zero.test.ts` (+35 -0) 📝 `src/domain/javascript/javascriptSemanticPrimitives.ts` (+5 -0) 📝 `src/domain/javascript/javascriptSemanticValues.ts` (+4 -1) </details> ### 📄 Description JavaScript distinguishes negative zero from positive zero, but the JSON primitive evidence lattice cannot preserve its sign. Set deduplication and serialization currently turn `export const value = -0` into positive-zero certainty. Treat negative-zero results as unknown before deduplication and normalize numeric literals through the same primitive boundary. Controls retain ordinary zero, negative integers, and the string "-0". Validation: public application and semantic regressions fail on the exact baseline (6 failures, 5 controls pass). The fixed regressions pass all 11 tests, with 142 tests passing across 10 affected suites. `npm run check` succeeds across 6 tasks and whitespace checks pass. Tests use inert source and owned temporary fixtures; no provider or full repository suite claim. Prepared with AI assistance. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-17 21:10:26 +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#2803
No description provided.