fix(executor): log metadata-only diagnostics when codex SSE ends without completion #6497
All Vouch review confidence checks passed
Residual risk 0.23 = Change Risk (0.40) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 306 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 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
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.343
Real PR Conversation Timeline
1 comments
"Review active on #6497"
general
weight: 0.35
ggbdpq
Summary
RecordAPIResponseError— which is gated behind request-log capture that operators can't enable on live traffic because it records private prompt/tool bodies. A 22-second clean EOF and a ~900-second transport hang are indistinguishable (#6469).Two design choices worth flagging for review: (1) the diagnostic line is a default-on, low-frequency warning on the failure path rather than an opt-in flag — happy-path streams never log it; happy to convert to a config switch if preferred. (2) idle time is measured from the last SSE event received, not from request start.
Verification
| Check | Result |
|---|---|
|
go test ./internal/runtime/executor/... -count=1| ok (executor + helpers, no flaky reproduction) || New tests, run before the fix (red) and after (green) |
TestCodexExecutor_IncompleteStreamLogsTerminationDiagnostics,TestClassifyCodexSSEReadError(11 cases incl. peer-address non-leak) ||
go build ./cmd/server| ok ||
gofmt -lon touched files | clean ||
go veton touched packages | clean |Fixes #6469
AI use
Code and tests were drafted with GLM-5.3-Flash (ZCode) under human direction. The human reviewed the diff, validated the root-cause chain against the issue report, and ran the verification matrix locally.
Checklist
go build ./cmd/serverpassesinternal/translator/