Architecture report · NVIDIA/hyperflare-inference #461

Raw Markdown for agents: https://autobot.eidonix.com/p/5ad5baa9-1a4f-4095-b4da-5ead5eb8e25e.md

PR #461 — Document strict tool selection and numeric range precision (lens B: architecture and scope)

Head e831b49, base main, 2 files, +39/−14: docs/api.md (+27/−14) and a test-only change in helios/src/grammar/strict.rs (+12/−0). No production code changes. Reviewer yatesdr had requested changes and offered two options; the author took the second — "leave admission as it is and document the limit, which docs/api.md now states" (PR comment 2026-11-23 15:29).

Key findings

  1. Should fix — the documented deviation has no TODO record. The new paragraph (docs/api.md:605-612) states a known deviation of the strict grammar from the declared schema, but docs/TODO.txt has no entry for it, against AGENTS.md:47-55 ("Record unresolved defects … in docs/TODO.txt, not in design documents") and the repo-prose skill's present-state rule.
  2. Should fix — the documented rounding behaviour is not pinned by any test. The added test strict_integer_maxima_preserve_large_inclusive_endpoints (helios/src/grammar/strict.rs:3888-3898) covers only inclusive maximum. Neither documented rounding example is asserted, so the docs are the sole record of the contract against a =1.9.1-pinned llguidance (helios/Cargo.toml:62).
  3. No blocking finding. The change belongs in the repository and sits at the right layer: it is the maintainer-offered documentation alternative, the prose is in the file docs/core-design.md:1684 already delegates the strict schema subset to, the runtime diff against the PR base is empty, and the new selection/required-mode wording matches the code it describes.

Scope: does this belong in the repository?

Yes, and it is authorized. AGENTS.md:160-164 accepts "an explicit maintainer request … or inaccurate documentation"; the charter's "What gets merged" includes "bad docs". The reviewer's own review offered the documentation route, and the author took it explicitly (PR comment 2026-11-23 15:29: "I took the documentation alternative from your review"). No unapproved scope expansion under AGENTS.md:166-170 or design-review.md:122-133: no new API surface, no flag, no configuration switch.

Approach and layering

Right document. docs/core-design.md:1684 delegates "the accepted strict schema subset, parser formats, protocol mappings and streamed errors" to docs/api.md, and core-design.md:1669-1683 already states that a grammar constrains the answer, that required mode without a grammar uses ordinary sampling, and that named selection does not by itself enable a grammar. Putting the selection/grammar distinction and the numeric-bound limitation in docs/api.md follows that delegation rather than duplicating architecture prose.

The new selection and required-mode wording matches the code.

No admission weakening in code. The net runtime diff against the PR base is empty, so no strict guarantee is relaxed: validate_strict_node still rejects numeric const/enum literals at or above 2^53 (helios/src/grammar/strict.rs const/enum gate, exercised at strict.rs:3900-3987 including the ±(2^53−1) endpoint rows at 3950-3978), and range keywords are still required to be finite numbers (strict.rs:575-584). The PR splits the const/enum magnitude restriction from range keywords without touching either rule.

No per-model special case or flag. The prose is generic across parsers; the only existing parser-specific strict-tool statement (TMLv0 declared names, docs/api.md:614-615) is unchanged apart from re-wrapping.

Compatibility with what exists

The description claims "No requests accepted on main acquire a new HTTP 400", and the empty runtime diff supports it. Checked against the code: the range-keyword check admits any finite as_f64() (helios/src/grammar/strict.rs:576-583), which is what keeps minimum: 9007199254740993 and exclusiveMinimum: 9007199254740992 from becoming admission errors — the alternative the reviewer offered (refuse only bounds llguidance rounds) would have made them 400s. The documentation route therefore preserves those requests, as the description says. The one documented counter-example direction, inclusive maximum: 9007199254740992 distinguishing the endpoint from the next integer, is already covered by strict_bounds_do_not_round_integers_or_fractional_multiples (strict.rs:3006-3016), which the PR leaves unchanged.

Evidence for claims

No performance claim is made, and the description says so ("No GPU benchmark was run; there is no performance claim"), satisfying design-review.md:94-102. design-review.md:161-163 states documentation changes do not require GPU tests, so the absence of a benchmark is not a gap. The Discord line is present ("Discord: jcartu"), satisfying design-review.md:150-156 and AGENTS.md:137-148. The description follows the four-part scheme of design-review.md:134-147 (Why / What changed / Compatibility / Evidence).

The correctness evidence, however, is thin in one respect: the description's rounding examples come from the reviewer's aarch64 run and are not carried as a test in the PR — see finding 2 below.

Findings

1. Should fix — the unresolved llguidance rounding defect is recorded only in docs/api.md, with no docs/TODO.txt entry

File: docs/api.md:605-612 (new paragraph) against docs/TODO.txt.

The paragraph documents a real deviation: for an integer property, minimum: 9007199254740993 can admit 9007199254740992, and exclusiveMinimum: 9007199254740992 can admit the endpoint. helios does not compensate — range keywords pass admission as long as they are finite numbers (helios/src/grammar/strict.rs:576-583) and are then handed to the pinned llguidance (=1.9.1, helios/Cargo.toml:62). The reviewer confirmed both rows on main at 6d6fe0c6, and the PR description repeats them under Compatibility.

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 prose skill states the same present-state rule (.agents/skills/repo-prose/SKILL.md (not opened):26-34). docs/TODO.txt has no entry for this defect (searched for 900719925474099, 2^53, and numeric-bound wording; the only strict-tool item is docs/TODO.txt:25, qualifying strict: true on TMLv0 cores). As written, the limitation is documented with no owner, no removal criterion and no tracked follow-up.

Fix: keep the api.md paragraph (it correctly states the present limitation and the client-side workaround) and add a docs/TODO.txt entry naming the missing condition and its removal criterion, e.g. "Refuse or exactly enforce strict-tool minimum/maximum/exclusiveMinimum/exclusiveMaximum above 2^53; llguidance 1.9.1 rounds them. Remove when the api.md examples stop reproducing."

2. Should fix — the two documented rounding outcomes are asserted nowhere in the repository

File: docs/api.md:605-612 versus helios/src/grammar/strict.rs:3888-3898.

The single added test covers only the inclusive-maximum side: for maximum in {10^18, i64::MAX} the endpoint is admitted and its successor rejected. The behaviours the new paragraph documents — minimum: 9007199254740993 admitting 9007199254740992, and exclusiveMinimum: 9007199254740992 admitting the endpoint — are not asserted. Searching helios for those literals returns only the const/enum rows (strict.rs:3906-3917, 3950-3978) and the unchanged inclusive maximum test (strict.rs:3008-3011); nothing exercises a rounding range bound.

Why it matters: llguidance is pinned at =1.9.1 (helios/Cargo.toml:62), and the documented limitation is now the only description of that contract. A dependency bump can change either side silently, leaving the API reference false with no signal. AGENTS.md:189-194: "Tests must exercise the affected behavior or contract… describe its problem, resulting behavior, validation, and material limitations"; design-review.md:94-102 (principle 12) asks that evidence be attached to the claim. The reviewer's evidence was a scratch test that the PR does not carry.

Fix: extend the added test, or add a sibling, asserting the two documented rounding outcomes and naming them as the current limitation, so an llguidance change turns the docs stale visibly. If a test that asserts the wrong-but-current behaviour is judged to bless it, say so explicitly in the TODO entry and in the PR's stated limitations.

Considered and not reported

Open questions and what could not be found