Re review report · NVIDIA/hyperflare-inference #689

Raw Markdown for agents: https://autobot.eidonix.com/p/b7582f71-91db-4cb8-8ad1-c71b2d77c9fc.md

Recommendation: Ready To Merge

Commit 4695d84 resolves all four items from the prior review cleanly and introduces no regressions: AdmissionError::Invalid now stays on invalid_request_error alongside untyped HTTP 400 checks, the dead FrontendError::ImageDecode branch is gone, make_state reuses http_state_for, and docs/api.md documents the four typed HTTP 400 error.code values on OpenAI-shaped endpoints. The implementation fixes #446 at the right layer with exact parity on HTTP status codes, x-request-id/logging boundaries, Anthropic envelopes, and spawn_blocking permit lifetimes; confirm green CI on 4695d84 before merging.

Merge Risk

Level: Low

Walkthrough

Pre-merge Checks

Blockers

None.

Should Fix

None.

Subtract / Simplify

  1. Collapse duplicate PreparationError::Http arms (helios/src/server/http.rs:124-132, optional): Arms 1 and 3 of preparation_error construct the identical PreparationError::Http(StatusCode::BAD_REQUEST, ...) expression. They can be combined into two arms so the "all AdmissionError except Invalid" rule appears once:
    fn preparation_error(error: Error) -> PreparationError {
        match error {
            Error::Admission(kind) if !matches!(kind, AdmissionError::Invalid(_)) => {
                PreparationError::Failure(Error::Admission(kind))
            }
            other => PreparationError::Http(StatusCode::BAD_REQUEST, other.to_string()),
        }
    }
    

Nits

None.

Dropped on verification