Architecture scratchpad · NVIDIA/hyperflare-inference #461

Raw Markdown for agents: https://autobot.eidonix.com/p/140a99cc-6b5a-4caa-a3c9-5f1932b77820.md

#2 [high] Finding: unresolved llguidance rounding defect documented only in api.md, not docs/TODO.txt

SHOULD FIX — docs/api.md:605-612 (new paragraph) / docs/TODO.txt.

The new paragraph states a known deviation of the strict grammar from the schema: for an integer property, minimum: 9007199254740993 can admit 9007199254740992, and exclusiveMinimum: 9007199254740992 can admit the endpoint. helios/src/grammar/strict.rs:576-583 shows admission only checks v.as_f64() is finite, so these bounds are accepted and handed to llguidance; nothing in Helios compensates. The review by yatesdr (2026-11-23) confirmed the same two rows on main at 6d6fe0c6, and the PR description repeats them.

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 repo-prose skill (.agents/skills/repo-prose/SKILL.md:26-34) likewise: documentation is a present-state specification and "the repository keeps no historical documents... do not write... defect reports".

docs/TODO.txt has no entry for this rounding (searched: no match for 900719925474099, 2^53, or numeric-bound items; its only strict-tool entry is line 25, qualifying strict: true on TMLv0 cores). The PR therefore converts a tracked-defect obligation into prose in the API reference with no removal criterion and no follow-up record, which is exactly what the guidance says to avoid.

Fix: keep the api.md paragraph (it correctly states the present limitation and the 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 documented api.md examples no longer reproduce."

#3 [high] Finding: docs claim rounding behavior that no test pins

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

The PR adds one test, strict_integer_maxima_preserve_large_inclusive_endpoints, which covers only the inclusive maximum side: maximum in {10^18, i64::MAX} admits the endpoint and rejects the successor. The behaviour the new api.md paragraph documents — minimum: 9007199254740993 admitting 9007199254740992 and exclusiveMinimum: 9007199254740992 admitting the endpoint — is asserted nowhere in the repository. Searched helios/src and tests/ for the rounding pairs: the only related coverage is strict_bounds_do_not_round_integers_or_fractional_multiples (strict.rs:3006-3025, inclusive maximum 2^53) and the const/enum endpoint gate (strict.rs:3950-3978).

Why it matters: the docs are now the sole record of this contract, and llguidance is pinned at =1.9.1 (helios/Cargo.toml:62). A dependency bump can change either side silently; without a test, a later reader cannot tell whether the paragraph is still true. AGENTS.md:189-194: "Tests must exercise the affected behavior or contract... Keep each PR focused on one coherent outcome and describe its problem, resulting behavior, validation, and material limitations." The reviewer's own evidence table came from a scratch test that is not carried in the PR.

Fix: extend the new test (or add a sibling) that asserts the two documented rounding outcomes, naming them as the current limitation, so a llguidance change makes the documentation stale visibly rather than silently. If a test cannot express "documented rounding" without appearing to bless it, say so in the TODO entry and in the PR's limitations.

#5 [high] Research summary

Reviewed PR #461 through the architecture-and-scope lens against the charter, AGENTS.md, docs/design-review.md, the repo-prose skill and CONTRIBUTING.md, reading the changed docs prose and the new test in the surrounding strict-schema admission code (helios/src/grammar/strict.rs) and its callers (helios/src/server/request.rs, protocol/encode.rs, inference.rs).

No blocking finding. The change is in scope and at the right layer: it is the documentation alternative the reviewer yatesdr explicitly offered, docs/api.md is where core-design.md already delegates the strict-schema subset, the runtime diff against the PR base is empty, and the new selection/required-mode wording matches what prepare_validated_inference, ToolChoice::Named filtering and the Required-mode instruction actually do. No perf claim, Discord line present.

Two should-fix findings, both about how the newly documented limitation is recorded rather than about the design: (1) the unresolved llguidance rounding defect is now stated only in docs/api.md:605-612, whereas AGENTS.md:47-55 and the prose skill require unresolved defects in docs/TODO.txt with a removal criterion — the PR adds no TODO entry; (2) the added test covers only the inclusive-maximum side, so the two rounding behaviours the new paragraph documents (minimum 9007199254740993 admitting 9007199254740992; exclusiveMinimum at 2^53 admitting the endpoint) are asserted nowhere in the repository, against AGENTS.md:189-194 and design-review.md principle 12, leaving the docs unverifiable against the pinned llguidance 1.9.1. Details and fixes are in the scratchpad.

#6 [high] Report skeleton with citations for PR 461 lens B

Report for PR #461, lens B (architecture and scope). Structure: verdict first (nothing blocking), then the two should-fix findings, then the in-scope/right-layer argument with citations, then the explicitly dropped observations.

PR facts: jcartu, head e831b49, base main, 2 files +39/-14. Files: docs/api.md, helios/src/grammar/strict.rs (test only, no production change).

FINDING 1 — should fix — docs/api.md:605-612 (no docs/TODO.txt entry). Defect documented: integer minimum: 9007199254740993 admits 9007199254740992; exclusiveMinimum: 9007199254740992 admits the endpoint. Confirmed by yatesdr's table (PR review 2026-11-23, "review on aarch64 Linux", rows 1-2) and repeated in the PR description's Compatibility section. Code shows Helios does not compensate: range keywords are only checked to be finite numbers, helios/src/grammar/strict.rs:576-583, then passed to llguidance (=1.9.1, helios/Cargo.toml:62). Rules cited: AGENTS.md:47-55 ("Record unresolved defects, unrun checks, and pending measurements in docs/TODO.txt, not in design documents"; one or both purposes only — architecture spec or agent instruction); .agents/skills/repo-prose/SKILL.md:26-34 (present-state specification, no chronology or defect reports); design-review.md:122-133 (principle 15, apply the rejection criteria to documentation). Evidence docs/TODO.txt has no entry: searched for 900719925474099 / 2^53 / numeric bound — none; only strict-tool item is docs/TODO.txt:25 (qualify strict tools on TMLv0 cores). Fix: add a TODO entry naming the missing condition and its removal criterion (refuse or exactly enforce range bounds above 2^53 where llguidance rounds; remove when the api.md examples stop reproducing).

FINDING 2 — should fix — docs/api.md:605-612 versus helios/src/grammar/strict.rs:3888-3898. The single added test covers only inclusive maximum (10^18 and i64::MAX accepted at the endpoint, successor rejected). Nothing asserts the two documented rounding outcomes. Nearest existing coverage: strict.rs:3006-3025 (strict_bounds_do_not_round_integers_or_fractional_multiples, inclusive maximum 2^53, unchanged from main) and strict.rs:3950-3978 (const/enum endpoint gate at ±(2^53−1)). Searched tests/ for the same literals: no match. Rules cited: AGENTS.md:189-194 (tests must exercise the affected contract; describe material limitations); design-review.md:94-102 (principle 12, validate the real path and report evidence honestly — the reviewer's evidence was a scratch test not carried in the PR). Fix: assert the two documented rounding outcomes in the added test (or a sibling), or state in the TODO entry and PR limitations that a test cannot pin the documented behaviour.

IN SCOPE / RIGHT LAYER (no finding):

DROPPED (not reported): docs/api.md:601-603 no longer spells out the integer interval [-2^53+1, 2^53−1]; the replacement plus the const/enum sentence is accurate and the old interval was misleading for range keywords, which is the point of the split. Also dropped: the removed "Sampling is unchanged" wording in the required-mode paragraph (docs/api.md:544-546) is still true — sampling is untouched; prepare_validated_inference changes only the grammar field of the request.

#1 [medium] PR 461 basics: docs + one test, empty runtime diff

PR #461 by jcartu (CONTRIBUTOR), open, base main, head e831b49, 2 files +39/-14.

#4 [medium] Lens B verdict: scope and layering are correct, nothing blocking

Assessment: the change belongs in the repository and the approach is right, so no blocking architecture finding.

  1. In scope. The charter's "What gets merged" includes "bad docs"; AGENTS.md:160-164 accepts an "explicit maintainer request" or "inaccurate documentation". The reviewer yatesdr explicitly offered the documentation alternative ("Or leave admission as it is and document the limit, which docs/api.md now states"), and the author took it (PR comment 2026-11-23 15:29). This is an authorized, maintainer-directed route to closing the CHANGES_REQUESTED review.

  2. Correct layer. The prose lives in docs/api.md, the file core-design.md:1684 already delegates to for "the accepted strict schema subset". No runtime code, no new flag, no per-model branch, no schema-compiler change — consistent with design-review.md principles 1, 3, 15 (reject scope expansion / weakened constraints). The net runtime diff against the PR base is empty, so no admission rule is relaxed and no strict guarantee is weakened in code: validate_strict_node still rejects const/enum literals at or above 2^53 (strict.rs:176-192, 342-375) and still validates that range keywords are finite numbers (strict.rs:576-583).

  3. The selection/clarification edits (docs/api.md:522-525 and 541-546) match the code: prepare_validated_inference sets has_active_strict_tool from the selected tools' strict_schema (request.rs:225-249) and only then compiles a request grammar, while ToolChoice::Named merely filters the presented definitions (request.rs:498-501) and ToolChoice::Required only appends the system instruction (inference.rs:385-388). core-design.md:1679-1683 says the same. So the doc now describes the code.

  4. No performance claim; the description says no GPU benchmark was run, which satisfies design-review.md:94-102 and the "documentation changes do not require GPU tests" line (design-review.md:161-163).

  5. Discord line present ("Discord: jcartu"), satisfying design-review.md principle 17 and AGENTS.md:137-148.

Minor observations not worth separate findings: docs/api.md:601-603 drops the explicit integer interval the old text gave; the shorter sentence with the new range paragraph is clear enough and the removed interval was itself misleading once const/enum equality is explained. The api.md paragraph correctly separates the const/enum magnitude restriction from range keywords, which is the point of the PR.