Skip to content

fix(render): recover orphaned browsers before retry#2342

Open
miguel-heygen wants to merge 1 commit into
mainfrom
fix/render-orphan-recovery
Open

fix(render): recover orphaned browsers before retry#2342
miguel-heygen wants to merge 1 commit into
mainfrom
fix/render-orphan-recovery

Conversation

@miguel-heygen

Copy link
Copy Markdown
Collaborator

Summary

  • run the existing scoped orphan-browser recovery before every local render
  • report how many stale browser trees were reclaimed before a retry
  • add regression coverage at the local-render boundary

Reproduction

On hyperframes@0.7.56, start a long single-worker render and hard-kill the CLI Node process during capture_streaming. Five chrome-headless-shell processes remained alive after five seconds, reparented outside the dead CLI tree. This matches the WSL report where an external 600-second timeout left Chrome children consuming swap.

The orphan cleanup introduced for preview in #1039 was never called by the standalone render path. This change reuses that current-user, PPID=1-scoped cleanup at the beginning of renderLocal, so the next render automatically recovers from a hard-killed predecessor.

Verification

  • bunx vitest run packages/cli/src/commands/render.test.ts packages/cli/src/utils/orphanCleanup.test.ts (59 passed)
  • targeted oxlint and oxfmt checks
  • pre-commit typecheck, tracked-artifact, lint, format, and fallow gates
  • git diff --check

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