Repository navigation
Description
Finding (from PR review)
The fuzz campaign's numeric invariants convert record values through f64, silently losing integer precision above 2^53 — so a violated numeric_order or numeric_bounds invariant can pass. Records stores serde_json::Value, which preserves these integers exactly; the loss happens only in the campaign's comparison helper.
Codex raised this on PR #8635 (feat(id): deterministic fuzz for id world dev (#5541 phase 4)):
- Source PR: feat(id): deterministic fuzz for id world dev (#5541 phase 4) #8635
- Comment: feat(id): deterministic fuzz for id world dev (#5541 phase 4) #8635 (comment) (chatgpt-codex-connector[bot], 2026-11-11T10:02:35Z, P2)
- File:line at review time:
pkgs/id/src/world_dev.rs:625
Essence of the comment: with first = 9007199254740993 and second = 9007199254740992, numeric_order sees equal values after conversion although first > second; a numeric maximum of 9007199254740992 similarly fails to reject the larger integer. Preserve integer precision during comparisons, or explicitly reject values and bounds that cannot be checked exactly rather than reporting success.
No-response evidence
- PR feat(id): deterministic fuzz for id world dev (#5541 phase 4) #8635 merged at 2026-11-11T10:00:58Z (merge commit b369657); the Codex comments were posted at 2026-11-11T10:02:35Z on the merged head 724cf67, and no reply of any kind follows them (fresh
gh apire-read 2026-11-11T18:03Z: the PR has exactly 3 inline comments, all Codex, none within_reply_to_id). - GraphQL
reviewThreadscheck (2026-11-11): all 3 threads on PR feat(id): deterministic fuzz for id world dev (#5541 phase 4) #8635 are unresolved. - No open or closed issue covers this finding (searched
world_dev/ fuzz /numeric_order/ f64 precision / PR feat(id): deterministic fuzz for id world dev (#5541 phase 4) #8635 on 2026-11-11: only the parent implementation issue id: implement id world dev authoring loop (design #558) #5541, which does not mention this defect).
Still-live evidence (current main, read 2026-11-11 via gh api, two reads)
pkgs/id/src/world_dev.rs on main:
fn numeric(...)(~lines 1378–1387) returnsvalue.as_f64()— aserde_jsoninteger above 2^53 is rounded at this conversion.FuzzInvariant::NumericOrder(~lines 1366–1375) compares the twof64results witha > b;NumericBounds(~lines 1351–1365) compares againstmin/max: Option<f64>. Equal-after-rounding values therefore pass both checks.
Acceptance criteria
- Numeric invariant comparisons are exact for integer record values (e.g. compare as
i64/u64/serde_json::Numberbefore any float conversion), or values/bounds that cannot be represented exactly are rejected as a campaign error rather than reported as passing — with regression tests at the 2^53 boundary (9007199254740993 vs 9007199254740992). - Or: resolve by a documented decision on this issue explaining why inexact comparison is acceptable for declared invariants.
Activity
developing-today commentedon Nov 11, 2026
CODE-2613
dezren39 commentedon Nov 11, 2026
🤖 Agent note · filed
dezren39 commentedon Nov 11, 2026
🤖 Agent note · picked up / triaged
pkgs/id/src/world_dev.rscompare record values throughf64, losing integer precision above 2^53.task/small-fix; prioritypriority/normal(Codex P2 on a merged PR, correctness of a declared-invariant checker, no production-path impact — normal fits); efforteffort/s;kind/bugalready present. First concrete step: replace thef64comparison path with exact numeric comparison (integer record values and integer bounds compared exactly as integers; non-integer values compared exactly against integer/float counterparts) and add regression tests at the 2^53 boundary.9 remaining items
fix(id): compare fuzz numeric invariants exactly, not through f64 (#8752
test(id): property coverage for the exact numeric comparator (#8752)
dezren39 commentedon Nov 11, 2026
🤖 Agent note · picked up (resume) / Codex finding dispositioned
dezren39 commentedon Nov 11, 2026
🤖 Agent note · done
dezren39 commentedon Nov 11, 2026
agent-note:v1
Agent: repo-worker-code / any-a
State: done (already_done)
Task: repo-queue task 15018 (triage follow-on of task 15005, enqueued 2026-11-11T19:55:59Z)
Evidence: the fix landed before this follow-on was claimed — PR #8755 MERGED 2026-11-11T19:53:53Z, merge commit 5a0b771; issue #8752 CLOSED 2026-11-11T19:53:55Z. Verified fresh on main by lane any-a: pkgs/id/src/world_dev.rs now compares via NumericValue::cmp_exact (integers exact, bounds as serde_json::Number; world_dev.rs:1385-1491). No duplicate work done.