V37 Gate 3: Conversation Stream UI And Event Contracts#113
Conversation
Add the source-safe ConversationStreamEvent contract artifact, generator, and gate checker for model deltas, tool calls, retrieval summaries, proof roots, retry states, completion decisions, and error rows. Bind stream metadata through the API route, mock stream envelope, conversation stream hook, pipeline state, and rich execution log header while preserving prompt/result disclosure posture and fail-closed metadata. Update V37 specs, roadmap, workflows, package scripts, and focused tests for protocol, API, route, UI, and Jest allowlist coverage.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 182d11a9f1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| case 'token': | ||
| completedContent += event.data; | ||
| throttledTokenUpdate(event.data); | ||
| emitConversationStreamLog(); |
There was a problem hiding this comment.
Avoid counting every token chunk as an AI generation
Emitting emitConversationStreamLog() inside the 'token' branch creates a synthetic pipeline event for every streamed chunk, and those events are typed as generation; downstream, handlePipelineEvent increments the AI/generation counter whenever event.type === 'generation'. For long responses this inflates the header counter from “model calls” to “token chunks,” which makes execution telemetry inaccurate.
Useful? React with 👍 / 👎.
| setRunLogDetails(prev => ({ | ||
| ...prev, | ||
| [logEntry]: event, | ||
| })); |
There was a problem hiding this comment.
Store run log details by unique event id, not status text
Using logEntry as the map key causes collisions when multiple events share the same collapsed status (for example, repeated model_delta rows like "Assistant model delta streamed"). Each new chunk overwrites prior metadata, so expanding earlier log lines shows the latest event's proof root/event id instead of the line’s own details.
Useful? React with 👍 / 👎.
Keep the V37 gate-quality workflow finite with a job timeout and maintained targeted package checks for the gate package step. Record the CI greenability posture in V37 notes so the stream-event gate closes with explicit workflow health evidence.
Summary
Validation