← Back to Pull requests

handle EOF uniformly and silently #382

Closed
unknown closed this pull request without merging on Oct 06, 2026 12:08 UTC
View on GitHub
unknown unknown commented on Sep 19, 2026 10:54 UTC
Author

We have a few forwarding threads and the client in TestDAP forever reading 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 SomeException and 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 (for Disconnect and finally), other stops at sigTERM (for Terminate)
- 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.

Diff: 191 lines (+143 / -48) across 2 files Reviewer: Saizan Review duration: 24554m
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
0.36
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 35.9% (MEDIUM) · Higher = larger blast radius
35.9%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 14.2% · Safe to merge
14.2%