Repository navigation
fix(mcp): resolve config file paths relative to their source - #43970
Merged
Pavel Feldman (pavelfeldman) merged 1 commit intoNov 7, 2026
Merged
Conversation
This comment has been minimized.
This comment has been minimized.
Pavel Feldman (pavelfeldman)
approved these changes
Nov 6, 2026
Pavel Feldman (pavelfeldman)
marked this pull request as ready for review
November 6, 2026 22:54
Pavel Feldman (pavelfeldman)
force-pushed
the
triage/playwright-mcp-1836/42251585386-1
branch
2 times, most recently
from
November 6, 2026 23:54
0844a79 to
7c49b4d
Compare
Resolve file paths before merging each config source: paths in an explicit --config file use the config directory, while CLI and environment paths use cwd. Previously only initPage and initScript received this treatment, so storage-state loading and artifact placement depended on where the server started. Apply the same rule to profile, launch, storage-state, HAR, video and certificate paths. Absolute paths and inline storage-state objects keep their meaning. A symlinked --config resolves next to the real file. The same rule applies to the CLI's discovered `.playwright/cli.config.json` and the global `~/.playwright/cli.config.json`: relative paths in them now resolve against the file's directory rather than cwd. Use the merged executablePath in extension mode so a config-file value is honored there. Fixes: microsoft/playwright-mcp#1836
Pavel Feldman (pavelfeldman)
force-pushed
the
triage/playwright-mcp-1836/42251585386-1
branch
from
November 7, 2026 00:04
7c49b4d to
e31cdff
Compare
Pavel Feldman (pavelfeldman)
approved these changes
Nov 7, 2026
Yury Semikhatsky (yury-s)
approved these changes
Nov 7, 2026
Contributor
Test results for "MCP"5222 passed, 637 skipped Merge workflow run. |
Pavel Feldman (pavelfeldman)
deleted the
triage/playwright-mcp-1836/42251585386-1
branch
November 7, 2026 01:02
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.
Resolve file paths before merging each config source: paths in an explicit
--configfile use the config directory, while CLI and environment paths use cwd. Previously onlyinitPageandinitScriptreceived this treatment, so storage-state loading and artifact placement depended on where the server started.Apply the same rule to profile, launch, storage-state, HAR, video and certificate paths. Absolute paths and inline storage-state objects keep their meaning. A symlinked
--configresolves next to the real file.The same rule applies to the CLI's discovered
.playwright/cli.config.jsonand the global~/.playwright/cli.config.json: relative paths in them now resolve against the file's directory rather than cwd. That is a behavior change for relative paths in those files, which previously resolved against cwd as a side effect of not being resolved at all.Also in this change:
executablePath, so a config-file value is honored there too.config.d.tsdocuments the resolution rule on each path option.Tests: the MCP
config user data dirtest checks that a relativeoutputDiranduserDataDirland next to the config file and that the snapshot and screenshot files are written there. A newconfig storage statetest applies a relative storage state in isolated mode and asserts the resulting page state. Config-resolution unit tests cover the per-source rule for MCP and CLI resolvers, the global config, inline storage state and a symlinked config. A CLI test checks the discovered project config viaconfig-print. The new tests fail without the fix.Fixes microsoft/playwright-mcp#1836
Triaged on Linux by the Playwright bot - agent run