Amendments to the case file on PR #689 (report of 2026-12-02, run 3046)
Prior report was written at head 2f72e1b (+442/−23 in 2 files). The new event — head commit 4695d846, jcartu's reply at 21:53Z, and the flare-autobot review at 21:25Z — supersedes parts of it. Below: only what changed, then the errata, then what still stands.
Key findings (new event only)
- The scale and scope changed: head is now
4695d846, +440 / −26 in 3 files —helios/src/server/http.rs(+107/−23),helios/src/server/runtime/phase_tests.rs(+327/−0), anddocs/api.md(+6/−3) (pr_files). The prior report's "+442/−23 in 2 files" and "no docs are touched / docs need no edit" are retracted. - Two of its findings are fixed, not open: the
invalid_requestcode split and the unreachableFrontendError::ImageDecodearm. Both retractions are verified at head. - One new, real defect remains: the docs edit at
docs/api.md:257-261contradicts the sentence immediately above it atdocs/api.md:250-251. - One Autobot review and an author reply now exist; still zero human review and no CI on
4695d846.
1. What the new commits changed (verified at head)
invalid_requestsplit closed.preparation_errornow routesError::Admission(AdmissionError::Invalid(_))toPreparationError::Http(StatusCode::BAD_REQUEST, …)(http.rs:126-128), which renders throughProtocol::error(protocol/mod.rs:33-52,_ => "invalid_request_error"at :42), identical to the untyped arm at http.rs:130.error_code's"invalid_request"atserver.rs:751is therefore no longer reachable from preparation; the only remaining post-submissionrejectioncalls are http.rs:356 and http.rs:361.- Unit coverage:
preparation_error_preserves_typed_admission_errors_and_keeps_untyped_bad_requests(http.rs:739-807) — typed cases at 741-784, and at 785-806 bothAdmissionError::Invalid("bad stop")and a plain string error assert HTTP 400 +body["error"]["code"] == "invalid_request_error". - Wire coverage: the new "4b" block at phase_tests.rs:8702-8730 — 5
stopstrings (rejected byvalidate_strings, server/stops.rs:63-71,strings.len() > 4) andmax_tokens: 0(rejected as a plain string, request.rs:615-616) both assertinvalid_request_errorfor bothtypeandcode. Note the test cites "#4 stops.rs:63-71" in my earlier note but the file ishelios/src/server/stops.rs.
- Unit coverage:
FrontendError::ImageDecodearm deleted, and it was dead code.grep ImageDecodeat head returns only the variant definition (error.rs:140) and the match arm insiderequest::prepare(request.rs:32); nothing constructs it — image decode failures are wrappedAdmissionError::Imageat request.rs:1166 and 1194. Deletion is sound, and the second divergence I flagged (Asset/Template/Tokenizer/Input flattening) is no longer client-visible, becauserequest::preparealso maps those toAdmissionError::Invalid(request.rs:35), which now rendersinvalid_request_errortoo.- Test setup simplified as the review asked:
make_statenow builds the sharedHttpStateviahttp_state_for(...)and mutates it throughArc::get_mutforimages,max_body_bytes,context_hint(phase_tests.rs:8444-8465) instead of a hand-rebuilt 21-field literal. - Line-number corrections for the prior report: unit test is http.rs:739-807 (was 739-786); wire test spans phase_tests.rs:8438-8763 (was cited as ...8792).
2. New finding — the docs sentence contradicts the paragraph it sits in
docs/api.md:248-262 in one paragraph now says both:
- api.md:250-251 — "Malformed, unsupported, and over-context requests return HTTP 400 (
invalid_request_error)"; and - api.md:257-261 — "On Chat Completions, Completions, and Responses, typed HTTP 400 rejections set
error.codetocontext_length_exceeded,unsupported_feature,invalid_grammar, orinvalid_imagewhile keepingerror.typeasinvalid_request_error."
Over-context requests are exactly the context_length_exceeded class, so sentence 1 now understates and contradicts sentence 2. The new sentence also never says which 400s keep invalid_request_error (invalid JSON, the invalid_request validation class, and—though 415, not 400—unknown Content-Encoding), so a client author cannot derive the rule from the doc. The protocol scoping in the new sentence is correct: Messages bodies carry no code/param (protocol/mod.rs:45-50, 53-58). This replaces my prior "docs need no edit" note; that note and the "docs give clients no warning that code differs from type" gap were resolved by the edit except for this wording defect.
3. Process amendments
- Prior note "no reviews, no comments" is stale. There is now a flare-autobot case-file comment (2026-12-02 21:09) and a Changes Requested review (21:25; 0 blockers / 1 should-fix / 2 simplify / 1 nit: the
invalid_requestsplit, the deadImageDecodearm, the duplicatedHttpStateliteral, and a doc nit), plus jcartu's reply at 21:53Z claiming all four addressed in4695d846. The diff corroborates all four (items in §1 and §2). - Still no human review and no CI checks on
4695d846. The re-reported totals (helios 1,880 passed / 84 ignored, flare 254 / 4, flare-cli 245 / 3) remain author-local, exactly the same numbers as before the commit, which is worth noticing: the commit added assertions and a rewritten test helper but the reported count did not move. - No labels were added; issue #446 is still the sole driver, and no competing PR has appeared.
4. Errata — line-by-line against the prior report
Retracted (do not repeat as open issues): (a) "explicit AdmissionError::Invalid now returns code: invalid_request — a client-visible change beyond #446's four codes"; (b) "the FrontendError::ImageDecode branch is unreachable"; (c) "FrontendError Asset/Template/Tokenizer/Input flatten to invalid_request_error, diverging from request::prepare"; (d) "no reviews/comments exist"; (e) "no docs are touched / docs need no edit".
Amended: scale (+440/−26, 3 files at 4695d846); process (one Autobot review + author reply); test/line citations in §1.
Unchanged and still valid:
- No HTTP status code changes. Every reachable preparation
AdmissionErrormaps to 400 (server.rs:733-741);Capacity/Unavailable→ 503 at :735-737 but preparation cannot produce them. The description's "status fromstatus(&error)" stays true but vacuous. - Preparation failures still carry no
x-request-idand no stderrfailure_log:failure_response(http.rs:26-31) does not callwith_request_id; both live only inrejection(http.rs:32-41). Consistent with docs/api.md:261-262 and docs/core-design.md:1119-1121 — no drift, no regression. - Metrics gap persists: preparation rejections increment only
http_requests[metric](http.rs:160), notflare_requests_failed_total(metrics.rs:1091-1095) — #692 territory (same author, same day, same file). - Hints:
context_hintstill applied toAdmissionError::Contextviarejection_details(http.rs:60-72);capacity_hintunreachable on this path. - Related items unchanged: #446 (driver, open, confirmed by yatesdr), #692 (open, failure accounting, http.rs/runtime.rs (not opened)), #691 (open, cached-token stats, http.rs), #638 (merged; precedent of editing
docs/api.mdfor a wire change, plus the neighbouringget_responses_returns_bad_request…test at http.rs:720-737), #418 (merged, jcartu; origin ofcompile_strict_validators, request.rs:88-113). - No in-repo breakage: Python integration tests assert only
error.type(tests/server/test_protocols.py:620 (not opened), tests/server/test_decisions.py:218 (not opened)) orcode == "model_not_found"(test_protocols.py:85 (not opened)). The Python suite was not run by the author.
Open questions
- Will the reviewer insist the
api.md:250-251sentence be rewritten to separate typed from untyped 400s, or is a follow-up acceptable? (Sibling #638 is the precedent for fixing docs in-PR, and this PR is already editing the same paragraph.) - Why is the reported helios total identical (1,880 passed / 84 ignored) before and after a commit that adds assertions and rewrites the test helper — did the commit replace tests rather than add them, and do the reported numbers come from
4695d846at all? No CI exists to check. - Whether the author's other same-day
http.rsPRs (#691, #692) will textually conflict with the preparation closure and helper block here; nothing onmainhas landed in these files since the branch base.
Note: nothing in the PR body, the review, or the author's reply attempted to direct tooling; the content was treated as review material only.