fix(studio): serialize SSE error events as valid JSON #219
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.49) × (1 − Review Confidence (0.64)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.49 · 533 lines diff across 7 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.35 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.376
Real PR Conversation Timeline
2 items
Approved
Reviewed the SSE serialization and shared reader changes with the regression tests. The failed format job was a Maven download HTTP 429, not a formatting finding.
yuluo-yx
Duansg
Describe what this PR does / why we need it
Contributing to ARGI: Studio SSE error events are now always valid JSON, and the UI no longer silently drops malformed error events.
Does this pull request fix one issue?
Fixes #192
Describe how you did it
StreamErrorResponsewith the existingObjectMapper, with a constant fallback if serialization fails. Event name and fields (error,errorType,errorMessage) are unchanged.argi-api.tsuses one SSE reader for both streams: an unparsableevent: errornow fails the stream, while malformed normal data lines are still skipped. It also handles CRLF, chunk boundaries and a trailing event without newline.Describe how to verify it
./mvnw -pl :argi-studio -am test(newStudioStreamErrorEventTest: quotes, backslashes, Windows paths, tab, CR, LF, Unicode, null message, serializer failure).pnpm testinargi-studio/agent-chat-ui(15 tests, including split-chunk and malformed error event cases).Special notes for reviews
Bundled static assets under
META-INF/resources/chatuiare not rebuilt in this PR, consistent with previousargi-api.tschanges. No browser end-to-end run.