Skip to content

feat(recipe): reuse Chromium and run grouped browser probes concurrently - #2631

Merged
chubes4 merged 2 commits into
mainfrom
fix/issue-2630-browser-probe-reuse
Dec 4, 2026
Merged

chubes4 merged 2 commits into
mainfrom
fix/issue-2630-browser-probe-reuse

Conversation

@chubes4

@chubes4 chubes4 commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

Summary

What changed

  • Every recipe wordpress.browser-probe step in a runtime shares one Chromium browser, with a fresh context per probe. The browser closes when the runtime is destroyed.
  • Steps can opt into concurrency: consecutive workflow probes that share a parallelGroup name run concurrently, bounded by runtime.workers. The option is validated, and limited to Playground workflow probes without continuation or pluginInput.
  • Each recipe probe writes its evidence to files/browser/probe-N/, so a later probe no longer overwrites an earlier one's evidence. WordPress diagnostics are logged per probe, keyed by a probe cookie.

Why

Measured on an 11-site multisite baseline gate (Extra-Chill/extrachill, wp-codebox 0.35.3 on GitHub Actions): 11 serial homepage probes took about 42 s, the largest phase of the run. Fixes #2630.

Verification

  • New tests: tests/recipe-browser-probe-groups.test.ts (wave planning and validation) and tests/recipe-browser-probe-reuse.browser.test.ts (one browser launch across probes, per-probe evidence).
  • CI on this PR is the gate. A downstream timing check will follow on the Extra-Chill gate after release.

AI disclosure

Claude (Anthropic) in the Pi coding agent (Franklin), directed by @chubes4. The implementation came from Homeboy Cook agent-task-0a96d1aa-91cc-4b2f-9d3f-5b098dbfcb77, route cook-heavy (gpt-6.2-sol). Homeboy refused publication ("publication requires the attempt's persisted applied promotion"), so the candidate commit 3d757b87 was reviewed and opened as this PR by hand, outside Homeboy finalization.

@chubes4
chubes4 merged commit a10a60f into main Dec 4, 2026
4 of 5 checks passed
chubes4 added a commit to Extra-Chill/homeboy that referenced this pull request Dec 4, 2026
Pins WP Codebox
[v0.36.0](https://github.com/Automattic/wp-codebox/releases/tag/v0.36.0),
which speeds up the recipe startup and probe phases of rig gates:

- Automattic/wp-codebox#2632: zip-extracted extra plugins are mounted
directly instead of being staged as readonly copies first (measured at
16.7 s for 399 MB on the extrachill-network gate).
- Automattic/wp-codebox#2631: recipe browser probes share one Chromium,
and an opt-in `parallelGroup` runs probes concurrently, bounded by
`runtime.workers`.

Verified: `wp-codebox-doctor-smoke.sh` passes.

AI disclosure: Claude (Anthropic) in the Pi coding agent (Franklin),
directed by @chubes4. AI made the version bump.
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.

browser-probe: share one browser across recipe probe steps and allow bounded concurrent probes

1 participant