chore(mcp): capture detached dashboard daemon stdio for diagnostics#40518
Draft
Skn0tt wants to merge 5 commits intomicrosoft:mainfrom
Draft
chore(mcp): capture detached dashboard daemon stdio for diagnostics#40518Skn0tt wants to merge 5 commits intomicrosoft:mainfrom
Skn0tt wants to merge 5 commits intomicrosoft:mainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Investigating recurring `Cannot read properties of undefined (reading 'endpoint')` failures of `tests/mcp/dashboard.spec.ts` on windows-latest-firefox runs. The dashboard daemon is currently spawned detached with `stdio: 'ignore'`, so when its chromium launch fails or hangs we have zero visibility — only the downstream `connectToDashboard` timeout shows up. This change adds an opt-in log file: - `cli show` (and `--kill`/`--annotate`) now redirect detached daemon stdout+stderr to `PWTEST_DASHBOARD_DAEMON_LOG` when set; otherwise behavior is unchanged. - The MCP `cli` test fixture sets that env var to a per-test file under the test outputDir, bumps `DEBUG=pw:browser*` so chromium launch errors surface, and on test failure attaches the log to the test result so it appears in CI artifacts. Diagnostic only; no production behavior change.
Surfaces .err logs from cli-session browser daemons and the http MCP server's pw:browser* output on test failure so we can diagnose the windows-firefox cli-session/http timeouts.
…t race browser_navigate resolves on the page's load event, which can fire before fire-and-forget fetches in an inline script complete. Wrap the assertions in expect(...).toPass() so the snapshot is retried until all expected requests are visible. Observed flake on windows-msedge.
This comment has been minimized.
This comment has been minimized.
0a078e1 to
dfa91ad
Compare
Daemon .err files live at daemon/${workspaceDirHash}/${session}.err, but the
flat readdir loop only saw the top-level entries, so they were never attached
on failure.
dfa91ad to
ad8d024
Compare
Contributor
Test results for "MCP"4 failed 6856 passed, 927 skipped Merge workflow run. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Summary
Diagnostic-only change to surface why
tests/mcp/dashboard.spec.tsfails withCannot read properties of undefined (reading 'endpoint')on windows-latest-firefox runs.The dashboard daemon is spawned detached with
stdio: 'ignore', so chromium launch failures inside it are completely invisible — we only see the downstreamconnectToDashboardtimeout.This PR opts the daemon into writing stdout+stderr to a per-test log file (via
PWTEST_DASHBOARD_DAEMON_LOG), bumpsDEBUG=pw:browser*for the cli child env, and attaches the log on test failure.Not for merge — open as draft so we can read the daemon log from the failing windows-firefox MCP runs.