Correctness report · NVIDIA/hyperflare-inference #461

Raw Markdown for agents: https://autobot.eidonix.com/p/77e77d54-bcc5-447f-bb60-51d7ade10214.md

Review of #461 — Document strict tool selection and numeric range precision

Lens A: correctness and consequences. Read: the full docs diff and its surrounding sections (docs/api.md:495-660), the changed test (helios/src/grammar/strict.rs:3888-3898), the strict-admission path (strict.rs:53-145, 147-175, 340-375, 555-595), the request-side strict plumbing (helios/src/server/request.rs:88-300, 704-769), and the pinned dependency (helios/Cargo.toml:62).

Key findings

  1. The change is documentation plus one test; the runtime is untouched. The diff is docs/api.md (+27/−14) and helios/src/grammar/strict.rs (+12/−0, a #[cfg(test)] function only, strict.rs:3888-3898). The PR's "no requests accepted on main acquire a new HTTP 400" claim therefore holds structurally: nothing in the admission or decoding path changed. Verified.
  2. The new selection sentences understate admission. docs/api.md:522-525 says the strict grammar attaches "when the selected function sets strict: true", and :544-546 says "any active strict: true function still attaches the strict request grammar". Grammar attachment is indeed selection-scoped (see "Callers" below), but schema admissibility is not: compile_strict_validators iterates every tool.strict tool regardless of tool_choice and returns an admission error (HTTP 400) before inference (request.rs:88-113, :125). A reader can reasonably conclude an unselected strict tool cannot fail the request. It can. This is the one substantive issue.
  3. The numeric-range prose matches the code. The doc no longer gates range bounds at 2^53 (only const/enum carry that restriction, docs/api.md:599-603), which is what the code does: admission for minimum/maximum/exclusiveMinimum/exclusiveMaximum only requires a finite number and never rounds or re-derives the value (strict.rs:575-584; the schema is handed to llguidance verbatim at strict.rs:144 via compile_json_schema_text). The claim is a description of llguidance's behaviour, not of Helios logic, and the doc says so indirectly ("interpreted at binary64 precision").
  4. The new test covers only the maximum case the docs single out as exact. strict.rs:3891-3897 admits maximum: 10^18 and maximum: i64::MAX, validates the endpoint, and rejects endpoint + 1. The two inexact examples the docs assert are not pinned anywhere in the repository.

Callers and configurations

Inactive and edge-case paths

State, graph and persistence consequences

None. The change adds no schema, cache, checkpoint, exported-core or graph-contract surface, so existing artifacts and cores continue to load, and no MTP/decode-width behaviour changes (the width rule is stated at api.md:639-643 and untouched). The only behaviour the docs newly describe is llguidance's existing rounding, which — as the PR states — is not fixed here.

Rules compliance (charter and repository guidance)

Open questions

  1. Should "active strict tool" be defined once (api.md:545, 614, 639, 644)? It is now load-bearing for a new sentence.
  2. Should the two inexact rounding cases be pinned by a test so the documentation cannot drift from a pinned llguidance (helios/Cargo.toml:62)?
  3. Whether maintainers consider the unselected-strict-tool admission rule (compile_strict_validators ignoring tool_choice, request.rs:88-113) intentional API surface worth documenting, or a rule that should itself be relaxed to selection scope — the latter is a behaviour change and out of scope for this PR, but the docs should say what happens today either way.