Repository navigation
fix(diagnostics): handle late request errors until socket close - #35496
Conversation
[Medium impact] The PR appears safe to merge; no actionable defects were found. SummaryKeeps the diagnostic request’s error handler attached until the request closes.
Reviews (4) · Last reviewed commit: "fix(diagnostics): handle late request er..." · Reviewed by Greptile |
|
Important Review skippedReview was skipped as selected files did not have any reviewable changes.
|
7f320ed to
38de0ff
Compare
38de0ff to
19c7faa
Compare
LoC: +17/-1
Prevent a diagnostic-upload timeout from raising an uncaught main-process error. Rejecting the timeout destroys ClientRequest, which can emit ECONNRESET asynchronously after the old cleanup removed its error listener. Retain the existing guarded handler until request close, then remove it. The actual main-process guard rethrows this error code.
Validation:4 configured tests,1 expected baseline regression/3 controls,strict focused TypeScript and all5 normal hook tasks pass. Exact production code through real Node24 HTTP:22 scenario groups per arm,N1/10,110 requests each; baseline11 uncaught errors→final0. Healthy JSON/empty replies, cap rejection, malformed/error responses, peer resets, finite flowing bodies and request headers/body are preserved. Separate no-handler subprocesses at both short and actual10s token timeouts:baseline exits1,final exits0 with the handled timeout rejection. Final request error handlers disappear after real close; all owned sockets/timers clean up.
Required aggregate queued after #35493; no aggregate pass or Claude takeover claimed. Source-reviewed settings/IPC/upload/main-fatal-guard path and6 source blobs equal mainad500702. Native Orca/Electron and live support service were not launched; no TLS/macOS/Windows/CPU/heap/latency claim. No new deadline, transport, wire contract, UI or dependency operation. Failed fixture assumptions and broader prototype attempts are retained in the evidence report.
Frozen head
4d2fb3c04454543f5ed95e9bf44253429c620004, base79dbada2c873bef3584a0c53b23ae98f2a84e536. Evidence/home/neil/.local/state/orca-electron-audit/diagnostic-http-request-retirement/report.md;62-payload seal1cc84f5c8736817c0f22e812e33dedb4bf1cf7a602780b9e674a553df02ec56e.