Skip to content

fix(electron): bound workspace port metadata requests - #35485

Closed
OrcaWin wants to merge 1 commit into
mainfrom
audit/workspace-port-probe-absolute-deadline
Closed

OrcaWin wants to merge 1 commit into
mainfrom
audit/workspace-port-probe-absolute-deadline

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 28, 2026 •

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

LoC: +54/-1

Bound each workspace port metadata HTTP(S) fetch with the existing 1500ms budget. The previous timeout measured inactivity, so HTML, SSE and favicon responses sending a byte every 500ms could keep requests and sockets open beyond the budget. Reuse AbortSignal.timeout in the existing request options; expired pages become not-page and expired favicons retain the title with a null icon.

This intentionally expires a flowing finite response that takes 2.5s to finish. The deadline applies per fetch: up to four page/redirect requests and one icon imply a nominal 7.5s maximum excluding scheduling, not 1.5s for a whole probe. Existing byte caps prevent a permanent-leak claim for positive-byte streams.

Validation:9 focused tests pass;3 new actual-loopback controlled-deadline cases fail assertions against exact baseline production while6 controls pass. Strict focused typecheck and all five normal hook tasks pass. Shared actual-source harness with real Node24.22/Linux HTTP sockets:18 workload groups per variant atN1/10;33 baseline requests/sockets persist beyond16s versus0 final. Healthy/within-budget finite pages, idle/error and byte-cap controls pass. Both variants cleaned99 owned servers each with zero requests/sockets/timers. Four executed source identities, exact patch/bundle and41-artifact seal independently verified; traced sources match main79dbada2.

Required aggregate queued after #35476. No aggregate pass or Claude takeover claimed. No native Electron UI, TLS, macOS/Windows, remote end-to-end, CPU, RSS or user-latency measurement. Local/runtime callers share the helper; no wire, mobile, folder or git-worktree identity change. Existing installed dependencies reused without install/repair.

Frozen head ad0b64755c01b325f55dddc5c9c58438a8ec6b4b, base 4c31ba52e682c03d4e2946e0ec861f2da18e8441. Evidence and preserved attempts: /home/neil/.local/state/orca-electron-audit/workspace-port-probe-absolute-deadline/report.md. Seal SHA256:4c5ff43bc5680d7e3ebd77930e415178b3602037b23aaef522d9ee4133f8d33d.

@OrcaWin

OrcaWin commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks. Closing. The existing per-response byte caps plus the inactivity timeout already end runaway probe streams. A hard 1.5s total deadline would mark slow but still-flowing responses as not-page and hide their title and icon in the new-tab servers list. Streaming SSR and slow first compiles are examples, and the PR description admits this regression.

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