fix: Multi-Device Docs Tester hits max-turns without producing safe outputs#21327
Merged
fix: Multi-Device Docs Tester hits max-turns without producing safe outputs#21327
Conversation
Root causes from run #23175727517: 1. `npm run preview` returned 404 for `/gh-aw/` (Astro Starlight hybrid routing) 2. Playwright timed out at 60s due to Vite dev server loading many ES modules 3. Max-turns (50) too low for 10-device testing after debug overhead Fixes: - shared/docs-server-lifecycle.md: switch to `npm run dev`, verify /gh-aw/ returns 200 - daily-multi-device-docs-tester.md: max-turns 50→80, tools.timeout 120s, remove build step, add domcontentloaded guidance Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] [aw] Debug multi-device docs tester workflow failure
fix: Multi-Device Docs Tester hits max-turns without producing safe outputs
Mar 17, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the multi-device docs testing workflow to avoid exhausting the agent’s turn budget and timing out during Astro/Vite dev-server navigation, while ensuring the docs server is started in a way that correctly serves /gh-aw/.
Changes:
- Switch docs server instructions from
npm run previewtonpm run devand strengthen readiness checking to require HTTP 200 on/gh-aw/. - Increase agent runtime budget (max turns 50 → 80) and extend tool timeouts (60s → 120s) for Playwright/MCP operations.
- Update docs tester workflow instructions to avoid Playwright
networkidle/default navigation waits and usedomcontentloadedinstead.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/unbloat-docs.lock.yml | Updates workflow metadata hash to reflect upstream instruction changes. |
| .github/workflows/shared/docs-server-lifecycle.md | Moves lifecycle guidance to Astro dev server + readiness check on /gh-aw/. |
| .github/workflows/docs-noob-tester.lock.yml | Updates workflow metadata hash to reflect shared doc changes. |
| .github/workflows/daily-multi-device-docs-tester.md | Raises max-turns, tool timeout, switches to dev server, and updates Playwright navigation guidance. |
| .github/workflows/daily-multi-device-docs-tester.lock.yml | Compiles the workflow changes into the lock, including updated allowlisted bash commands and timeouts. |
Comments suppressed due to low confidence (1)
.github/workflows/daily-multi-device-docs-tester.md:36
- The workflow’s bash allowlist doesn’t include commands that this workflow (and the imported shared lifecycle instructions) require, e.g.
ip,awk, andhostnamefor computingSERVER_IP(and likelyrmfor cleanup). With the currenttools.bashlist, the agent won’t be able to run the providedSERVER_IP=$(ip ... | awk ...)snippet, which blocks Playwright navigation. Add the required command patterns totools.bash(or adjust the instructions to only use already-allowed commands).
bash:
- "npm install*"
- "npm run dev*"
- "npx astro*"
- "npx playwright*"
- "curl*"
- "kill*"
- "lsof*"
- "ls*" # List files for directory navigation
- "pwd*" # Print working directory
- "cd*" # Change directory
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| # - Documentation must be built first (npm run build in docs/ directory) | ||
| # - Bash permissions: npm *, curl *, kill *, echo *, sleep * | ||
| # - npm install must have been run in docs/ directory | ||
| # - Bash permissions: npm *, npx *, curl *, kill *, echo *, sleep * |
Comment on lines
13
to
20
| ## Starting the Documentation Preview Server | ||
|
|
||
| **Context**: The documentation has been pre-built using `npm run build`. Use the preview server to serve the static build. | ||
|
|
||
| Navigate to the docs directory and start the preview server in the background, binding to all network interfaces on a fixed port: | ||
| Navigate to the docs directory and start the development server in the background, binding to all network interfaces on a fixed port: | ||
|
|
||
| ```bash | ||
| cd docs | ||
| npm run preview -- --host 0.0.0.0 --port 4321 > /tmp/preview.log 2>&1 & | ||
| npm run dev -- --host 0.0.0.0 --port 4321 > /tmp/preview.log 2>&1 & | ||
| echo $! > /tmp/server.pid |
Comment on lines
+41
to
43
| [ "$STATUS" = "200" ] && echo "Server ready at http://localhost:4321/gh-aw/!" && break | ||
| echo "Waiting for server... ($i/45) (status: $STATUS)" && sleep 3 | ||
| done |
|
|
||
| Follow the shared **Documentation Server Lifecycle Management** instructions: | ||
| 1. Start the preview server (section "Starting the Documentation Preview Server") | ||
| 1. Start the dev server (section "Starting the Documentation Preview Server") |
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.
The workflow consistently exhausted its 50-turn budget debugging server/Playwright issues rather than testing devices, terminating with
error_max_turnsand no safe outputs.Three compounding root causes (from run #23175727517):
npm run previewreturned HTTP 404 for/gh-aw/— Astro Starlight's hybrid routing isn't served correctly by the static preview serverbrowser_navigate/browser_run_codetimed out at 60s — Vite dev mode emits dozens of ES module requests per page;waitUntil: 'load'(and especiallywaitForLoadState('networkidle')) never fires within the timeoutshared/docs-server-lifecycle.mdnpm run preview→npm run dev(dev server correctly handles hybrid routing at/gh-aw/)/gh-aw/returns HTTP 200 (was just checking the port was open), with 45×3s=135s budget for Vite startupdaily-multi-device-docs-tester.mdmax-turns50 → 80tools.timeout: 120— raisesMCP_TOOL_TIMEOUTfrom 60 s to 120 snpm run buildstep; swap allowed bash tools fromnpm run build*/npm run preview*tonpm run dev*/npx astro*waitUntil: 'domcontentloaded'; explicit warnings added againstwaitForLoadState('networkidle')and barebrowser_navigatefor first load:Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/graphql/usr/bin/gh /usr/bin/gh api graphql -f query=query($owner: String!, $name: String!) { repository(owner: $owner, name: $name) { hasDiscussionsEnabled } } -f owner=github -f name=gh-aw(http block)https://api.github.com/repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b/usr/bin/gh gh api /repos/astral-sh/setup-uv/git/ref/tags/eac588ad8def6316056a12d4907a9d4d84ff7a3b --jq .object.sha(http block)https://api.github.com/repos/github/gh-aw/usr/bin/gh gh api /repos/github/gh-aw --jq .visibility imeout\|playwright e_engine.go ndor/bin/bash(http block)https://api.github.com/repos/githubnext/agentics/git/ref/tags//usr/bin/gh gh api /repos/githubnext/agentics/git/ref/tags/# --jq .object.sha(http block)If you need me to access, download, or install something from one of these locations, you can either:
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.