Commit Graph
7 Commits
Author SHA1 Message Date
Tommaso Casaburi 1a33f7dc88 chore(agents): add a machine-wide Playwright browser resource budget
Playwright disables normal background throttling, so a hidden 5chan page keeps
doing P2P and rendering work after a check finishes. Agents verifying in
parallel across worktrees stacked whole browser engines on one machine.

Add scripts/pw-session.sh, a wrapper that permits one active Playwright browser
at a time and records who holds it:

- The lock is machine-wide, not per-repository, because the contended resource
  is RAM and CPU. Every worktree and checkout shares one slot.
- Acquisition is an atomic mkdir. Stale locks clear themselves: `open` reclaims
  any slot whose recorded browser is no longer `status: open` in
  `playwright-cli list --all`, so an interrupted workflow cannot strand the
  budget. When that list cannot be read the lock is left alone, so a broken CLI
  never silently disables the budget.
- `open` exits 75 when the slot is busy; `--wait[=SECONDS]` blocks instead.
- `close` always stops the browser, even when the lock was already lost, and
  never releases a slot held by a different session.
- `status` reports the holder and whether its browser is still alive.

Agent policy now runs browser engines and profiler batches sequentially, uses
Chrome/Blink during iteration and the full engine matrix only for final
verification, and never uses `close-all` or `kill-all` while other agents may
own sessions.

Covered by scripts/pw-session.test.js.
2026-08-01 19:21:01 +02:00
Tommaso Casaburi ae62b9dbf1 docs(portless): document HTTPS proxy prompt 2026-04-28 14:39:57 +07:00
Tommaso Casaburi 34b60c7d53 chore(portless): upgrade local dev URLs 2026-04-28 14:25:16 +07:00
Tommaso Casaburi 8078d10441 fix(portless): avoid route collisions across worktrees 2026-03-30 17:32:01 +07:00
Tommaso Casaburi fae4bcfe7f chore: add auto-open Android USB preview and waitForPort 2026-03-24 12:50:09 +07:00
Tommaso Casaburi 98549a614e chore: add yarn start:android-usb for local USB device testing 2026-03-23 14:09:13 +08:00
Tommaso CasaburiandGitHub ebf5ab64e4 chore(ai-workflow): tighten agent workflow and worktree tooling (#1107)
* chore(ai-workflow): tighten agent workflow and worktree tooling

* fix(ai-workflow): address review feedback

* fix(ai-workflow): make format hook portable
2026-03-17 19:58:30 +08:00