headless="virtual" started Xvfb in its own session and stopped it only on
the browser's close path. A launcher ended by a signal (timeout, a
supervisor, a cancelled CI job) never reaches that path, so its Xvfb ran
forever, together with the session bus and desktop helpers Firefox
autolaunched on that display.
Both packages now exec Xvfb through `setpriv --pdeathsig TERM`, so the
kernel signals it when its launcher dies, even by SIGKILL. SIGTERM lets
Xvfb remove its own lock and socket, and the autolaunched bus exits when
it loses its X connection. setpriv comes from util-linux.
The leak suite missed this because every crash test keeps the launcher
alive to tear down, and leak_check follows only our descendants, which an
orphan no longer is. test_launcher_sigkill_leaves_nothing_on_its_display
kills the launcher and looks machine-wide.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Values both launchers hard-coded (marker fonts, the Windows 11 fonts, the
Apple Silicon and Intel Mac core and panel tables, plausible DPR and core
counts, the macOS MacinTalk/Eloquence voices, the cache prefs) now live in
python/src/camoufox/launcher-constants.json, which the TypeScript package
ships as a data file. gen-fonts-json.py and verify-fonts.py read the same
file, so the drifted PingFang marker copy is gone (fonts.json regenerates
byte-identical) and verify-fonts no longer ast-parses fingerprints.py.
- Drop the duplicate fpgen model pin under browser/scripts/data; the TS
test checks the fpgen package's MODEL_PIN against the Python copy.
- Move pin-fpgen-model.py and clean-fingerprint-data.py to python/scripts.
- Delete the font licence report (font-metrics/licences.py and its saved
output, open-fonts.txt): the bundle ships as built, so the report checks
nothing.
- Delete unreferenced files: cleanfonts.sh, python/examples,
typescript/renovate.json.
- Delete dead code: classify_installs, remove_mmdb, write_upstream_sh,
bump_release, unused test constants and fixture helpers, the
_virtual_display attribute writes, package.py's pre-groups font copy (a
missing groups.json now fails).
- Share require_bundle, zip_entries, gh_headers and parse_shard instead of
keeping copies; fold GitHubDownloader into CamoufoxFetcher in both
launchers.
- TS raises ValueError where Python does, and `camoufox version` prints the
fpgen package version as Python does.
- Python tests get src/ from pytest's pythonpath instead of sys.path
inserts; skips that hid untested paths now assert or test the behaviour.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>