Repository navigation
refactor(claude-code): bake patch-playwright-mcp into the image (#87) - #88
Merged
Merged
Conversation
- COPY --chmod=0755 patch-playwright-mcp.sh into /usr/local/bin/ in the base stage so both default and sandbox targets inherit it - switch init-plugins.sh and both devcontainer.json templates to invoke /usr/local/bin/patch-playwright-mcp directly - drop the per-project script from README setup guidance and add the boundary rule: project-specific config stays per-project, universal logic moves into the image - add test -x check for the binary to all four CI verify matrix entries
This was referenced Apr 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Move the Playwright MCP patch script from a per-project file into the image at
/usr/local/bin/patch-playwright-mcp.Why
#85 made Playwright MCP usable in both image variants but left
patch-playwright-mcp.shas a verbatim copy in every consumer's.devcontainer/. The script has zero project-specific config, so every upstream change had to be manually mirrored. Baking it into the image (same pattern asrtkandralphex) closes that drift surface and lets the patch flow through the daily-rebuild +pull_policy: alwayschannel.Boundary rule going forward: project-specific config stays per-project; universal logic moves into the image.
Closes #87.
Changes
COPY --chmod=0755 patch-playwright-mcp.sh /usr/local/bin/patch-playwright-mcpin thebasestage so bothdefaultandsandboxtargets inherit it (single layer, BuildKit-canonical)init-plugins.sh+ bothdevcontainer.jsontemplates — invoke/usr/local/bin/patch-playwright-mcpdirectlyinit-plugins.shstays per-project but the patch binary doesn'ttest -x /usr/local/bin/patch-playwright-mcpadded to all four matrix entries (default + sandbox × amd64 + arm64)Notes
Consumer migration (one-time, after pulling the new image):
.devcontainer/patch-playwright-mcp.sh.devcontainer/init-plugins.sh: replacebash "$(dirname "$0")/patch-playwright-mcp.sh"with/usr/local/bin/patch-playwright-mcpdevcontainer.jsonpostStartCommand: replacebash .devcontainer/patch-playwright-mcp.shwith/usr/local/bin/patch-playwright-mcp(projects with bothdefaultandsandboxvariants need both updated)Pre-merge verification:
docker build --checkcleandocker buildx buildagainst the CI build context root (claude-code/.devcontainer) confirmed theCOPYsource path resolves — the path bug from the original issue's diff (COPY .devcontainer/patch-playwright-mcp.sh …) is fixed here to justCOPY patch-playwright-mcp.sh …COPY --linkdeliberately not adopted — empirical BuildKit cache-GC and parallel-graph-merge overhead per Depot's 2024–2026 reporting; existing repo doesn't use--linkanywhere; would warrant a repo-wide decision rather than a one-off here.