Skip to content

fix(capture): retry crashed renderers in fresh contexts - #573

Merged
chubes4 merged 3 commits into
mainfrom
fix/567-cottons-direct
Oct 6, 2026
Merged

chubes4 merged 3 commits into
mainfrom
fix/567-cottons-direct

Conversation

@chubes4

@chubes4 chubes4 commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Refs #567.

  • Track the capture page's real crash event and retry that viewport once in a fresh context while the browser is still connected. Reuse the existing shared browser replacement when the entire browser disconnects.
  • Stop subsequent best-effort capture stages after a detected crash, including chrome-fidelity after failed analysis.
  • Retain failed retry diagnostics with attempt: 2; a persistent crash remains failed while later routes can succeed.
  • Add a child-process regression using real Chromium, a neutral local HTTP fixture, CDP Page.crash, pending response-body and evaluation work, and healthy later-route HTML/screenshots. Existing Page doubles gain the real event-listener contract.

Evidence

Pinned Linux reproduction: Node 22.23.2, Playwright 1.62.1, mcr.microsoft.com/playwright:v1.62.1-noble, four CPUs, 2 GiB memory, 256 MiB shared memory.

  • Untouched release 0.18.7 / 4ddeafe: both new regressions fail; capture keeps issuing chrome-fidelity work on the crashed page and does not retry the connected renderer.
  • Candidate: 2/2 regressions pass, child processes exit 0. Transient crash: two attempts, one crash, two captured routes, zero failures/restarts. Persistent crash: two attempts, two crashes, one captured later route, one final source renderer crashed failure at attempt two, zero browser restarts.
  • Pending fetch/evaluate/body/CDP operations reject and settle, contexts are zero after each route, and the browser is disconnected at completion.
  • Linux cgroup memory.events: max=0, oom=0, oom_kill=0.
  • Local real-browser regression also passed on the production Node/Playwright versions. Complete repository gates passed with locked dependencies on Node 22.23.2:
    • npm test -- --maxWorkers=4: 150 files / 1,676 tests passed.
    • npm run build: passed; both bundles regenerated.
    • npm run test:package: passed (installed/relocated browserless and browser-backed workflows).
    • git diff --check: passed.

Generated dist/ was restored after verification per the repository's feature-PR policy.

Evidence boundary

This fixes the reproduced DLA page-retry gap. It does not establish that DLA can contain the production _CRSession._onMessage fatal assertion: ordinary neutral crashes did not reproduce that assertion, including 20 Linux crash cycles with pending work and a 100-evaluation burst. OOM and the production crash's initiating operation remain unproven.

Playwright's owning callback fix is microsoft/playwright#42936, commit 132be89d216e50964a564bbe0f63c6847e8d1338: ignore late response IDs on an already-crashed session after its pending callbacks have been rejected. That guard is absent in released 1.62.1 and 1.63.0, and present on upstream main. The host-owned follow-up is to select a toolchain containing that commit, prove its late-reply regression on Linux, and rerun the live capture. This PR makes no dependency-upgrade or fatal-assertion containment claim.

Execution provenance / AI assistance

Direct finalization outside Homeboy was explicitly authorized on 2026-10-06 after original Cook agent-task-55d0b962-b052-4b97-aebe-5a5912a144ea failed. OpenAI gpt-6.1-sol via OpenCode performed scoped source investigation, neutral browser reproductions, implementation, verification, and drafted this PR. Homeboy SSH/file transport was used for the isolated Linux evidence workload; Cook did not own finalization. Chris Huber authorized the task and draft PR. Live site capture and independent binding/popup changes remain owned by the parent task.

@chubes4
chubes4 marked this pull request as ready for review October 6, 2026 23:17
@chubes4
chubes4 merged commit d1aac50 into main Oct 6, 2026
1 check passed
@chubes4
chubes4 deleted the fix/567-cottons-direct branch October 6, 2026 23:17
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