#1 [high] PR #461 scope and net diff
PR #461 (jcartu, open, pr/strict-numeric-bounds, head e831b4966e) = 2 files, +39 -14:
- docs/api.md: qualifies named selection (docs/api.md:522-525) and required mode (docs/api.md:541-549) that a strict function still attaches the grammar; adds a range-bounds precision paragraph (docs/api.md:605-612); restates const/enum <2^53 rule (docs/api.md:599-603).
- helios/src/grammar/strict.rs: adds test
strict_integer_maxima_preserve_large_inclusive_endpoints(lines 3888-3898): maximum 10^18 and i64::MAX accepted at endpoint, successor rejected. Branch history: a640a302 added a >=2^53 rejection for minimum/maximum/exclusiveMinimum/exclusiveMaximum, e831b496 reverted it (subject "Preserve admission for large strict numeric bounds"). No admission/decoding code changes remain, so the description's "no new HTTP 400" claim is verifiable. Basis: reviewer yatesdr (CHANGES_REQUESTED 2026-11-23) offered exactly this alternative: "Or leave admission as it is and document the limit, which docs/api.md now states." Also closes #418 round-4 review item 2 (two contradicting sentences).
#2 [high] Verified llguidance 1.9.1 rounding mechanics
helios/Cargo.toml:62 pins llguidance =1.9.1. Source (docs.rs/llguidance/1.9.1):
- json/schema.rs:901-965 compile_numeric: minimum/maximum/exclusiveMinimum/exclusiveMaximum all via Value::as_f64 (binary64), no exactness check.
- json/numeric.rs:509-534 normalize_integer_bounds: exclusive min -> min_val + 1.0, inclusive min -> ceil, inclusive max -> floor, exclusive max -> max_val - 1.0, then cast as i64.
- json/numeric.rs:87-191 rx_int_range builds an inclusive integer regex range. Confirmed: exclusiveMinimum 9007199254740992 -> +1.0 rounds to 2^53 -> endpoint admitted (doc example correct). minimum 9007199254740993 -> as_f64 = 2^53 -> admits 9007199254740992 (doc example correct). NEW FINDING (not in docs): inclusive maximum also widens above 2^53. maximum 9007199254740995 (>2^53, odd) -> as_f64 ties-to-even = 9007199254740996 -> floor = that -> the grammar admits 9007199254740996, which violates the declared bound. So docs/api.md:610-611 ("An inclusive maximum ... does distinguish the endpoint from the next integer") is true only for the exact-2^53 example; a reader can infer inclusive maxima are safe above 2^53. Also from reviewer table (main 6d6fe0c6): minimum -9223372036854775808 on integer and minimum 2^60 on number are refused by llguidance outright (rx_int_range/num_digits: n.abs() and "9".repeat(...).parse::() fail), i.e. valid client schemas still get HTTP 400; the new paragraph does not mention that class.
#3 [high] Findings: doc accuracy gaps, test value, charter fit
- docs/api.md:610-611 "An inclusive
maximum: 9007199254740992does distinguish the endpoint from the next integer." True for 2^53 only. For any inclusive maximum M above 2^53, the grammar admits floor(f64(M)) (normalize_integer_bounds, numeric.rs:522-533, then inclusive rx_int_range): M=9007199254740995 -> f64 ties-to-even 9007199254740996 -> admits 9007199254740996 (one ABOVE the declared bound); M=9007199254740993 -> f64 ...992 -> rejects the valid ...993. So inclusive maxima are wrong in both directions above 2^53, and the sentence gives false comfort. No test covers this (new test only covers 10^18 and i64::MAX, both exact/saturating). Fix = one sentence. - Some valid large bounds are refused outright by llguidance (reviewer table on main 6d6fe0c6: integer minimum -9223372036854775808, number minimum 2^60 -> range error -> HTTP 400). Source trace agrees: rx_int_range(Some(i64::MIN), Some(-1)) computes -left (overflow) and then errors "Invalid range"; rx_float_range parses integer parts with parse::() which fails above i64::MAX. i64::MIN is a standard generated int64 bound, so the docs paragraph should say bounds can also be rejected, not only rounded. The rounding paragraph says nothing about the 400 class, so a client cannot tell the two apart.
- Test
strict_integer_maxima_preserve_large_inclusive_endpoints(strict.rs:3888-3898): 10^18 is exactly representable (5^18 < 2^53) so exact; i64::MAX passes only because f64 2^63 saturates to i64::MAX on theas i64cast. Real but accidental; it is a useful executable spec for a pinned dependency (=1.9.1, helios/Cargo.toml:62). Partial overlap with strict_bounds_do_not_round_integers_or_fractional_multiples (strict.rs:3006-3025) which already covers maximum 2^53; the new rows are the reviewer's table rows, so not a duplicate. - Consistency check passes: core-design.md:1669-1685 already states named selection "does not by itself enable a grammar" and required mode "Without a grammar it uses ordinary sampling" - so only api.md contradicted it, as #418 round-4 item 2 said.
- Charter fit: Standards "What gets merged" includes PRs that address a maintainer request or bad docs; this executes the reviewer's own offered alternative ("Or leave admission as it is and document the limit"). No runtime/perf/complexity cost; 2 files +39/-14, code diff empty.
- Hygiene: CONTRIBUTING.md:9-19 requires DCO Signed-off-by; verify e831b496 has it before merge (not visible from tools). Branch contains a640a302 + revert e831b496, so squash to net diff.
#4 [high] Verdict: worth it with changes
Verdict: worth it with changes (docs-only PR; ship after 3 small fixes). Charter fit: Standards & Contributions says "What gets merged: PRs that address a maintainer request, a roadmap item, a reproducible bug, a measured performance/memory issue, or bad docs" -> #461 is bad docs + a maintainer-requested fix (yatesdr's #418 round-4 item 2, and his own offered alternative "leave admission as it is and document the limit"). Goals include "Support the documented ... APIs" and JSON Schema for structured outputs; vision is heavy tool use, so a wrong belief that strict mode enforces large bounds is a real client hazard. Benefits: (a) removes two false statements in docs/api.md (named selection "adding no instructions or decoding constraints"; required mode "Sampling is unchanged") that misled clients about decoding; (b) aligns api.md with core-design.md:1669-1685, which already said named selection "does not by itself enable a grammar"; (c) tells clients which numeric limits strict mode does not enforce, with a concrete escape hatch (validate with exact arithmetic); (d) keeper: it preserves all currently accepted requests instead of introducing the HTTP 400 regression the reverted commit a640a302 (>=2^53 bound rejection) would have caused for generated int64 schemas. Costs: 10 net prose lines + an 11-line test; zero runtime, perf, or dependency change; no new code path or maintenance surface; risk is limited to doc drift on a future llguidance bump (mitigated if tests pin the statements). Not duplicative: core-design.md covers grammar duration, api.md covers client-visible schema subset; no other doc states the bound precision. It does not duplicate the reviewer's table; it converts it into prose + a test. Recommend: (1) fix/qualify the inclusive-maximum sentence (see note on maximum >2^53 admitting the successor-up side); (2) state that some large bounds are refused at admission (int64 extremes) so the 400 class is separable from rounding; (3) pin the two rounding examples in a test so a dependency bump surfaces doc drift; (4) squash to the net diff and confirm DCO sign-off per CONTRIBUTING.md:9-19.