Opened by a workflow run, Dec 3, 2026 6:47 AM EST. decide malicious: all_clear (100%): No malicious content found
explore
Author: jcartu (CONTRIBUTOR; 6 merged, 3 closed, 9 open PRs in 180 days; docs + helios/src focus; Discord: jcartu)
Motivation: Callers sending a structured-output JSON Schema could not learn which keywords are accepted without reading helios/src/grammar.rs; maintainers on issue #449 said the closed allowlist is intentional, so this PR documents the accepted set instead of widening it.
Scale: +17 / −0 lines in 1 file (docs/api.md)
Proposal:
- Adds one paragraph at
docs/api.md:927-942naming the four wire locations:response_format(Chat Completions, Completions),text.format(Responses),output_config.format(Messages). - Lists 29 structural/constraint and 13 metadata/annotation accepted keywords (42 total).
- States that any other keyword (
deprecated,nullable,uniqueItems,x-guidance), external$reftargets, and schemas over 262,144 bytes / depth 64 / 8,192 nodes return HTTP 400. - No code, test, config or dependency changes. Touches:
docs/api.mdoutput-constraint section (only file; prose only, no runtime surface) Related items:- #449 JSON-schema allowlist rejects
deprecated(open): the motivation; only its documentation fallback branch is implemented, so it stays open. - #418 strict function-tool schemas (merged): authored the narrower, also-"closed" keyword list at
docs/api.md:717-734that #704 never reconciles. - #689 typed HTTP 400 error codes (merged): same author, same file, same day; documents
error.code: invalid_grammar680 lines earlier, unlinked here. - #461 Document strict tool selection and numeric range precision (open): same author's overlapping docs work in the same file; carries the review bandwidth.
- #530 structured output decodes ~2-3x slower (open): asks for a
docs/api.mdcost note that this PR does not add. Link: https://github.com/NVIDIA/hyperflare-inference/pull/704 Autobot comments: The diff panel shows ~10 files but onlydocs/api.md(+17/−0) belongs to this PR — the rest is stale-base drift from merged #689/#690/#687. Parity claim (42 == 42, bounds match) verified independently, though it cites commit3d1614cc, not head77941c4, and no test pins the list to code. The new paragraph sits beside a different, narrower "closed" strict-tool keyword list and does not relate the two. Zero reviews, comments, labels or CI checks on head.
Value Proposition
Value Proposition — PR #704 docs/api: enumerate accepted response_format JSON Schema keywords
Charter alignment: strong. The charter targets "the documented subset of … JSON Schema for structured outputs," and "What gets merged" includes bad docs and maintainer requests. This adds no runtime branch, no per-model special case, no flag, no dependency — it is the "solve it without new code at all" shape, and it documents a reject-with-400 policy, i.e. the charter-compliant side of "don't silently ignore API fields." pr_files confirms one file (docs/api.md, +17/−0), so "keep the runtime small" is untouched.
Novelty & status: genuinely additive — not superseded, not obsolete. No other PR/issue requests this enumeration, and nothing landed after the branch point touches docs/api.md. It implements the second branch of open issue #449 ("if the keyword set is meant to stay narrow, docs/api.md should list the accepted keywords"), matching yatesdr's "closed on purpose" position. The headline claim survives independent re-derivation: 42 code keywords (helios/src/grammar.rs:902-948) == 42 documented (29+13), and bounds 262_144/64/8_192 match grammar.rs:23-25. Caveat: #449 stays open — this is Refs, not Fixes; deprecated is still rejected.
Value vs cost: good value, near-zero upkeep — with two gaps.
- Beneficiaries: every caller sending a structured-output schema on Chat Completions/Completions, Responses, or Messages; previously discoverable only by reading
grammar.rs. - Evidence: adequate but light — hand-verifiable parity, no committed check; body cites
3d1614ccrather than head77941c4(bookkeeping only), parity script uncommitted. - Gap 1 (substantive): a second, differently-scoped "closed" list already sits at
docs/api.md:717-734(strict function tools, merged #418). #704 never relates the two and words the$refrule differently — two unreconciled "closed" lists in one reference is a defect this PR is positioned to fix. - Gap 2 (process): no test pins the list to code, so it can drift silently; #689's
error.code: invalid_grammardocs (same author, same day, 680 lines away) are unlinked though they describe the same rejection path.
Verdict: Worth it with changes. Require: (1) one sentence relating the output-constraint allowlist to the strict-tool subset and aligning $ref wording; (2) correct the commit reference; (3) optionally cross-reference invalid_grammar and add a cheap drift guard. Also rebase — the ~10-file rendered diff is stale-base drift, not scope.
No instruction-like content was found in the PR material reviewed.
Full report Decide Value: yes (100%): This change is worth reviewing: it provides value to the project in line with its charter.
Classify intake
Selected: triage:review, documentation, area:api
Threshold: 65%
Triage
- [✓]
triage:review: 99.2% -
triage:design-review: 0.4% -
triage:partial: 0.2% -
none: 0.1% -
triage:integration: 0.1% -
triage:validation: 0.0% -
triage:verify-for-closure: 0.0% -
triage:investigate: 0.0% -
triage:superseded: 0.0%
Priority
-
none: 100.0% -
priority:P1: 0.0% -
priority:P2: 0.0%
Type
- [✓]
documentation: 98.0% -
community: 40.7% -
enhancement: 37.8% -
duplicate: 24.5% -
bug: 0.5% -
performance: 0.0%
Area
- [✓]
area:api: 97.7% -
area:engram: 0.6% -
area:selene: 0.2% -
area:memory: 0.2% -
area:orbit: 0.2% -
area:kernels: 0.1% -
area:preparation: 0.1% -
area:scheduling: 0.1% -
area:caching: 0.0% -
area:rocenante: 0.0% -
area:packaging: 0.0%
Model
-
model:deepseek-v4.1: 1.4% -
model:deepseek-v4: 1.1% -
model:glm-5.3: 0.2% -
model:inkling-small: 0.2% -
model:mimo-v2.6: 0.1% -
model:nemotron-3.5-bolt: 0.1% -
model:qwen3.8-27b: 0.1% -
model:kimi-k3.1: 0.0% -
model:muse-glimmer: 0.0% -
model:gemma4: 0.0% -
model:qwen3.8-flash-next: 0.0%
Apply Labels (Intake)
Applied: +triage:review, +documentation, +area:api
Subtraction and simplicity
Subtraction & Simplicity audit — PR #704 (docs/api.md, +17/−0)
Verdict
The diff is lean: 17 lines of prose, no code, no knobs, no wrappers, nothing dead. There is nothing to delete wholesale — enumerating the allowlist is exactly the subtraction-favouring fix that issue #449's second branch asks for ("if the keyword set is meant to stay narrow, docs/api.md should list the accepted keywords"). Four concrete simplifications are worth making, one of which is high-signal and should gate merge.
Scope note: pr_files reports one file, +17/−0, which matches only the docs/api.md:927-942 paragraph. The second hunk the diff renders (docs/api.md:255-260, the error.code values on typed 400s) is base drift from already-merged #689, not this author's change — main at :256-258 still reads "…return 500. 5xx errors use server_error, or api_error on Messages. / Responses for requests…". Nothing to subtract there; it isn't part of the reviewable delta.
1. HIGH — the paragraph re-lists 26 of its 42 keywords that this same file already documents 200 lines above, under a different label, with the relation never stated
docs/api.md:722-725 (strict function tools, from the same author's merged #418) already enumerates:
"…and use supported bounded JSON-schema keywords (
properties,required,additionalProperties,items,prefixItems,minItems,maxItems,enum,const,anyOf, local$refto#,#/$defs/<name>, or#/definitions/<name>, numeric bounds,multipleOf,minLength,maxLength, andpattern)."
The new list at docs/api.md:930-939 repeats $ref, $defs, definitions, type, const, enum, anyOf, properties, additionalProperties, required, items, prefixItems, minItems, maxItems, minLength, maxLength, pattern, minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf, $schema, title, description, default — 26 of the 42. Only 16 keywords (oneOf, allOf, patternProperties, minProperties, maxProperties, additionalItems, format, $anchor, $id, id, $comment, readOnly, writeOnly, examples, contentMediaType, contentEncoding) are actually new information.
I verified the containment against the code rather than by eye: SUPPORTED_KEYS (helios/src/grammar/strict.rs:147-174, applied at :214) is a strict 26-element subset of the 42 keys validate_schema_nodes accepts (helios/src/grammar.rs:901-948; 12 distinct keys across the recursion arms at :902, :913, :924, :935, :940 plus 30 pass-through keywords at :943-948 = 42). The counts in the PR body hold exactly: 29 + 13 = 42, zero missing, zero extra.
Why this is a subtraction problem, not just a style one: the document now has two independent hand-maintained keyword lists for one compiler, with no statement of how they relate, so a reader cannot tell that strict tool schemas reject readOnly, format, and oneOf while output constraints accept them, and any future keyword addition must be edited in two places or the file contradicts itself. Cheapest fix is one clause, and it replaces words rather than adding them — e.g. at docs/api.md:929-930 say the schemas "accept the strict function-tool keywords above plus oneOf, allOf, patternProperties, minProperties, maxProperties, additionalItems, format, and the metadata/annotation keywords …", which deletes the 26-way restatement and makes the subset relation explicit. ($ref also gets two different spellings for one code rule: docs/api.md:931 "same-document # references only" vs docs/api.md:723-724 "local $ref to #, #/$defs/<name>, or #/definitions/<name>" — the code checks only reference.starts_with('#'), helios/src/grammar.rs:903-911, so one phrasing is enough.)
2. MEDIUM — the 29/13 split is an editorial invention the code does not support; it costs the reader a two-list union to answer one question
docs/api.md:930-936 "Accepted structural and constraint keywords are …" and docs/api.md:936-939 "Accepted metadata and annotation keywords are …". Checked against helios/src/grammar.rs:943-948, the implementation's only distinction is recursed vs not recursed — and even that is not the doc's split. The 30 flat pass-through keywords are one block listing metadata and constraints interleaved:
"$anchor" | "$schema" | "$id" | "id" | "$comment" | "title" | "description" | "default" | "readOnly" | "writeOnly" | "examples" | "contentMediaType" | "contentEncoding" | "const" | "enum" | "type" | "minItems" | "maxItems" | "required" | "minProperties" | "maxProperties" | "minLength" | "maxLength" | "pattern" | "format" | "minimum" | "maximum" | "exclusiveMinimum" | "exclusiveMaximum" | "multipleOf" => {}
So const/type/required/minItems are called "structural and constraint" while $schema/$id/$anchor — the keywords that change reference resolution, i.e. the most structural of all — are filed as "metadata". A caller asking "may I send X?" must scan both lists; the split answers no question the code asks. Either collapse to one list, or relabel by the real axis (recursed into vs accepted as a leaf), which is checkable against :902-948.
3. MEDIUM — the enumeration reads as a sufficient condition when the code treats it as necessary only, and every counter-example is already pinned by a test
docs/api.md:930 "Accepted structural and constraint keywords are …" plus docs/api.md:939-942 "Any other keyword (…), external $ref targets, and schemas exceeding 262,144 bytes, depth 64, or 8,192 nodes return HTTP 400" — a caller will read that as "allowlist-clean ⇒ compiles". It does not: helios/src/grammar.rs:1624-1631 rejects, after the allowlist walk, {"type":"string","format":"not-a-format"}, {"oneOf":[{"type":"integer"},{"type":"number"}]}, {"$ref":"#/$defs/missing"}, {"type":"integer","minimum":5,"maximum":1}, and json!(false) — all of which the new paragraph presents as accepted (format, oneOf, $ref, minimum/maximum). One clause ("meeting the allowlist is necessary, not sufficient: unknown format values, unresolved references, and contradictory bounds are rejected during compilation") prevents the predictable support load. Under the simplicity lens this is the unrepresentable-invalid-state point: the doc currently describes a single closed set where the code has two separate admission gates (helios/src/grammar.rs:209/:215 then enforcement inside compile_envelope).
4. LOW — two smaller trims inside the paragraph
docs/api.md:941"or compiler extensions likex-guidance" —x-guidanceis a llguidance-internal key that appears in this repo only in tests (helios/src/grammar.rs:1626,:1640) and in the code doc comment as the generic phrase "compiler option extensions are rejected before compilation" (helios/src/grammar.rs:198-199). Naming a compiler-internal key in the public API reference buys nothing the three real keyword examples (deprecated,nullable,uniqueItems) don't already buy; keeping the generic phrase matches the code's own vocabulary and keeps the doc out of llguidance internals.docs/api.md:929-930"validate every schema node against a closed keyword allowlist before grammar compilation" then:939"Any other keyword … return HTTP 400" states closedness twice. The second statement is the useful one (it carries the examples that answer #449 verbatim); the first can drop to "…validate every schema node against a closed allowlist", letting the closing sentence do the work.- While touching the bounds, note the byte bound is measured on the re-serialized schema (
schema.to_string().len(),helios/src/grammar.rs:209), not the request body, and that it is the sameMAX_GRAMMAR_BYTES(helios/src/grammar.rs:23) that bounds Lark grammars (:618) and custom-tool regexes (:549). Naming the measurement costs three words and removes the 400-vs-413 ambiguity againstdocs/api.md:253(max_body_bytes→ 413request_too_large).
Adjacent, outside this diff (not this PR's job, but the enumeration exposes it)
- The list has no pin. Nothing in the tree ties
docs/api.mdtovalidate_schema_nodes— noinclude_str!ofdocs/, no doc-vs-code test. The repo already has the pattern for exactly this:flare-cli/src/cli.rs:2422debian_man_page_documents_every_visible_subcommandassertspackaging/debian/flare.1lists every visible subcommand. A 42-item hand list without such a check will drift, and finding #1 above doubles the drift surface. validate_schema_nodesitself has a duplicated arm.helios/src/grammar.rs:935-939("items" if value.is_array()) reproduces the array iteration of the"anyOf" | "oneOf" | "allOf" | "prefixItems"arm at:924-934, including anunwrap()that the adjacent arm avoids viaok_or_else— one arm with amatch value { Value::Array => …, _ => recurse }collapses both. Not requested by this PR; noted so the "structural" framing in the doc isn't mistaken for a faithful description of the code's shape.
Gates and contracts
Contracts, Charter & Verification Gates Audit — PR #704 (docs/api: enumerate accepted response_format JSON Schema keywords)
Verdict: No contract or verification gate blockers. All four hard gates pass. The PR is a 17-line, single-file prose change whose central factual claim I re-derived independently against the code and confirmed.
Gate 1 — Signed core-format / wire / captured-graph / public contract boundaries: PASS
pr_files= exactly one file:docs/api.md(+17/−0). No.proto, no core-format reader/writer, no captured-graph op family, no enum, no wire kind, no CLI/config setting, no shipped default — sodocs/design-review.md:22-26graph-family owner approval is not engaged (nothing is added "even if it reuses a graph kind or enum value").- It touches none of the normative documents the gate names (
docs/scheduling-theory.md(not opened),docs/scheduling-runtime-design.md(not opened),docs/core-format-design.md(not opened)).docs/api.mdis the correct, charter-designated location: the charter targets "the documented subset of … JSON Schema for structured outputs", andAGENTS.md:230routes API-behavior documentation to exactly this file. - No normative invariant is contradicted, and none is weakened (design-review principle 15 applies its criteria to documentation): the paragraph describes an existing rejection policy rather than relaxing one, so it cannot create a "don't silently ignore API fields" violation — it documents the reject-with-400 side of that rule.
- The documented contract is factually true (the only place a false contract statement could hide). Re-derived the headline claim myself:
- Code (
helios/src/grammar.rs:902-948): 12 distinct recursion keys ($ref,$defs,definitions,properties,patternProperties,anyOf,oneOf,allOf,prefixItems,items,additionalItems,additionalProperties) + 30 pass-through keywords at:943-948= 42. - Doc (
docs/api.md:931-939): 29 structural + 13 metadata = 42. Sets are identical — zero missing, zero extra, zero duplicates. - Bounds match code:
MAX_GRAMMAR_BYTES = 262_144,MAX_SCHEMA_NODES = 8_192,MAX_SCHEMA_DEPTH = 64(grammar.rs:23-25), enforced at:209and:884. - "HTTP 400" is sound on all four routes: every
AdmissionErrorexceptCapacity/Unavailablemaps toBAD_REQUEST(helios/src/server.rs:733-741),error_codeinvalid_grammarat:749, with wire-level coverage including Messagesoutput_config.format(helios/src/server/runtime/phase_tests.rs:8874-8925). $refsame-document rule matchesgrammar.rs:903-911; the four wire spellings matchhelios/src/server/protocol/decode.rs:466-504and:560-576.
- Code (
Gate 2 — Vendored upstream dependencies & cross-PR conflicts: PASS
- No vendored file is touched (e.g. no
helios/native/roce_proxy.c(not opened)), no dependency, pin, or recipe change, no external-repository reference added. - No dependence on an unmerged external recipe/PR. The only link is issue #449 as
Refs(deliberately notFixes), a maintainer-endorsed documentation ask — not an unmerged artifact.
Gate 3 — Mandatory verification evidence & failing tests: PASS
- No Layer 3 trigger. No GPU/CUDA/VMM execution path, no scheduler/cache/worker lifecycle, no TLA+/Kani domain, no core-format or export/serve change, and no performance claim (so no
main-vs-branch served-workload A/B benchmark is owed).docs/design-review.md:260-261("Pure documentation and formatting edits require inspection and applicable existing checks; they do not require simulator, formal, or GPU runs") and:268-270("Documentation changes do not require GPU tests") exempt this change directly. The:234-259enforcement clauses are scoped to "modifying the Helios scheduler, admission, speculation, cancellation, cache ownership, completion validation, readiness, or rank coordination" — no such modification exists. - No failing CI check and no failing test is reported on
77941c4in the PR description, its comments, or the Discovery Dossier. The PR honestly discloses its unrun suites ("no Rust, Python, simulator, formal, or GPU test suites were run because this PR modifies documentation only"). That disclosure is what principle 12 asks for, and:247-251("disclosure does not excuse skipping runnable CPU checks") is not breached because no crate is modified and no existing test assertsdocs/api.mdcontent — runningcargo testcould not validate this prose. I am not inferring a CI problem from tool limits; nothing shows a red check.
Gate 4 — Material scope / claim contradictions: PASS
- Scope claim confirmed; the inflated diff is drift, not scope.
pr_files= 1 file (+17/−0). The ~10 files rendered by the base-localpr_diffare stale-local-base drift, proven independently in both directions: (a)docs/api.md'sinvalid_grammar/context_length_exceededparagraph is absent on localmainand present atpr/704, matching merged #689 (whose own file list includesdocs/api.md +6/−3); (b)debian_man_page_documents_every_visible_subcommandis absent on localmainand present atpr/704(flare-cli/src/cli.rs:2422(not opened)), matching merged #687. No unrelated tooling is bundled; there is no thousands-of-lines payload. - No absent-evidence claim. The description's evidence section claims only a parity check plus
git diff --check/--stat— not a new test or benchmark that is missing from the diff. Correctly, the diff adds no test.
Info / Nit (explicitly not blockers)
docs/api.md:717-734(strict function tools) anddocs/api.md:927-942(output constraints) are two differently-scoped "closed" keyword lists ~200 lines apart, and the new paragraph does not relate them. Both are accurate for their own paths — strict tool schemas validate throughcompile_strict_validators(helios/src/grammar/strict.rs:63), while the final-answer schema walksvalidate_schema_nodes(strict.rs:1516-1522), so the new text's "output constraints" scoping at:930is correct and no conflict exists. Relating them would be a clarity improvement only.- Bookkeeping: the body cites commit
3d1614ccwhile head is77941c4; I re-ran the parity reasoning at head and it holds. The parity check is not committed as a drift guard; no gate requires one. - The 262,144-byte bound is measured on the re-serialized schema (
schema.to_string().len(),grammar.rs:209), not the request body, and is unstated as such. Not a contradiction with any normative doc, and unrelated tomax_body_bytes/413. - The enumeration is an admission floor, not a non-rejection guarantee —
{"type":"string","format":"not-a-format"}, dangling#/$defs/missingrefs, and booleanfalseroots still 400 after passing the allowlist. The text is scoped to "a closed keyword allowlist before grammar compilation" (:929-930), so this is not a contradiction.
No instruction-like or prompt-injection content was present in the PR material reviewed.
Code correctness
Deep Code Correctness, Invariants & Hot-Path Performance Audit — PR #704
Scope: docs/api.md (+17/−0), head 77941c4. This is a documentation-only change: the hunk adds one prose paragraph (docs/api.md:927-942) and extends the error-envelope paragraph (docs/api.md:257-261). There is no new or modified logic, no loop, no state machine, no numeric estimator, and no hot path. Per the partition rule (1 file, 17 lines) I audited directly without sub-agents.
Verdict: I found no Blocker, Major, or Minor code bug, invariant violation, or hot-path defect. Every factual claim in the diff traces 1:1 to code at the head commit, and I could not construct a counterexample in which the documented behavior differs from the implemented behavior.
Four-part protocol — where each check landed
1. Callee / enum-variant / design-invariant resolution (all claims opened, none assumed)
| Doc claim | Code verified | Result |
|---|---|---|
| 42-keyword allowlist (29 structural + 13 metadata) | helios/src/grammar.rs:902 ($ref), :913 ($defs/definitions/properties/patternProperties), :924 (anyOf/oneOf/allOf/prefixItems), :935 (items array form), :940 (items/additionalItems/additionalProperties), :943-948 (30 leaf keywords) = 1+4+4+3+30 |
Exact: 42 unique, 1:1 with the two documented lists, zero missing, zero extra, zero duplicates. The PR's parity claim is correct. |
$ref "same-document # references only" |
grammar.rs:902-912 |
Exact: reference.starts_with('#') else "must reference the same document". |
| 262,144 bytes / depth 64 / 8,192 nodes | grammar.rs:23-25 (MAX_GRAMMAR_BYTES=262_144, MAX_SCHEMA_NODES=8_192, MAX_SCHEMA_DEPTH=64); enforced at :209 and :884 |
Exact, including treating booleans as valid nodes (grammar.rs:890 precedes the as_object() cast, so true/false roots are not falsely rejected). |
| Four protocol surfaces | helios/src/server/protocol/decode.rs:466-506 (Responses text.format), :560-579 (Messages output_config.format, Chat/Completions response_format) |
Exact; runtime/phase_tests.rs:8874-8903 proves HTTP 400 invalid_grammar on all four paths. |
"HTTP 400 … keeping error.type as invalid_request_error", error.code ∈ the four names |
server.rs:733-741 (Error::Admission(_) → BAD_REQUEST except Capacity/Unavailable → 503), server.rs:743-755 (Grammar→invalid_grammar, Context→context_length_exceeded, Feature→unsupported_feature, Image→invalid_image), protocol/mod.rs:33-59 |
Exact. error.type is invalid_request_error on 400 (mod.rs:42); error.code is overwritten only for non-Messages (mod.rs:53-59), so the doc's deliberate exclusion of Messages from that sentence is correct rather than an omission. |
deprecated, nullable, uniqueItems, x-guidance rejected |
grammar.rs:949-954 fallback arm; test grammar.rs:1619-1643 |
Exact. |
2. Order-of-operations / state-transition tracing. The claim that these rejections "return HTTP 400" interacts with streaming, and that is where an ordering bug would live. Grammar admission runs inside spawn_blocking before any SSE headers are written (server/http.rs:209-285, with the early return at :288-292), so a streaming request with a bad schema also gets HTTP 400 — consistent with the doc's own separation at docs/api.md:264-267 ("admission failures after enqueue are terminal SSE errors"). Mid-generation parser poisoning (grammar.rs:868-874, fail() zeroing the mask) is the separate 500 output-validation path the doc already describes at line 256. No stale-flag read-before-write exists, because nothing in the diff reads or writes state.
3. Adversarial boundaries. Taking the guards literally (depth > MAX_SCHEMA_DEPTH || *nodes > MAX_SCHEMA_NODES, > MAX_GRAMMAR_BYTES): depth exactly 64 and 8,192 nodes pass, 65 and 8,193 fail; a schema of exactly 262,144 bytes passes, one byte more fails. The doc's phrasing "exceeding 262,144 bytes, depth 64, or 8,192 nodes" is therefore exact, not off by one. A pathological deep-but-narrow schema cannot reach the depth gate via stack overflow first either, because serde_json refuses to parse beyond its 128-level nesting limit, so schema.to_string() at grammar.rs:209 cannot blow the stack ahead of the recursive walk at :877.
4. Hot-path big-O. Untouched. The walk is one O(nodes) pass per request with nodes capped at 8,192, run on the blocking preparation pool, plus one linear re-serialization at :209. No per-iteration allocation was added and no scheduling, cache, or per-step path is involved.
Two precision caveats (judgment calls for the author, not defects)
- "Accepted" is slightly stronger than the code guarantees. Allowlisting a keyword does not mean a schema using it compiles.
grammar.rs:1623-1630shows{"type":"string","minLength":-1},{"type":"string","format":"not-a-format"},{"type":"integer","minimum":5,"maximum":1}, and the ambiguous{"oneOf":[{"type":"integer"},{"type":"number"}]}all still return 400 — and so does{"$ref":"#/$defs/missing"}despite satisfying the documented#rule. A caller reading "accepted … keywords areformat,minLength,minimum,maximum,oneOf" could reasonably expect such schemas to be admitted. The adjacent sentence already says "Any other keyword … return HTTP 400", which is precise; the risk is only that the reader generalizes it to "these keywords are always fine". - The 262,144-byte bound measures a re-serialization, not the wire bytes.
grammar.rs:209checksschema.to_string().len()— the compact re-encoding of the decoded value — so a schema sent with generous whitespace can exceed 262,144 bytes on the wire and still pass, while one padded inside string literals differs. Also note the byte check precedesvalidate_schema_nodes, so a >256 KiB schema fails with "exceeds … bytes" before depth/node limits are consulted.
One process observation, reported as a finding about the material rather than a code bug
pr_files reports a single changed file, but the full pr_diff also contains hunks in AGENTS.md (not opened), docs/TODO.txt, docs/cli-design.md (not opened), docs/core-design.md (not opened), docs/model-preparation.md (not opened), docs/scheduling-runtime-design.md (not opened), flare-cli/src/cli.rs (not opened), and flare-cli/src/orbit/agent.rs (not opened) — including a genuinely testable new test, debian_man_page_documents_every_visible_subcommand (flare-cli/src/cli.rs:2421-2454 (not opened)), which parses .SH COMMANDS from packaging/debian/flare.1. That fixture does exist and does contain .SH COMMANDS at line 12, and the sibling change in flare-cli/src/orbit/agent.rs (not opened) (systemd Description "a orbit's" → "an orbit's", plus a matching new assertion) is internally consistent. I did not audit these outside the declared scope, and I could not inspect the commit stack to see whether they belong to this PR: search_history fails with Could not read c513e46a79f3b6ac510235aaf09bcf055b841958 … Failed to traverse parents of commit ef38cb9395f6b2cb2a6598cb7b603177a93d0029f4, indicating a shallow clone. The doc content itself is accurate, so this affects review bookkeeping rather than correctness; flagging it so the diff you believe you are merging is the diff that gets merged.
Recommended action: merge as-is. Optionally soften "Accepted … keywords are" to make clear that a listed keyword can still be rejected by value (e.g. a negative minLength, an unknown format, contradictory bounds, a dangling #/$defs/... $ref), and say the 262,144-byte limit applies to the decoded schema as re-serialized.
Final review
Recommendation: Ready To Merge
This is a single 17-line prose addition (docs/api.md:927-942, pr_files = 1 file, +17/−0) that documents an existing closed-keyword policy. I re-derived the headline claim at head 77941c4 rather than trusting the description: validate_schema_nodes (helios/src/grammar.rs:877-958) accepts exactly 42 keywords (1 $ref + 4 object-map + 4 array + 3 schema-valued + 30 pass-through = 42), and the doc lists 29 + 13 = 42 with zero missing, zero extra, zero duplicates, so the parity claim holds even though the body cites commit 3d1614cc instead of head. Bounds (262_144/64/8_192, grammar.rs:23-25) and the strict-> enforcement (:209, :884) match the doc's "exceeding …" phrasing with no off-by-one, and HTTP 400 holds on all four routes (server.rs:733-741, :749; phase_tests.rs:8874-8926). I found no verified code bug, no contract/gate violation, and no evidence-backed reason to block; the remaining items are non-binding clarity nits.
Merge Risk
Level: Low
- Documentation-only: no runtime, wire, config, dependency, core-format, or captured-graph surface is touched, so
docs/design-review.md:260-261and:268-269explicitly exempt it from simulator, formal, and GPU runs. - The only factual risk is future drift — nothing pins
docs/api.mdtovalidate_schema_nodes(noinclude_str!ofdocs/, no doc-vs-code test;helios/README.md:130only links the file). A later keyword change would silently diverge. - Merge-conflict risk is the usual high-churn one for this file (
items_touchingshows 15 merged + 14 open PRs in 180 days), but nothing landed after the branch point touches these lines.
Walkthrough
- Adds one paragraph at
docs/api.md:927-942in## Conversation and tool semantics(heading:488), immediately after the existing output-constraint paragraph at:918-925. - Names the four wire locations and they are exactly right: Responses
text.format(helios/src/server/protocol/decode.rs:466-506), Messagesoutput_config.format(:561), Chatresponse_formatreadingformat["json_schema"]["schema"](:562→:568-570), Completionsresponse_formatreadingformat["schema"](:562→:572). - Lists 29 "structural and constraint" keywords (
:930-936) and 13 "metadata and annotation" keywords (:936-939) — verified 1:1 againstgrammar.rs:902,:913,:924,:935,:940, and the 30-key pass-through arm at:943-948. - States the rejections: other keywords (
deprecated,nullable,uniqueItems,x-guidance), external$reftargets, and schemas over 262,144 bytes / depth 64 / 8,192 nodes return HTTP 400 — all traceable togrammar.rs:902-911,:949-954,:209,:884, and covered by the existing testunsupported_invalid_and_external_schemas_fail_before_admission(:1616-1644). - The second hunk
pr_diffrenders indocs/api.md(:257-262, typederror.code) is not this PR's change: that text already exists onmain(merged #689). Likewise theAGENTS.md,docs/cli-design.md(not opened),docs/core-design.md(not opened),docs/TODO.txt,flare-cli/src/cli.rs, andflare-cli/src/orbit/*hunks are stale-local-base drift from already-merged PRs —pr_filescorrectly reports one file, anddebian_man_page_documents_every_visible_subcommandis absent frommain(I searchedflare-cli/src/cli.rsatmain: no match), confirming merged #687 carries it, not #704.
Pre-merge Checks
- [PASS] Security / malicious screen: No code path, no injection or instruction-like content in the PR body, comments, or diff; nothing executed or sent.
- [PASS] Charter & value fit: Documents the "documented subset of … JSON Schema for structured outputs" (Charter line 33), is the maintainer-endorsed fix shape ("solve it without new code at all"), and states a reject-with-400 policy rather than weakening the
#417"don't silently ignore" rule. - [PASS] Related / duplicate / conflict check: #449 is the only linked item and this implements its second ("list the accepted keywords") branch; no other PR or issue enumerates this allowlist. No commits after the branch point touch the changed lines.
- [PASS] Tests & verification evidence: Documentation-only, correctly discloses unrun suites;
docs/design-review.md:260-261/:268-269exempt pure documentation from simulator/formal/GPU runs, and no existing test assertsdocs/api.mdcontent, so no runnable check was skipped.
Blockers
None.
Should Fix
None.
Subtract / Simplify
docs/api.md:930-939restates 26 of its 42 keywords that the same file already lists at:722-725. I verified containment against code rather than by eye: strict tools validate throughSUPPORTED_KEYS(helios/src/grammar/strict.rs:147-174, applied at:214) = 26 keys, a strict subset of the 42 invalidate_schema_nodes. Saying "the strict function-tool keywords above plusoneOf,allOf,patternProperties,minProperties,maxProperties,additionalItems,format, and the metadata/annotation keywords" would replace 26 restated keywords with an explicit subset relation and remove the need to edit two hand-maintained lists on any future keyword change. Non-blocking: both lists are individually accurate because the two paths genuinely differ.docs/api.md:936-939: the "metadata and annotation" label files$anchor,$id,id,$schemaas metadata, though those change reference resolution. The code's only real axis is recursed-into vs. accepted-as-a-leaf (grammar.rs:902-948). Collapsing to one list, or relabeling by that axis, spares the reader a two-list union to answer "may I send X?".
Nits
docs/api.md:930/:939-942: allowlisting a keyword is necessary but not sufficient.grammar.rs:1624-1631shows{"type":"string","format":"not-a-format"},{"oneOf":[{"type":"integer"},{"type":"number"}]},{"$ref":"#/$defs/missing"},{"type":"integer","minimum":5,"maximum":1}, andfalseall still return 400 after the walk. The text is correctly scoped to "before grammar compilation" (:929-930), so this is not a false claim — one clause ("meeting the allowlist does not by itself guarantee admission") would prevent predictable support load.docs/api.md:941: the 262,144-byte bound is measured on the re-serialized schema (schema.to_string().len(),grammar.rs:209), not the request body, and is the sameMAX_GRAMMAR_BYTESthat bounds Lark grammars (:618) and custom-tool regexes (:549). Naming the measurement removes the 400-vs-413 confusion againstdocs/api.md:253(max_body_bytes→ 413).docs/api.md:941:x-guidanceis a llguidance-internal extension key that appears in this repo only in tests (grammar.rs:1626,:1640) and in a code comment as the generic "compiler option extensions" (:198-199); the three real keyword examples carry the same information without naming a dependency's internals.- Registering the two lists against the strict-tool paragraph would also need
$refworded once::931"same-document#references only" vs:723-724"local$refto#,#/$defs/<name>, or#/definitions/<name>" — the code only checksstarts_with('#')(grammar.rs:903-911). - Bookkeeping: the body cites
3d1614ccbut head is77941c4; I re-ran the parity reasoning at head and it holds. Nothing pins the new list to code (the repo already has the pattern for exactly this atflare-cli/src/cli.rs, the man-page/subcommand test), so a cheap drift guard would be optional hardening, not a gate requirement.
Dropped on verification
- "Two unreconciled
closedkeyword lists are a defect this PR should fix." Dropped as a defect claim (kept only as nits above). Strict tool schemas validate through a different function with a different 26-key allowlist (strict.rs:147-174/:214), while final-answer schemas walkvalidate_schema_nodes, including on the strict-tool path viaprepare_answer_subgrammar(strict.rs:1515-1522, same byte/depth/node checks). Both lists are accurate for their own path; the new text's "output constraints" scoping at:930is correct and creates no contradiction. - "The doc omits that these rejections carry
error.code: invalid_grammar" (#689 cross-reference). Dropped: status and envelope are separate claims anddocs/api.md:257-262(already onmain, from merged #689) states the envelope. The omission is a cross-reference nicety, not an inaccuracy. - "
x-guidanceis not a compiler extension, so the doc mischaracterizes it." Dropped:x-guidanceis rejected byvalidate_schema_nodes' fallback (grammar.rs:949-954) and tested at:1626/:1640for both schema and Lark paths, so calling it a rejected compiler extension is factual. - "The
$refwording contradicts the strict-tool paragraph, so one of them is wrong." Dropped:grammar.rs:902-911checks onlyreference.starts_with('#'); both phrasings describe the same rule at different granularity, neither is false. - "
items-array duplication atgrammar.rs:935-939(withunwrap()) is a defect to report." Dropped: it is upstream code untouched by this docs-only PR, and theunwrap()is guarded by the adjacentvalue.is_array()match guard at:935, so it cannot panic. - "
git diff --statshows ~10 files, so the PR bundles unrelated changes." Dropped:pr_files= one file. I proved the extra hunks are stale-local-base drift in both directions — theerror.codeparagraph exists onmain(docs/api.md:257-262, merged #689), anddebian_man_page_documents_every_visible_subcommandis absent frommain(merged #687). - "Missing CI is a gap." Dropped per calibration: no check failed and no red status was reported; a docs-only change is explicitly exempt from the mandatory-run gates (
docs/design-review.md:260-261), and the PR discloses its unrun suites honestly. - "Charter 'bring real evidence' bar is unmet because the parity script is uncommitted." Dropped as a blocker: the claim is hand-verifiable and I independently reconfirmed it;
docs/design-review.mdrequires inspection plus applicable existing checks for prose, not an artifact. - "No
docs/TODO.txtentry is needed / is missing." Dropped: a search forkeyword|allowlist|deprecated|uniqueItemsindocs/TODO.txtreturns nothing, and this change records present behavior rather than an unresolved defect, soAGENTS.md:52-60does not require an entry. - Any instruction-like content in the reviewed material: none found.
Full report · Notes Decision to Test: no (95%): Testing will not add significant value as the code stands today. The code is either not yet ready to merge, or adequate testing has already been done to validate the contents of the code, or the available hardware is not suitable to test with.
Classify triage
Selected: triage:review
Threshold: 65%
Triage
- [✓]
triage:review: 94.8% -
none: 4.7% -
triage:verify-for-closure: 0.2% -
triage:integration: 0.1% -
triage:partial: 0.1% -
triage:design-review: 0.1% -
triage:superseded: 0.0% -
triage:validation: 0.0% -
triage:investigate: 0.0%
Apply labels
No label changes