Skip to content

policy: json_int53.t27 -- a 64-bit integer does not travel as a bare JSON number (Closes #10437) - #10438

Merged
gHashTag merged 1 commit into
masterfrom
claude/dreamy-cohen-3ff665
Oct 18, 2026
Merged

gHashTag merged 1 commit into
masterfrom
claude/dreamy-cohen-3ff665

Conversation

@gHashTag

Copy link
Copy Markdown
Owner

Closes #10437

A JavaScript reader turns every JSON number into an f64, so an integer above 2^53 - 1 comes back rounded and nothing throws. Idea taken from morluto/rea 6.6.0, which fixed the same defect three times.

What lands

  • specs/policy/json_int53.t27 (module PolicyJsonInt53): the rule (a 64-bit or wider integer is a decimal or 0x-hex string, or carries a proof of at most 2^53 - 1), the negative control (9007199254740993 reads as 9007199254740992; NaN payload 0x7FF8000000000001 reads as 0x7FF8000000000000), and a scanner that finds bare integers above 2^53 - 1 in a JSON buffer by comparing digits as text, so it uses no rounding number type.
  • gen/c/policy/json_int53.c and .trinity/seals/policy_PolicyJsonInt53.json, produced by gen-c and seal on the Railway lab.
  • docs/reports/2026-10-18-json-int53-measured.md: the measured list.

Measured

  • 35 (file, field) pairs in 32 committed JSON files carry 2225 bare integers above 2^53 - 1: 31 conformance/vectors/*.json files (one field, gf256 bits, holds 2018 of them) plus the deliberate 2^53 boundary id in conformance/tmem_bridge.json.
  • 121 export const lines that gen-js prints as bare number literals above 2^53 - 1, from 53 specs, including SUPPLY_NGONKA = 446378386939836973.
  • Safe: seals, test-report counts, the tmem_bridge ids exactly on the bound.
  • Unknown (not in this repo): t27-mcp live results, trinity consumers, corpus receipts on Railway volumes.

Not fixed here

No writer can be fixed without foreign code: the vector generators are hand-written Python, and gen-js / gen-ts are Rust. Follow-ups are listed in the issue: port the generators to .t27 emitting string spellings; make gen-js / gen-ts print BigInt or string for constants above 2^53 - 1 (needs owner-approved-foreign); a CI gate that runs the scanner over tracked JSON.

Verification

test-report on the Railway lab: 16 of 16 pass, 0 vacuous passes, every test's runtime assert count above 0. Scanner test lengths come from .len, not hand counts.

🤖 Generated with Claude Code

…JSON number; negative control, scanner, measured list (Closes #10437)

A JS reader rounds every JSON integer above 2^53 - 1: 9007199254740993 reads
as 9007199254740992. The spec states the rule (string, or a 53-bit proof),
carries the negative control and a digit-text scanner (16 tests, 0 vacuous on
the lab). The measured report lists 35 (file, field) pairs in 32 JSON files
and 121 gen-js literals from 53 specs; writers are follow-ups (Python
generators to .t27, gen-js BigInt needing owner-approved-foreign).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-18 11:51:15 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 50
PRs with All Checks Green 0
READY 0
FAILING 50
PENDING 0
NO CHECKS YET 0

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=fad12492937a != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

JSON integers above 2^53 - 1: a 64-bit value must travel as a string (rule, scanner, measured list)

1 participant