Skip to content

Pro profiles: capture after Firefox lets go of the profile - #16

Merged
JWriter20 merged 2 commits into
feat/pro_integrationfrom
fix/pro_capture_after_exit
Oct 4, 2026
Merged

JWriter20 merged 2 commits into
feat/pro_integrationfrom
fix/pro_capture_after_exit

Conversation

@JWriter20

Copy link
Copy Markdown
Owner

Closing a Pro profile's browser never synced its state. Both sessions of FlashCollection's live test logged:

camoufox-pro: profile prf_…'s state was not synced (prefs.js changed size after capture)
camoufox-pro: profile prf_…'s state was not synced (places.sqlite changed size after capture)

attachLease(lease, context, "close") starts the sync on the persistent context's close event, which Playwright emits while Firefox is still flushing those files during shutdown. The capture read them mid-write, the size check rightly refused it, and the session was parked in pending/.

onClose now waits for Firefox to release the profile before capturing: on Linux/macOS until the process named by the lock symlink (<address>:+<pid>) has exited, on Windows until parent.lock can be opened. A stale lock from a crash is ignored. If it times out (30 s) the size check still refuses a moving file and the session is kept for the next launch, as before.

Tests: the wait lasts exactly until a real lock-holding process exits; a stale or absent lock returns at once. Full TS suite 822 passed, biome and tsc clean. The Windows branch is not exercised by CI here.

🤖 Generated with Claude Code

JWriter20 and others added 2 commits October 3, 2026 18:04
A persistent context's "close" event fires while Firefox is still writing
prefs.js and places.sqlite on its way out. The state sync it triggers read
those files mid-write and gave up with "changed size after capture", so a
profile's state never reached the server. The sync now waits until Firefox
releases the profile lock (the lock symlink's process, or parent.lock on
Windows) before capturing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown

❌ Tests failed

Camoufox 156.0.1 (beta.32), built on Firefox 156, tested against Playwright v1.62.0 — the newest released suite not ahead of Firefox 156 (it targets Firefox 153.0).

Suite Result Detail
pythonlib 🚫 missing required, but produced no result
typescript 🚫 missing required, but produced no result
typescript_browser 🚫 missing required, but produced no result
native_rules 🚫 missing required, but produced no result
patch_guards_spoofing 🚫 missing required, but produced no result
patch_guards_automation 🚫 missing required, but produced no result
patch_guards_parity 🚫 missing required, but produced no result
skiplist_audit 🚫 missing required, but produced no result
build_tester 🚫 missing required, but produced no result
playwright 🚫 missing required, but produced no result
native_browser 🚫 missing required, but produced no result
native_growth 🚫 missing required, but produced no result
build 🚫 missing required, but produced no result
sundial 🚫 missing required, but produced no result

What failed

  • pythonlib is required but produced no result file. A suite that did not run has not passed.
  • typescript is required but produced no result file. A suite that did not run has not passed.
  • typescript_browser is required but produced no result file. A suite that did not run has not passed.
  • native_rules is required but produced no result file. A suite that did not run has not passed.
  • patch_guards_spoofing is required but produced no result file. A suite that did not run has not passed.
  • patch_guards_automation is required but produced no result file. A suite that did not run has not passed.
  • patch_guards_parity is required but produced no result file. A suite that did not run has not passed.
  • skiplist_audit is required but produced no result file. A suite that did not run has not passed.
  • build_tester is required but produced no result file. A suite that did not run has not passed.
  • playwright is required but produced no result file. A suite that did not run has not passed.
  • native_browser is required but produced no result file. A suite that did not run has not passed.
  • native_growth is required but produced no result file. A suite that did not run has not passed.
  • build is required but produced no result file. A suite that did not run has not passed.
  • sundial is required but produced no result file. A suite that did not run has not passed.

The Playwright suite is upstream playwright-python at the tag above, fetched fresh, with tests/camoufox/ overlaid. It runs with world isolation on — the configuration Camoufox ships — and only the failures are re-run with it off; those count as passes and are reported above as main-world fallbacks, which is the size of the isolated-world gap. Tests Camoufox cannot pass by design are deselected via ci/skiplist.yml — each with a stated reason. The stealth check reports a grade only; its per-vector detail is deliberately never published.

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown

✅ Tests passed

Camoufox 156.0.1 (beta.32), built on Firefox 156, tested against Playwright v1.62.0 — the newest released suite not ahead of Firefox 156 (it targets Firefox 153.0).

Suite Result Detail
native_rules ✅ pass 28 passed, 0 failed, 28 collected
pythonlib ✅ pass 652 passed, 0 failed, 654 collected
typescript ✅ pass 826 passed, 0 failed, 845 collected
build ✅ pass built camoufox-bin (0.7 MB)
patch_guards_spoofing ✅ pass 8 passed, 0 failed, 8 collected
patch_guards_automation ✅ pass 16 passed, 0 failed, 16 collected
patch_guards_parity ✅ pass 8 passed, 0 failed, 8 collected
skiplist_audit ✅ pass 17 passed, 0 failed, 17 collected
native_browser ✅ pass 46 passed, 0 failed, 46 collected
build_tester ✅ pass 478 passed, 4 failed, 482 collected
playwright ✅ pass 2248 passed, 0 failed, 2315 collected (across 6 shards), 328 via main-world fallback
typescript_browser ✅ pass 16 passed, 0 failed, 19 collected
native_growth ✅ pass 7 passed, 0 failed, 7 collected (across 7 shards)
sundial ✅ pass grade A+ — 625/630 in-scope checks passed

The Playwright suite is upstream playwright-python at the tag above, fetched fresh, with tests/camoufox/ overlaid. It runs with world isolation on — the configuration Camoufox ships — and only the failures are re-run with it off; those count as passes and are reported above as main-world fallbacks, which is the size of the isolated-world gap. Tests Camoufox cannot pass by design are deselected via ci/skiplist.yml — each with a stated reason. The stealth check reports a grade only; its per-vector detail is deliberately never published.

@JWriter20
JWriter20 merged commit 6f033fe into feat/pro_integration Oct 4, 2026
29 checks passed
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