Files
archived-camoufox/python/tests
7e49123464 Bound the host GPU probe and fail loudly (#985)
* Bound the host GPU probe and fail loudly

A display that accepts connections but never answers the X handshake
left Firefox inside getContext() forever, and the launch with it. Both
launchers now give the probe's launch, page read and cleanup one
30-second deadline, and a timeout raises with the executable and
DISPLAY it was probing instead of hanging.

The Python reader runs in a daemon thread, so a browser call that
cannot be cancelled does not keep the interpreter alive after the
timeout. The TypeScript probe closes its browser on the same failure
path.

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

* Probe the host GPU in a child process so a timeout stops the browser

A thread cannot be stopped, so a probe that timed out kept its browser and
Playwright driver running until the interpreter exited, and each later launch
retried the probe and started another. The probe now runs in a child
interpreter; terminating it on a timeout closes its pipe to the driver, which
shuts the browser down. A child also starts from inside AsyncCamoufox's
running asyncio loop, which the sync API refuses.

The tests run the real probe: a stand-in browser that never answers must be
gone after the timeout, and a missing executable reports Playwright's error.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Jake Writer <jake_writer@jobharvest.com>
2026-11-10 18:41:56 +00:00
..
2026-10-06 19:10:22 -06:00