schema: pin the 64-bit bounds at the precision a validator has #230
No reviewers
Labels
No labels
priority/P0
priority/P1
priority/P2
release/v0.1.0
status/blocked
status/planned
type/bug
type/design
type/test-gap
type/tracker
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
natsukium/felis!230
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-179"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The integer-bounds fixtures claimed to pin the 64-bit boundary but never came near it:
out-check-errors-above-u64carried ~1e20, four orders of magnitude past
u64::MAX, so it would have passed against a bound wrong by nearly anyamount. The boundary cannot be pinned exactly —
i64::MAXandu64::MAXare not representable asf64, and a stockvalidator (boon included) compares JSON numbers as
f64, so it admits everything within onef64step of the bound.This moves the fixtures to the first value past that step, the closest a validator can reject, adds the signed twin
that was missing, and pins the remaining gap as its own test so a future validator that closes it fails loudly instead
of leaving the fixtures quietly over-strict. The published bounds stay exact rather than narrowing to what a validator
can enforce (narrowing would reject counts the daemon really emits);
x-bound-exceeds-f64-precisiondiscloses the gapthe same way
x-max-utf8-bytesdiscloses the id byte limit.out-check-errors-above-u64.jsonnow carries18446744073709555712(2^64 + 4096, the firstf64above the bound)against its exact-
u64::MAXtwin; newout-capture-row-above-i64.jsondoes the same forCaptureRow.rowwith9223372036854777856(2^63 + 2048) against exacti64::MAX.a_64_bit_bound_is_enforced_only_to_f64_precisionpins all three points per sign: the exact maximum validates, onepast it still validates (the limitation), the next representable
f64is rejected.int64/uint64field in both published schemas gainedx-bound-exceeds-f64-precision; the hand-composedcount,exit_codeanddroppedenvelope fields moved to theformatannotation their generated siblings alreadycarried, so the bound and the disclosure have one source.
docs/reference/cli.md"JSON Schema" states the gap and the annotation,docs/reference/testing.mdand thefixture README say why the fixtures sit where they do, and
control-surfaces.mdrecords why the bound is publishedexact rather than narrowed. CHANGELOG under Unreleased, since the annotation is part of the published surface.
Fixes #179
948bb77283b9631297b5