docs(playwright): browser-1 by default, seven-browser pool opt-in on one shared server - #745
Conversation
…one shared server Companion to ConductionNL/hydra "feat(mcp): browser-1 by default, seven-browser pool opt-in on one shared server". Claude Code starts every stdio MCP server in .mcp.json at session start; seven per session is how a 16 GB WSL VM ran out of memory on 2026-09-08 with 98 idle Playwright processes and zero browsers open. - playwright-setup.md rewritten around the new layout: one browser-1 in the project .mcp.json, the pool under hydra/.claude/mcp/, one shared @playwright/mcp on localhost:8931 referenced by http URLs (zero processes per session), user-scope registration for VS Code (which cannot take --mcp-config), and the headed browser-6 kept as stdio. The old "CLI alternative" with seven ports is superseded by the shared server. - examples/.mcp.json.example is now browser-1 only; examples/browser-pool-shared.json.example is the opt-in pool. - README.md, testing.md, global-claude-settings.md and workstation-setup.md point at the same facts instead of describing .mcp.json as the 7-browser file. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Merge-order check against the other open PRsFile-level overlap with the open docs PRs, and a dry-run merge of each against this branch (
Different sections in each case: this PR touches only the MCP/browser-pool lines. Order does not matter. This branch is rebased on |
WilcoLouwerse
left a comment
There was a problem hiding this comment.
Inline findings from a Standard review. Verdict follows in a separate review.
WilcoLouwerse
left a comment
There was a problem hiding this comment.
Verdict: APPROVE (Standard) — self-review posted as COMMENT (GitHub blocks approving your own PR)
No blockers. Doc-to-code fidelity against ConductionNL/hydra#653 is strong: every path, the port, the env var name, the systemd unit name, the journalctl invocation, all seven subcommands, and both JSON examples were checked against the actual files at a8a5ade and match. browser-6 is correctly the only stdio entry and browser-7 is correctly in the http set — no off-by-one. Trailing newlines present on all seven files; both JSON examples parse; code fences balanced.
One 🟡 inline: a dead anchor this PR creates in global-claude-settings.md:287, where the rewrite renamed the heading the link targets. Two 🟢 notes on version drift and section ordering.
The docs/hydra/* deferral was verified rather than taken on trust: those files describe the container-baked .mcp.json under images/{builder,reviewer,security}/, and run-browser-tests.sh writes its own separate single-browser config — none of it is workstation guidance, so leaving them untouched is right.
Follow-up — three stale references outside this PR's diff
Not posted inline because the lines are not in this diff, but each contradicts what this PR establishes:
docs/claude/README.md:245— the discovery-stage table still listsPlaywright browsers (browser-1–browser-7)as available tooling, which the same file now contradicts at line 442.docs/iso/code.md:468— states7 Playwright MCP browser sessions (browser-1 … browser-7)as the standing ICT infrastructure. This one is a compliance-document inventory claim, so it is the most worth correcting.docs/claude/commands-tender.md:90—/ecosystem-investigatesays it "Uses the browser pool (browser-1 through browser-5)" with no note that the pool now needs the shared server.
Note for the merger
The merge-order comment on this PR is now stale: #716, #718 and #719 have all merged. This branch is 17 commits behind main but still merges clean — git merge-tree --write-tree exits 0 and GitHub reports MERGEABLE/CLEAN. The overlap enumeration in that comment was accurate (#716/#718 on global-claude-settings.md, #719 on README.md + testing.md); worth an Update branch before merging so the one-line edits land on top of #719's rewrite rather than beside it.
- global-claude-settings.md:287 linked playwright-setup.md#user-scope-all-projects-on-this-machine, a heading this PR's own rewrite removed. Point it at "The pool in VS Code", which is where user-scope registration now lives. - Say that the shared server resolves @playwright/mcp@latest once, at start, so a long-running unit keeps that build until restarted. That is a real change from the per-session stdio model, where every session re-resolved @latest. - The `claude --mcp-config` snippet appears before the section that explains how to get the server running; make the dependency explicit in the snippet itself. Three stale references outside the original diff, each contradicting what this PR establishes: - docs/claude/README.md:245 listed browser-1 through browser-7 as available discovery tooling, contradicting the same file at line 442. - docs/iso/code.md:468 stated "7 Playwright MCP browser sessions" as standing ICT infrastructure in a compliance document. - docs/claude/commands-tender.md:90 described /ecosystem-investigate as using browsers 1-5 with no note that the pool is now opt-in. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
WilcoLouwerse
left a comment
There was a problem hiding this comment.
Verdict: APPROVE (Quick) — self-review posted as COMMENT (GitHub blocks approving your own PR)
All three inline findings and all three follow-ups from the previous pass are addressed.
- The dead anchor now points at
playwright-setup.md#the-pool-in-vs-code, which matches the heading exactly. A repo-wide sweep of anchored links into every file this PR rewrote found no other dangling anchor. - The version-freeze sentence is accurate, and — the part worth checking rather than assuming — the remedy it names actually works. It tells the reader to
restart, andrestartin the companion PR was unit-aware only as of that PR's own fix commit. Before that,stop+startwould have left the unit enabled-but-inactive with the server running as a loose foreground process, so the documented remedy would have silently un-managed the service. Doc and code agree now. - The forward reference sits inside the fenced snippet as a bash comment and cites the section verbatim.
The three stale references outside the original diff are corrected. The compliance-document one in docs/iso/code.md was the one worth getting right, and the replacement neither overstates nor understates: it describes one shared server with up to seven named sessions, only browser-1 configured by default, which is what the code ships.
Verified rather than taken on trust: both examples/*.example files are identical to hydra's real .mcp.json and .claude/mcp/browser-pool-shared.json when parsed; every one of the seven subcommands the script implements is documented and no documented subcommand is missing from the script; the port, env var name, unit name and journalctl invocation all match; browser-6 is the only stdio entry and browser-7 is correctly in the http set; every changed file ends with a newline.
The merge from main since the last review brought in 19 commits and broke nothing in this PR's files. Required checks pass and the merge state is clean, so the stale merger note is resolved as well as corrected.
Why
Companion to ConductionNL/hydra
feat/shared-playwright-mcp-server. Claude Code starts every stdio MCP server in.mcp.jsonat session start; seven per session is how a 16 GB Linux VM ran out of memory on 2026-09-08 with 98 idle Playwright processes and zero browsers open.What
docs/claude/playwright-setup.mdrewritten around the new layout: onebrowser-1in the project.mcp.json, the pool underhydra/.claude/mcp/, one shared@playwright/mcponlocalhost:8931referenced byhttpURLs (zero processes per session), user-scope registration for VS Code (which cannot take--mcp-config), the headedbrowser-6kept as stdio. The old "CLI alternative" with seven ports is superseded by the shared server.examples/.mcp.json.exampleis nowbrowser-1only; newexamples/browser-pool-shared.json.exampleis the opt-in pool.README.md,testing.md,global-claude-settings.md,workstation-setup.mdpoint at the same facts instead of describing.mcp.jsonas the 7-browser file.docs/claude/README.md, the ICT-infrastructure inventory indocs/iso/code.md, and the/ecosystem-investigatedescription indocs/claude/commands-tender.md.docs/hydra/*(container-image.mcp.json) deliberately untouched.Notes for the merger
Updated 2026-09-11. The earlier version of this section described #716, #718 and #719 as open; all three have since merged. This branch has been updated from
main(merge commit in the history), so the one-line edits now sit on top of #719's rewrite rather than beside it. No conflicts.🤖 Generated with Claude Code