Skip to content

Retire renderer work after committed error pages - #35468

Closed
OrcaWin wants to merge 1 commit into
mainfrom
OrcaWin/error-document-lifetime-retirement
Closed

OrcaWin wants to merge 1 commit into
mainfrom
OrcaWin/error-document-lifetime-retirement

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator
Files Added Deleted Net
Test 2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​91 $\color{#cf222e}{\Huge{\mathbf{−}}}$​2 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​89
Prod 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​49 $\color{#cf222e}{\Huge{\mathbf{−}}}$​4 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​45

LoC: +140/-6

Retire renderer-owned work when Chromium replaces its document with an internal error page. These commits can skip did-navigate, leaving native log watchers active and sending notifications for the previous document. Extend the existing shared lifetime helper with a primary-frame identity check on main-frame load failure, preserving blocked, cancelled, same-document, invalid-URL and subframe navigation.

Validation: 56 tests in five suites, strict focused TypeScript and all five unchanged normal precommit tasks pass. The exact old helper fails four relevant checks while 25 controls pass. Twenty-eight actual hidden Electron comparison cases at N=1/10 reduce retained native watcher objects and obsolete notifications from N to zero on error-document replacement; surviving-document controls preserve watches. All windows/watchers drain to zero and owned process/profile cleanup is confirmed. Ten actual production inputs plus one exact-path authorization seam per variant independently match the frozen revisions; pre-hook staged tree equals committed tree. Four relevant baseline sources remain unchanged through main2e961de9.

The full aggregate is queued after #35463; no aggregate pass or Claude takeover yet. No full app UI, packaged/macOS/Windows, CPU/RSS, OS descriptor count or latency claim. Missing/inaccessible frame metadata preserves existing event-based retirement. The separate terminal-close reply implementation owns its own event list and is outside this fix. Remote/mobile protocols and folder-workspace behavior are unchanged.

Frozen head 6d2ab0680b3f09a7db840732de8fe9db4af4f553, base e5b45ac90f9f95b63f23cc5217e3d32b362cf1ea. Report, exact source verification, native results and preserved verifier corrections: /home/neil/.local/state/orca-electron-audit/error-document-lifetime-retirement/report.md.

@OrcaWin

OrcaWin commented Oct 29, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks. The Electron behavior is real, but the main window loads a bundled file:// app and doesn't commit error pages in production, and guest callers already have other cleanup. Changing abort semantics for about 25 callers of a shared lifetime helper, with a process/routing-ID heuristic that only partly covers the case, is too much risk for no user-reachable gain. Closing.

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