#1 [high] Change: what PR #461 actually changes (verified from diff)
PR #461 "Document strict tool selection and numeric range precision", author jcartu (CONTRIBUTOR), opened 2026-11-22, head e831b49, base branch main, +39/−14 across 2 files (pr_diff, result 2).
-
docs/api.md (+27/−14):
- Named selection paragraph (~line 522-530 at head): previously "adding no instructions or decoding constraints" → now "adding no separate call instruction. Selection by itself adds no decoding constraint; when the selected function sets
strict: true, it attaches the strict request grammar described below." - Required mode paragraph (~line 541-552): drops "Sampling is unchanged;" and adds "Required mode by itself leaves sampling unconstrained; any active
strict: truefunction still attaches the strict request grammar described below." - Strict schema section (~line 599-612):
const/enumrule reworded ("must have magnitude strictly below2^53"; drops the explicit integer literal interval [-9,007,199,254,740,991, 9,007,199,254,740,991] and the "larger exact identifiers...as strings" hint becomes "Use strings for identifiers or decimal values that must be represented exactly"). - NEW paragraph on range bounds:
minimum/maximum/exclusiveMinimum/exclusiveMaximuminterpreted at binary64 precision; above 2^53 adjacent integers need not be distinct; integerminimum: 9007199254740993can admit 9007199254740992;exclusiveMinimum: 9007199254740992can admit the endpoint; inclusivemaximum: 9007199254740992does distinguish the next integer; recommends exact application-side validation before executing a tool.
- Named selection paragraph (~line 522-530 at head): previously "adding no instructions or decoding constraints" → now "adding no separate call instruction. Selection by itself adds no decoding constraint; when the selected function sets
-
helios/src/grammar/strict.rs (+12, test-only): new test
strict_integer_maxima_preserve_large_inclusive_endpoints(head lines ~3888-3900): for maximum in [1_000_000_000_000_000_000u64, i64::MAX as u64], validates strict schema,grammar.validate({"n": maximum})ok and{"n": maximum+1}err.
Net: no production code change. Author states at e831b4966e "the net runtime diff against the PR base is empty" (PR comment 2026-11-23 15:29) — consistent with the diff.
An intermediate commit existed: a640a302 "Bound strict function-tool numeric range keywords below 2^53" (2026-11-22), later replaced by e831b496 "Preserve admission for large strict numeric bounds" (2026-11-23) after yatesdr's review. Current head therefore contains the documentation alternative, not the rejection.
Redundancy note: an older test strict_bounds_do_not_round_integers_or_fractional_multiples (strict.rs:3005-3025 at head) already covers maximum: 9007199254740992 accepted exactly and 9007199254740993 rejected; the new test extends that to 10^18 and i64::MAX.
#2 [high] Claims and evidence: the rounding limitation, verified in code on main
Verified in the repository at head (and on main, which is identical for this code):
unsupported_strict_literal(helios/src/grammar/strict.rs:176-192) applies the1 << 53magnitude check and is called only forconst(line 342-353) andenumentries (line 356-375). Error text: "contains a number outside the exact 53-bit integer range".- For
minimum/maximum/exclusiveMinimum/exclusiveMaximumthe only admission check isv.as_f64().is_some()— "must be a finite number" (strict.rs:575-584). No rounding or 2^53 gate. So aminimum: 9007199254740993bound is admitted untouched and the grammar is compiled by llguidance viacompiler.compile_json_schema_text(strict.rs:144). - Existing regression test
strict_bounds_do_not_round_integers_or_fractional_multiples(strict.rs:3005-3025) assertsmaximum: 9007199254740992accepts 9007199254740992 and rejects 9007199254740993 — i.e. the exact inclusive case the PR's new docs paragraph says works.
Consequence: the docs paragraph in #461 describes observed behaviour of main, and "This does not fix llguidance's rounding" in the PR description is accurate as far as the code shows. The two rounding examples (exclusiveMinimum 2^53 admitting the endpoint; minimum 2^53+1 admitting 2^53) come from yatesdr's review table (result 1), described as run through validate_strict_tool_schema + TextGrammar::validate on aarch64 Linux at 6d6fe0c6; I did not execute them (no build/run tooling here) — treat as reviewer evidence, not my own verification.
#3 [high] Related work: #461 is the follow-up #418 promised for review items 1–2
Chain and provenance:
- #417 (issue, closed 2026-11-22, by Napuh, labels area:api, enhancement):
strict: truefunction tools were rejected with HTTP 400; pydantic-ai marks tools strict by default so Flare was unusable for that client family; vLLM/xgrammar handled the same requests. yatesdr replied that accept-and-ignore "won't be accepted, even behind a flag" (result 19). - #418 (PR, merged 2026-11-22 04:43, by jcartu, +6048/−128, 16 files) implemented strict function-tool grammars; it created helios/src/grammar/strict.rs (4504 lines) and the admission rules; closes #417. It went through 4 rounds of CHANGES_REQUESTED by yatesdr (results 18, 20).
- In the last #418 round (2026-11-21 23:03, result 20), yatesdr's two open items were: (1) "Numeric bounds have the same limit … Please apply the 2^53 limit to the four keywords and document it with the
constlimit", citing llguidance-1.9.1compile_numeric(src/json/schema.rs:900-945) andnormalize_integer_bounds(src/json/numeric.rs:509-534); and (2) twodocs/api.mdsentences ("adding no instructions or decoding constraints" at :520-521, "Sampling is unchanged" at :540) that contradict strict tools. - jcartu opened #461 on 2026-11-22 09:19 explicitly as the follow-up PR for items 1 and 2 of that review (result 20, comment 2026-11-22 09:19). #461 therefore carries a maintainer-requested item, which matches the charter's "what gets merged" criterion (maintainer request / bad docs). #418's later comments cross-reference #461 ("[mentions]", result 41).
Superseded state: #461's first commit a640a302 "Bound strict function-tool numeric range keywords below 2^53" did exactly what item 1 asked (reject bounds ≥2^53). yatesdr's review of 2026-11-23 rejected that approach as over-restrictive and offered "leave admission as it is and document the limit, which docs/api.md now states"; the current head e831b49 reversed the code change (commit message "Preserve admission for large strict numeric bounds"). So #461 today delivers only half of the maintainer request from #418 (the docs qualification), and the numeric-bound rejection is explicitly not delivered.
Also relevant: docs/TODO.txt:25-28 still tracks "Qualify strict: true function tools on a TMLv0 core" — unrelated to this PR but part of the same #418 qualification debt.
#4 [high] Process and community: review state, CI, evidence per round
State: open, "ready for review", opened 2026-11-22 09:19, last updated 2026-11-23 (answer at 15:29), head e831b49. Two files, +39/−14. No labels. Reviews: CHANGES_REQUESTED by yatesdr only. CI on head: "no checks" per orientation packet; the repo workflow .github/workflows/native-serving.yml runs cargo test --locked --release --manifest-path helios/Cargo.toml --features runtime-core,server on ubuntu-24.04 and windows-2022 on every pull_request (result 74), so CI would cover the new test if it ran — it has not run on this head.
Round 1 (2026-11-23 15:04, yatesdr, CHANGES_REQUESTED, result 1): accepted the docs/api.md changes as settling the two sentences #418 flagged. Objected that "the admission rule refuses more than the gap it closes", gave a measured table from main 6d6fe0c6 (aarch64 Linux, CPU only) showing exact inclusive endpoints that the ≥2^53 rule would have rejected (10^18, i64::MAX), and noted the PR had changed main's own test from maximum: 9007199254740992 to 9007199254740991 to make it pass. Two asks: refuse only the bounds llguidance rounds, or leave admission and document the limit; and state which requests now get HTTP 400. Nit: the commit message narrated #418's timing provenance and cited a commit not in this repository.
Round 2 (2026-11-23 15:29, jcartu): took the documentation alternative. States net runtime diff against the PR base is empty, the original inclusive 2^53 test is unchanged, the new regression accepts 10^18 and i64::MAX and rejects successors, strict grammar suite passed on x86_64 (28 passed, 1 ignored), docs identify the two rounding cases rather than claiming they are fixed, description no longer cites unrelated timing results.
Outstanding at head: yatesdr's review is still CHANGES_REQUESTED (no approval after the rewrite); nobody else has commented; no reactions recorded. The 28-test count: grammar::strict::tests:: filter — the file has 31 #[test] functions of which one is #[ignore] (requires FLARE_DEEPSEEK_TEST_SNAPSHOT, strict.rs:4355), so 28 passed + 1 ignored means 2 tests matched by the filter were not counted in the run (count is plausible but not independently reproduced here).
DCO: CONTRIBUTING.md requires Signed-off-by on every commit; #418's review history shows yatesdr enforcing it (result 18, "Contributor DCO sign-off is still pending"). #461's commit messages are not visible in this environment, so sign-off on e831b49/a640a302 is unverified.
#5 [high] Change: docs claims checked against the admission code path
Verified at head e831b49 (and identical on main):
- Named tool selection path: helios/src/server/request.rs:225-241 builds active strict tools; for
ToolChoice::Named(name)it keeps only the selected tool;strict_schema: tool.strict.then_some(&tool.parameters). Line 242-279: if any active strict tool exists,compile_presented_strict_toolscompiles a request grammar withrequire_call: matches!(tool_choice, Required | Named(_)),single_call: !parallel_tool_calls,allow_undeclared: tool_choice == Auto. - So for a named, strict function the whole generation is grammar-constrained and must contain a completed call — the docs sentence "adding no instructions or decoding constraints" was wrong for that case, exactly as yatesdr's #418 review item 2 said. The PR's replacement text ("adding no separate call instruction… Selection by itself adds no decoding constraint; when the selected function sets
strict: true, it attaches the strict request grammar described below") is consistent with this code. - Required mode: the removed phrase was "Sampling is unchanged"; with strict tools active, sampling is constrained by the grammar, so its removal is also correct. Replaced by "Required mode by itself leaves sampling unconstrained; any active
strict: truefunction still attaches the strict request grammar described below." - Wording detail: the docs say selection "adds no separate call instruction" — from request.rs, required mode adds a prompt instruction, and named mode still requires a completed call but no extra instruction appears in the named-selection docs; the declaration "adds an instruction to call a tool to the prompt" is retained only in the required-mode paragraph. Could not verify from this file whether named mode also injects prompt text (it is in the frontend template), so the new sentence is plausible but not fully verified.
- Docs cross-reference exists: docs/api.md:626-630 already states an active strict tool attaches a grammar for the entire generation with MTP width one, so the new "described below" pointer resolves.
#9 [high] Claims and evidence: what the description does and does not say
Things a reader of the PR description would not learn, or would learn wrongly:
- The intermediate commit a640a302 (2026-11-22, "Bound strict function-tool numeric range keywords below 2^53") is described nowhere in the current description; it was reversed in e831b496 (2026-11-23). The description's Compatibility section explains what is not done ("This does not fix llguidance's rounding") but not that the branch previously did the opposite and that yatesdr rejected it as over-restrictive. The review thread carries that; the description does not (which is arguably correct under the repo-prose skill, but a reader comparing with #418's review item 1 will see a maintainer request not delivered).
- The description says "The existing
maximum: 9007199254740992regression is unchanged against the PR base" — true, and the PR adds a second case; but the reader is not told the new test partly duplicates the older one's coverage (max 2^53 vs 10^18/i64::MAX). - The description's rounding examples (
exclusiveMinimum: 9007199254740992admitting the endpoint;minimum: 9007199254740993admitting the preceding integer) are attributed to the aarch64 review; I could not reproduce them here. The mechanism is credible from llguidance's f64 handling cited in #418's review, and from helios only checking finiteness (strict.rs:575-584), but the claim rests on the reviewer's table, i.e. the reviewer's own evidence is the support for the PR's central factual claim. - The description says "No requests accepted on
mainacquire a new HTTP 400" — verified: the diff has no non-test code. - The description claims the test suite result "28 passed, 0 failed, 1 ignored" for the
grammar::strict::tests::filter on x86_64; I could not run it. The file has 31#[test]fns, 1#[ignore], so 30 non-ignored should match astrict::tests::prefix filter unless 2 are excluded by cfg/feature — the count is a small inconsistency to check (not proof of a false claim; e.g. some tests may live outside that module path). - The docs change also silently rewrites the
const/enumparagraph (drops the explicit integer-literal interval and the "higher-precision decimals as strings" phrasing). That is a substantive documentation simplification of a limit that #418 reviewers asked to be documented precisely.
#11 [high] Research summary
Case file for PR #461 ("Document strict tool selection and numeric range precision", by jcartu) is complete; eight angles are covered in ten scratchpad entries.
What it does (verified from the diff): documentation plus one test, no production code. docs/api.md replaces the two sentences yatesdr flagged in #418 ("adding no instructions or decoding constraints", "Sampling is unchanged") with statements that a named or required selection adds no constraint by itself but that an active strict: true function still attaches the strict request grammar; and it adds a new paragraph saying minimum/maximum/exclusiveMinimum/exclusiveMaximum are read at binary64 precision, that above 2^53 adjacent integers may not be distinct (with the minimum: 9007199254740993 and exclusiveMinimum: 9007199254740992 rounding examples), that an inclusive maximum: 9007199254740992 is exact, and that clients should validate large bounds with exact arithmetic before executing a tool. It also reworded the const/enum <2^53 rule, dropping the explicit integer interval. The one code hunk is a new test, strict_integer_maxima_preserve_large_inclusive_endpoints, asserting 10^18 and i64::MAX inclusive maxima are accepted and their successors rejected.
Why, and lineage: #417 (pydantic-ai and other strict-by-default clients got HTTP 400) → #418 (merged, +6048/−128, created strict.rs) → #461 as the follow-up #418 promised for review items 1 (reject or document the 2^53 bound limit) and 2 (qualify the two contradicting sentences). The sentence corrections match the admission code (helios/src/server/request.rs:225-279 constrains named+strict and required+strict generation). The bound limit is only documented, not fixed: the first commit (a640a302) implemented the rejection, yatesdr's review called it over-restrictive (it would 400 exact inclusive endpoints such as 10^18 and i64::MAX, and it had forced an existing test to be weakened), and head e831b49 reversed it in favour of documentation — so half of the maintainer request is deliberately not delivered.
Evidence and gaps: the rounding examples come from yatesdr's aarch64 CPU table, not from anything I could run; I confirmed in code that Helios only checks that bounds are finite (strict.rs:575-584) and applies the 2^53 gate to const/enum only, which makes the claim credible. The new test partly overlaps strict_bounds_do_not_round_integers_or_fractional_multiples. The claimed "28 passed, 1 ignored" was not reproduced and sits slightly oddly against 31 test functions (1 ignored) in the file.
State: open, ready for review, one review (CHANGES_REQUESTED by yatesdr) followed by the author's answer; no other reviewers or reactions; no CI checks on the head although the native-serving workflow would test it; DCO sign-off unverified. No conflicting edits on main (main still carries the exact sentences being replaced); #478 touched nearby lines without overlap. Fits the charter's "bad docs"/maintainer-request criterion; one process observation is that the permanent llguidance rounding limitation is documented in api.md but not recorded in docs/TODO.txt, which AGENTS.md reserves for pending items.
#13 [high] Evidence ledger: what was verified here, what rests on the participants
What I verified myself versus what is claimed (for the report's evidence section): Verified by reading the repository at PR head e831b49:
- The diff contains exactly one docs file and one test;
grep-level inspection shows no other change, so the "no new HTTP 400" compatibility claim holds structurally. unsupported_strict_literal(strict.rs:176-192, LIMIT = 1<<53) is called only from theconstbranch (342-353) and theenumbranch (356-375); the four range keywords only requireas_f64()finiteness (575-584). Therefore bounds are neither rejected nor rounded by Helios; any rounding is llguidance's, and the new docs paragraph describes main's real behaviour.- The existing test
strict_bounds_do_not_round_integers_or_fractional_multiples(strict.rs:3005-3025) already assertsmaximum: 9007199254740992accepts the endpoint and rejects 9007199254740993, so the PR description's "existing regression unchanged" is accurate and the new test extends coverage rather than fixing a bug. - docs/api.md on main (lines 520-523, 540-542, 597-600) still holds the old sentences, so the PR is the sole fix in flight.
- CI:
.github/workflows/native-serving.ymlruns the Heliosruntime-core,serversuite on linux and windows for every pull_request; the orientation packet says no checks ran on this head, so the new test has not been exercised in CI. Not verified (no build/run/network execution available here): yatesdr's aarch64 rounding table; the author's x86_64 result "28 passed, 0 failed, 1 ignored"; DCO sign-off presence on a640a302/e831b496; whether named selection injects prompt text (frontend template side). No performance claim is made anywhere in this PR, and none is needed.
#6 [medium] Recent activity: no conflicting edits in docs/api.md since the PR branched
Compared docs/api.md at main (1048 lines) and at PR head (1061 lines) — the PR is the only unmerged change in this region; no conflicting edits since it branched (6b58639):
- On main, lines 520-523 carry the "adding no instructions or decoding constraints" sentence and 540-542 carry "Sampling is unchanged;"; both are exactly the sentences yatesdr flagged in #418 (result 20). Nothing has changed them on main since #418 merged (0b09434d 2026-11-22 is the last commit touching those paragraphs;
search_history path=docs/api.md ref=main, result 26). - The
2^53const/enumparagraph on main (docs/api.md:597-600) is the one #418 added; the PR rewords it and drops the explicit integer interval[-9,007,199,254,740,991, 9,007,199,254,740,991]and the9,007,199,254,740,992decimal expansion. Nothing on main contradicts the PR, and the PR's bound paragraph is new text with no merge risk. - Only other docs/api.md commits in the last 30 days are #478 (decision labels, 4 lines near line 1050-1060) and #317; neither touches the tool sections. On the PR head, #478's text is absent (the branch predates it, but the hunks do not overlap, so rebasing is trivial).
- docs/TODO.txt:25-28 (unrun TMLv0 strict qualification) is unaffected. Risk: the PR does not update docs/core-design.md, which #418 also edited for strict tools; a search for "2^53"/binary64 in docs/ finds hits only in docs/api.md (result 27), so no second document repeats the old bound claim.
#7 [medium] People: yatesdr's round trip; jcartu's third PR in the strict-tool series
People whose work this touches:
- yatesdr (COLLABORATOR, the reviewer; 46 commits to docs, 43 to helios/src in 180 days per packet): authored #418's predecessor work #405 (declared markers as controls, docs/api.md), #478 (docs/api.md decisions labels), and is the maintainer voice on the strict-tool series. All four #418 review rounds and the single #461 review are his; per review comments he runs aarch64 Linux CPU test suites himself to check authors' claims (results 18, 20).
- jcartu (CONTRIBUTOR; 2 merged PRs in 180 days: #418 strict tools, #416 prefix-cache recency; 1 open: #404 activation steering). #461 is the third in a series; #418 is the substantial merged contribution and this is its cleanup. In #404, yatesdr called jcartu's work "really cool … forward looking" and lukealonso steered it towards a generic mechanism; jcartu self-scoped that PR back to a proposal when a contract change needed maintainer approval. That history shows both a cooperative pattern and a pattern of PR descriptions/commits carrying history the maintainers ask to remove (the repo-prose skill and AGENTS.md §"Required PR descriptions" ban chronology).
- Repo rules the maintainers enforce and which this PR engages: AGENTS.md:160-162 ("Every contribution must address an explicit maintainer request, a demonstrated defect, a measured performance or memory problem, or inaccurate documentation") and AGENTS.md:202 ("Apply these criteria to documentation and test changes that would weaken the rules as well as code"); AGENTS.md:38-46 requires the repo-prose skill; AGENTS.md:67-107 requires the four-part PR description (why / what changed / claimed result / evidence). Charter line 35 lists "bad docs" as mergeable.
- No other reviewers, commenters, or reactions have engaged with #461. Discord handle given: jcartu.
#8 [medium] Reach: documentation-only effect, one added test, no compatibility surface
Reach of the change (as it stands at head e831b49):
- No runtime behaviour, wire format, default, or error code changes: the production hunks are absent (
pr_diffshows only docs/api.md and a test in helios/src/grammar/strict.rs). So no compatibility surface moves: no new HTTP 400, no new acceptance, no dependency change (llguidance stays pinned at=1.9.1, helios/Cargo.toml:62). - Users affected only through documentation: clients using OpenAI/Anthropic strict tools (pydantic-ai, agent frameworks from #417) learn that
strict: truenow attaches a grammar under named and required selection, and that large numeric range bounds are approximate. The docs additionally tell clients to re-validate arguments with exact arithmetic before executing a tool when a large bound matters — the only actionable, client-facing guidance added. - Operators: no flags, config, deployment, or performance change. The docs already state the whole-generation grammar cost (docs/api.md:626-630 from #418), unaffected here.
- Remaining un-communicated limitation: the
const/enum≥2^53 rejection is still an admission-time HTTP 400 for schemas that OpenAI's own strict mode would accept; the PR documents it ("must have magnitude strictly below 2^53 … Use strings") but does not change it. Anyone who wants the opposite (reject large bounds for exactness) is told to validate application-side instead. - Test-only addition:
strict_integer_maxima_preserve_large_inclusive_endpointsguards the behaviour the docs now describe (large inclusive integer maxima stay accepted and exact), complementingstrict_bounds_do_not_round_integers_or_fractional_multiples(strict.rs:3005-3025) which already covered max 2^53. - Docs duplication risk is nil: no other document repeats the bound claim (only docs/api.md mentions 2^53).
#10 [medium] Project fit: charter and AGENTS.md alignment, with one process gap
Fact checked against the charter (read_charter, result 3) and AGENTS.md:
- Charter line 35: "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 a maintainer request from #418's review and inaccurate-documentation correction — it lines up.
- Charter line 12 / "Keep the runtime small and model-agnostic": no new per-model branches; only a test and prose. Neutral/positive.
- Charter "Don't silently ignore API fields" (#417): cited in the charter as the rule that produced strict tools. The PR documents that admitted large bounds are approximated rather than silently applied exactly — it documents the gap rather than closing it. A reader could see this as documenting around a known divergence from the JSON Schema standard (charter "Standards & Contributions": JSON Schema is a targeted standard).
- AGENTS.md:160-162 and 202 (documentation changes are judged by the same bar) and AGENTS.md:47-55 ("State designed behavior that the code does not implement as a specification marked designed, not implemented… Record unresolved defects, unrun checks and pending measurements in docs/TODO.txt, not in design documents"). The new rounding paragraph is a limitation of implemented behaviour, not an unrun check, so api.md is arguably the right home; nothing was added to docs/TODO.txt, and no code fix is tracked there for the llguidance rounding. That is a possible process gap: the limitation is permanent until llguidance changes and is not recorded as a pending item anywhere except the prose.
- AGENTS.md:189-194 "Require focused, meaningful validation… Identify missing hardware, inputs, and unrun checks explicitly": the PR states no GPU work and no performance claim, which complies.
- Repo-prose skill: "Documentation is a present-state specification, not a changelog." The docs hunks are present-state; they pass that test. The PR description's mention of the review URL and Discord handle is normal for this repo.
#12 [medium] Related work: #457 and #404 share the files; no competing proposal exists
Neighbours in the same files and their merge interaction with #461:
- #418 (merged 2026-11-22, +6048/−128) is the parent: it created helios/src/grammar/strict.rs (4,504 lines), authored the docs paragraphs #461 edits, and is the only other PR touching both of #461's files. #461 is stacked on it in content, not commits (base main 6b58639 already contains 0b09434d).
- #457 (open, brandonmmusic-max, +431/−7) modifies helios/src/grammar/strict.rs (+134) to align TMLv0 content-header and strict-tool grammars with TmlOutput, adding tests inside the same
mod testsblock. #461 appends its new test at strict.rs:3888-3900, immediately beforestrict_const_and_enum_enforce_exact_integer_range(3901). Textual conflict is unlikely (different regions) but both writers extend the same test module and #457 also changescompile_strict_tml, which #461 does not touch. Merge order between them does not change either's behaviour; #461's docs do not describe TMLv0 grammar framing that #457 alters except the TMLv0 declared-names sentence, which #457 leaves intact. - #404 (open, same author) is unrelated in code (activation steering) but shares docs/api.md and reveals the author's other in-flight work; it does not overlap the tool sections.
- Nothing open or closed competes with #461: no other PR or issue proposes rejecting or documenting large numeric bounds (searches for "numeric bounds 2^53", "2^53 const enum rejected", "int64 tool schema" return only #461 and #418). #417 is closed by #418. The only remaining strict-tool debt elsewhere is docs/TODO.txt:25-28 (unrun served TMLv0 qualification), untouched here.
- Undone-by/undone-by-this: #461 undoes the runtime half of its own first commit (a640a302), and its docs replace #418's
const/enumwording; nothing else reverses prior merged work.