Conventions scratchpad · NVIDIA/hyperflare-inference #461

Raw Markdown for agents: https://autobot.eidonix.com/p/6ea84dc9-9f5b-4185-b471-2449dd099043.md

#1 [high] nit: new test duplicates/parallels existing bounds test instead of extending it

docs+test PR #461 (head e831b49).

Finding (nit, conventions/duplication): helios/src/grammar/strict.rs:3888-3898 adds strict_integer_maxima_preserve_large_inclusive_endpoints, but the module already has a single bounds-precedent test, strict_bounds_do_not_round_integers_or_fractional_multiples at strict.rs:3006-3025, which covers exactly the same construct with {"type":"integer","maximum":9007199254740992u64}, asserts the endpoint validates and its successor is rejected (lines 3010-3015). The new test only varies the endpoint values (10^18, i64::MAX), so it is a parameter extension of an existing case kept ~880 lines away under a different name. Fix: add the two endpoint values to the existing loops/schema at 3006 (or place the new test next to it), so one test owns "large integer maximum endpoints" and a future change cannot fix one and miss the other.

Precedent cited: strict.rs:3006. Also relevant: the module repeats the GrammarCompiler::new(&byte_tokenizer(), 320, &[256, 257], &[]) boilerplate in ~25 tests (strict.rs:2491, 2553, ...), which is the module's established pattern, so the new test's boilerplate is not a departure.

Severity justification: nit — no behavior change; the duplicated coverage is real but harmless today.

#2 [high] nit: docs/api.md drops the repo's precise wording and interval for the 2^53 limit

docs/api.md, PR #461 (head e831b49).

  1. Nit (wording precision, closest precedent is the sentence it replaces): the removed text at api.md:597-599 (base) said "parsed at IEEE 754 binary64 precision and must have magnitude strictly below 2^53 (9,007,199,254,740,992, so integer literals lie in [-9,007,199,254,740,991, 9,007,199,254,740,991]; pass larger exact identifiers or higher-precision decimals as strings)". The new text at api.md:600-603 says "parsed at binary64 precision and must have magnitude strictly below 2^53. Use strings for identifiers or decimal values that must be represented exactly." Two regressions: (a) "IEEE 754" — the only place in the repository that spells out which binary64 (grep for IEEE in helios/ and docs/ returns nothing else; docs/ hits for binary64 only at api.md:601 and 606) — is dropped; (b) the explicit accepted integer interval is dropped, so a reader cannot tell that -9007199254740991 is the largest negative integer literal that is accepted. Fix: keep "IEEE 754 binary64" and the interval, which the new paragraph does not restate.

  2. Nit (number formatting vs local precedent): the paragraph at api.md:605-612 writes the literals without thousands separators (9007199254740992, 9007199254740993) while api.md:815 uses 5,000/20,000 and the sentence it replaces used 9,007,199,254,740,992. Mixed because these are pasteable JSON literals; acceptable, but the paragraph then also mixes both styles with 2^53 two lines apart.

  3. Nit (line wrap): api.md:607 is 86 columns ("have distinct representations. For an integer property, minimum: 9007199254740993") while api.md prose wraps at ~78-80 (e.g. 601-604, 610-612). Rewrap.

Nothing blocking: the three statements at api.md:522-525 and 544-546 repeat the strict-grammar rule that api.md:639-640 already states. That repetition is exactly what yatesdr's review (2026-11-23) asked for, and the "described below" forward pointer matches existing usage at api.md:145, 292, 653, so I am not reporting it as duplication.

#3 [high] Research summary

Read both changed files in context (docs/api.md 490-660, helios/src/grammar/strict.rs admission path 53-200/320-400/575-592 and the tests module 2457-4000, plus the callers in helios/src/server/request.rs:225-294) and checked them against the charter, AGENTS.md (prose review, contribution criteria), docs/design-review.md and docs/verification.md.

Lens C result: no blocking or should-fix convention problems; three nits. (1) The new test strict_integer_maxima_preserve_large_inclusive_endpoints (strict.rs:3888-3898) duplicates the construct of the existing strict_bounds_do_not_round_integers_or_fractional_multiplew-style bounds test at strict.rs:3006-3025, which already asserts an inclusive maximum: 9007199254740992 endpoint is accepted and its successor rejected; the new case only adds two endpoint values and lives ~880 lines away, so the same property now has two owners. (2) docs/api.md:600-603 drops two things the sentence it replaces carried: the "IEEE 754" qualifier on binary64 (the repository spells it nowhere else) and the explicit accepted integer interval; both are still needed because the new paragraph does not restate them. (3) Formatting nits in the new paragraph (api.md:605-612): unseparated 16-digit literals next to 5,000/20,000 at api.md:815 and 2^53, and api.md:607 runs to 86 columns where surrounding prose wraps at ~78-80. I explicitly did not report the repeated "attaches the strict request grammar below" statements at api.md:522-525/544-546 as duplication: they implement reviewer yatesdr's request and match existing "see below" usage.

The test's boilerplate (GrammarCompiler::new(&byte_tokenizer(), 320, &[256, 257], &[])) matches the module's existing pattern in ~25 tests, so it is not a departure.

#4 [high] Lens C summary: no blocking findings, cleared precedents, and exact test name

Conclusion for PR #461 under lens C (conventions and duplication): no blocking and no should-fix findings; three nits only (entries 1 and 2). Say so plainly.

What I checked and cleared, with citations, so the report can state it:

  1. Test boilerplate. The new test uses GrammarCompiler::new(&byte_tokenizer(), 320, &[256, 257], &[]) (strict.rs:3890), the same construction line repeated in ~25 tests in this module (strict.rs:2491, 2553, 2934, 2974, 2995, 3009, 3029, 3043, 3097, 3108, 3162, 3219, 3232, 3245, 3266, 3283, 3352, 3407, 3454, 3596, 3725, 3821, 3991). No departure; no new helper needed.

  2. Use of the existing helper. The new test calls the production admission entry point validate_strict_tool_schema (strict.rs:53) and the production validator TextGrammar::validate (grammar.rs:631), matching how strict_bounds_do_not_round_integers_or_fractional_multiples (strict.rs:3006-3025) does it. It does not reimplement admission or validation. Correct per docs/verification.md:37-48 (exercise the real entry point).

  3. The docs statements at api.md:522-525 and 544-546 ("Selection by itself adds no decoding constraint ... attaches the strict request grammar described below"; "Required mode by itself leaves sampling unconstrained; any active strict: true function still attaches the strict request grammar described below") repeat what api.md:639-640 already states. Deliberate: reviewer yatesdr's 2026-11-23 review asked for exactly these two clarifications for #418, and the "described below" forward pointer matches existing usage at api.md:145, 292, 653. Not reported as duplication.

  4. The two rewritten sentences in docs/api.md are rewrites of existing text in the same paragraphs, not new paragraphs appended (base lines 520-525 and 538-547 replaced). Consistent with repo-prose rule "Documentation is a present-state specification, not a changelog" (SKILL.md:26-29): the edits replace, they do not layer history or add a changelog entry, and no defect report/progress note was added to the document (AGENTS.md:56-58). The rounding limitation is documented in the API reference where users hit it, not in docs/TODO.txt; AGENTS.md:56-58 assigns "unresolved defects, unrun checks, pending measurements" to TODO.txt, so an argument could be made either way — but api.md is the API contract, and the limitation changes what a client must do, so stating it there is right. Judge: not a finding.

  5. Terminology precedent: api.md:561 already refers to "the same bounded llguidance compiler as structured output", and helios/Cargo.toml:62 pins llguidance = "=1.9.1". The new paragraph avoids naming llguidance, which is consistent with api.md's client-facing register (it names llguidance exactly once, at 561). No naming departure.

  6. No duplicated helper introduced; no existing mechanism re-implemented; the PR adds no runtime code (net runtime diff empty against base, per the author's 2026-11-23 comment and the diff: only a #[test] function is added to strict.rs).

  7. docs/api.md line 607 length and numeric formatting: see entry 2.

Correct test name for the final report (the finish summary had a typo): strict_bounds_do_not_round_integers_or_fractional_multiples, helios/src/grammar/strict.rs:3006.