Canonical JSON: numbers as ECMAScript writes them (jouleclaw-jcs), and the integer range (sandbox-attest) #313

Merged
dcharlot merged 4 commits from jouleclaw/jcs-ecmascript-numbers into main 2026-10-18 15:46:46 -04:00

2026-10-18

Transaction Science
ci: run the checks again (the macOS energy job ran out of disk on the runner's volume, before building anything of this change)
All checks were successful
jouleclaw public surface must stay documented / Public-surface audit (jouleclaw-rs) (pull_request) Successful in 1m8s
standards workspaces build + test / which workspaces this change touches (pull_request) Successful in 20s
repository checks / lockfiles, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Successful in 1m57s
standards workspaces build + test / joule-ui-rs (joule-ui/joule-ui-rs, joule-ui-rs, linux) (pull_request) Successful in 1m16s
standards workspaces build + test / jcp-rs (jcp-conformance, jcp/jcp-rs, -p jcp-energy --features nvml, jcp-rs, linux) (pull_request) Successful in 1m33s
standards workspaces build + test / proof-rs (proof-conformance, proof/proof-rs, proof-rs, linux, true) (pull_request) Successful in 1m29s
standards workspaces build + test / sandbox-rs (sandbox-conformance, sandbox/sandbox-rs, sandbox-rs, linux) (pull_request) Successful in 2m24s
standards workspaces build + test / joulecontract-rs (joulecontract/joulecontract-rs, joulecontract-rs, linux-arm64, true) (pull_request) Successful in 3m11s
standards workspaces build + test / joule-code-rs (joule-code/joule-code-rs, joule-code-rs, linux-arm64, true) (pull_request) Successful in 7m28s
standards workspaces build + test / mesh-rs (mesh/mesh-rs, -p mesh-engine-gguf -p mesh-openai --features mesh-engine-gguf/gguf,mesh-openai/server, mesh-rs, linux-arm64) (pull_request) Successful in 6m41s
standards workspaces build + test / jouleclaw-rs (-nodebug, jouleclaw/jouleclaw-rs, -p jouleclaw-energy --features rapl,nvml, jouleclaw-rs, linux-arm64, -C target-feature=+fp16) (pull_request) Successful in 11m56s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 12m38s
standards workspaces build + test / jouledesk-rs (jouledesk/jouledesk-rs, jouledesk-rs, macos) (pull_request) Successful in 4m26s
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 10:35:58 -04:00
Transaction Science
ci: run the checks again (the jcp-rs job lost its connection while downloading the Rust installer, before building anything)
Some checks failed
jouleclaw public surface must stay documented / Public-surface audit (jouleclaw-rs) (pull_request) Successful in 1m10s
repository checks / lockfiles, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Successful in 2m46s
standards workspaces build + test / which workspaces this change touches (pull_request) Successful in 28s
standards workspaces build + test / macOS energy backends (pull_request) Failing after 2m17s
standards workspaces build + test / jcp-rs (jcp-conformance, jcp/jcp-rs, -p jcp-energy --features nvml, jcp-rs, linux) (pull_request) Successful in 1m35s
standards workspaces build + test / jouledesk-rs (jouledesk/jouledesk-rs, jouledesk-rs, macos) (pull_request) Successful in 3m28s
standards workspaces build + test / joule-ui-rs (joule-ui/joule-ui-rs, joule-ui-rs, linux) (pull_request) Successful in 1m13s
standards workspaces build + test / proof-rs (proof-conformance, proof/proof-rs, proof-rs, linux, true) (pull_request) Successful in 1m29s
standards workspaces build + test / sandbox-rs (sandbox-conformance, sandbox/sandbox-rs, sandbox-rs, linux) (pull_request) Successful in 2m23s
standards workspaces build + test / joule-code-rs (joule-code/joule-code-rs, joule-code-rs, linux-arm64, true) (pull_request) Successful in 6m47s
standards workspaces build + test / joulecontract-rs (joulecontract/joulecontract-rs, joulecontract-rs, linux-arm64, true) (pull_request) Successful in 4m49s
standards workspaces build + test / jouleclaw-rs (-nodebug, jouleclaw/jouleclaw-rs, -p jouleclaw-energy --features rapl,nvml, jouleclaw-rs, linux-arm64, -C target-feature=+fp16) (pull_request) Successful in 9m15s
standards workspaces build + test / mesh-rs (mesh/mesh-rs, -p mesh-engine-gguf -p mesh-openai --features mesh-engine-gguf/gguf,mesh-openai/server, mesh-rs, linux-arm64) (pull_request) Successful in 2m11s
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 07:20:24 -04:00
Transaction Science
sandbox: the attestation's JCS form refuses integers past +-(2^53 - 1), as RFC 8785 and SPEC §4's byte-identical rule require
Some checks failed
repository checks / lockfiles, tests in CI, workflow hygiene, spec and section references, public text (pull_request) Successful in 54s
standards workspaces build + test / which workspaces this change touches (pull_request) Successful in 5s
standards workspaces build + test / joulecontract-rs (joulecontract/joulecontract-rs, joulecontract-rs, linux-arm64, true) (pull_request) Successful in 1m11s
standards workspaces build + test / joule-code-rs (joule-code/joule-code-rs, joule-code-rs, linux-arm64, true) (pull_request) Successful in 1m49s
jouleclaw public surface must stay documented / Public-surface audit (jouleclaw-rs) (pull_request) Successful in 1m3s
standards workspaces build + test / jouleclaw-rs (-nodebug, jouleclaw/jouleclaw-rs, -p jouleclaw-energy --features rapl,nvml, jouleclaw-rs, linux-arm64, -C target-feature=+fp16) (pull_request) Successful in 2m35s
standards workspaces build + test / mesh-rs (mesh/mesh-rs, -p mesh-engine-gguf -p mesh-openai --features mesh-engine-gguf/gguf,mesh-openai/server, mesh-rs, linux-arm64) (pull_request) Successful in 54s
standards workspaces build + test / macOS energy backends (pull_request) Successful in 5m44s
standards workspaces build + test / jouledesk-rs (jouledesk/jouledesk-rs, jouledesk-rs, macos) (pull_request) Successful in 1m19s
standards workspaces build + test / jcp-rs (jcp-conformance, jcp/jcp-rs, -p jcp-energy --features nvml, jcp-rs, linux) (pull_request) Failing after 11s
standards workspaces build + test / joule-ui-rs (joule-ui/joule-ui-rs, joule-ui-rs, linux) (pull_request) Successful in 1m10s
standards workspaces build + test / proof-rs (proof-conformance, proof/proof-rs, proof-rs, linux, true) (pull_request) Successful in 1m28s
standards workspaces build + test / sandbox-rs (sandbox-conformance, sandbox/sandbox-rs, sandbox-rs, linux) (pull_request) Successful in 2m15s
RFC 8785 holds numbers as IEEE-754 doubles (I-JSON, RFC 7493 §2.2). A
larger integer was written verbatim, which an implementation that reads it
as a double writes differently, so the encoding was not byte-identical
across platforms as SPEC §4 requires. SPEC §4 now says so, and the writer
refuses such a core (IntegerOutOfRange). No current core holds one: times
are microseconds and energies microjoules, both far below 2^53. Also a
manual is_multiple_of that clippy flags.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 02:37:16 -04:00
Transaction Science
jouleclaw-jcs: numbers as ECMAScript writes them, as RFC 8785 requires
The writer laid numbers out as ryu does, which is not ECMA-262's
Number::toString: 0.000001 came out as 1e-6, 1e16 as 1e16, 1.5e-5 as
1.5e-5, and integers past 2^53 verbatim, so a JCS text from this crate
could not be reproduced by any other RFC 8785 implementation. Every number
is now the double it reads as, written with the fewest digits that read
back (the nearest of those, a tie going to the even: RFC 8785's
1424953923781206.25 is ...6.2), in plain decimals from 1e-6 up to 1e21 and
in exponent form outside. An integer past +-(2^53 - 1), which a double
cannot hold, is UnrepresentableNumber. Checked against RFC 8785's appendix
B and 3,385 vectors written by a JavaScript engine. ryu is no longer a
dependency.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 02:37:16 -04:00