Skip to content

fix(diagnostics): enforce elapsed HTTP request deadlines - #35555

Closed
OrcaWin wants to merge 1 commit into
audit/diagnostic-http-request-retirementfrom
audit/diagnostic-http-absolute-deadline
Closed

OrcaWin wants to merge 1 commit into
audit/diagnostic-http-request-retirementfrom
audit/diagnostic-http-absolute-deadline

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​49 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​48
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​3 0 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​3

LoC: +52/-1

Enforce the configured elapsed deadline for diagnostic token, upload and delete requests. Node's socket timeout only detects inactivity, so a continuously trickling response can keep the settings Send action waiting past its 10/30-second request budget. Add one timer through the existing timeout/destruction path and clear it on settlement; retain idle detection and late socket-error handling.

Stacked on #35496. Reconcile/merge that parent first, preserve its error handler through request close, then retarget/rebase main and revalidate. #22236 addresses the older teardown error, not this elapsed bound.

Validation: six configured tests, strict focused TypeScript and all five normal hook tasks pass; exact parent fails one regression and passes five controls. Real Node26.8.1 HTTP, one exact production module, 17 groups/89 requests per arm at N1/10: 34 trickling requests/sockets remain live at three budgets before vs zero after. With the real 10s token budget, baseline still waits at 30s; final rejects at 10003.66ms. Short final cases settle in 150.90–158.93ms for a 150ms budget; these are observed intervals, not a strict wall-clock guarantee. Timely streamed JSON/healthy/idle/size/status controls and POST byte counts preserved; all 178 connections and fixture timers/servers released. No Electron UI, TLS/live support endpoint, macOS/Windows, CPU/RSS proof.

Initial fixture close-observer and baseline async-assertion artifacts are preserved with corrections; exact committed production bundle verified. Aggregate queued after #35550; no pass or Claude takeover claimed. Frozen head fc819396d7fe84052ca7e12a51e4903ec8edbd70; parent 4d2fb3c04454543f5ed95e9bf44253429c620004. Evidence /home/neil/.local/state/orca-electron-audit/diagnostic-http-absolute-deadline/report.md; 49-payload seal 1ddc7a9bcc91b780f17b032ddbeab66bc51c52018490968ef8600a9e1a4a8f3f.

@OrcaWin

OrcaWin commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator Author

Closing. The trickle-response case only happens if Orca's own diagnostics endpoint misbehaves, so real users don't hit it. The hard deadline would also apply to the 4 MiB bundle upload (30s budget), so a slow upload that is still making progress, which succeeds today under the inactivity timeout, would fail. The socket-hang-up crash fix in #35496 covers the real problem here.

Closing per maintainer triage (low-risk / zero user trade-off / material-gain bar).

@OrcaWin OrcaWin closed this Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant