Repository navigation
fix(eval): accept run event envelope fields on managed eval stream frames - #5335
Conversation
…ames Since the Runs API added the run event envelope fields (run_id, event_class, span_id, parent_span_id, turn_id, origin_event_type, origin_custom_name, unrecoverable_fields) to every RunStreamFrame, the managed eval adapter's strict frame schema rejected the first frame and failed every managed eval. Validate frames against the published RunStreamFrame contract instead: the five base fields stay required, the envelope fields are checked against the run event envelope schema when present, and fields added later are dropped.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
📦 Client bundle boundary
A server module in a client graph aborts hydration in the browser. New leaks fail CI; known leaks are tracked in |
|
@codex review |
|
Score: 88/100. Small, well-scoped fix that makes the managed eval stream adapter accept the published
I reviewed the diff statically and did not run the tests. Nothing here blocks merge. Generated by Claude Code |
|
Codex Review: Didn't find any major issues. Keep it up! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
Addressed both minor concerns in 2aa6ed9: the schema comment now states that the adapter checks envelope field shapes only and skips the |
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|



Managed evals on staging fail on the first frame of the agent child's
GET /runs/{run_id}/stream. The eval report recordsInvalid canonical managed eval stream frame.Since veryfront-api#6054, every
RunStreamFramecarries the run event envelope fieldsrun_id,event_class,span_id,parent_span_id,turn_id,origin_event_type,origin_custom_nameandunrecoverable_fieldsbeside the five base fields. The published contract lists them as optional properties.adaptManagedEvalRunStreamvalidated frames with.strict(), so the extra fields rejected every frame.Changes:
RunStreamFramecontract. The five base fields the adapter reads stay required and keep their checks, together with thepayload.type, SSEeventandidagreement checks. The envelope fields are optional, and when present they are checked againstgetRunEventEnvelopeSchemafromrun-events/envelope.ts, so a malformedevent_class,span_idorunrecoverable_fieldsis still rejected. Fields the contract adds later are stripped, because the API extends the frame additively.Audit of other parsers of the same frames or rows (same bug class): none found.
runs/target/client.tsisCanonicalFrame(SDK stream),runs/runs-client.tsevents(), the live-evals runner andrun-events/envelope.tsall accept or strip extra top-level fields. The nearby.strict()schemas parse POST/runs/{id}/eventsappend receipts, control-plane payloads or the separatecanonical-v1representation, so they are a different class.Verification:
deno task test:file src/server/handlers/request/managed-eval-run-stream.test.ts: red (2 failures) before the fix, 15/15 afterdeno task test:file src/server/handlers/request/project-run-execute.handler.test.ts: 458 steps passdeno task test:unit: pass (Deno 2.9.7)deno task lint:testing-front-door,lint:test-semantic-dispositions,lint:dependency-boundaries,lint:module-boundaries,lint:anti-slop: passCloses veryfront/veryfront-issue-inbox#3578