handle EOF uniformly and silently #382
All Vouch review confidence checks passed
Residual risk 0.14 = Change Risk (0.36) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.36 · 191 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 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.315
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #382"
general
weight: 0.35
Saizan
We have a few forwarding threads and the client in TestDAP
foreverreading from an Handle. As there's no other stopping condition these are bound to raise EOF even when everything is working as expected, so the exception should be handled.Some of these threads were not catching any exception which possibly made tests flakier than needed to be.
Others were catching
SomeExceptionand ignoring it without special casing AsyncExceptions, which could become a problem in itself.Now these all use
silenceEOF :: Handle -> IO () -> IO ()which ignores only EOF and only on the Handle we are trying to read from.We should review if any of these should report the end of the stream higher up.
Also expanded to fix #325:
- [X] fixed the hClose problem from there.
- [X] made cleanupInterp more effective, and now supports two modes: one escalates to
sigKILL(forDisconnectandfinally), other stops atsigTERM(forTerminate)- As long as DAP handler thread blocks on exec/eval/resume results we can't handle these commands properly though.
- Main debugger thread should not block either to allow for an internal Terminate command. (This is also useful for multi-threaded debugging support, so good way to go anyway).
- [x] Handle HDB host shutting down before runInTerminal process managed to connect: probably using a temp file to signal whether session still alive. If session no longer alive exit cleanly, otherwise print user error.
- [x] Update/Add note about the design.