diff --git a/.github/workflows/daily-multi-device-docs-tester.lock.yml b/.github/workflows/daily-multi-device-docs-tester.lock.yml index 43ae6dae842..2143ee919db 100644 --- a/.github/workflows/daily-multi-device-docs-tester.lock.yml +++ b/.github/workflows/daily-multi-device-docs-tester.lock.yml @@ -1,4 +1,4 @@ -# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"1ecb91321a81f3257b700f2b91ec8045ae96883c7352a0cb48d2ee1a5d00bbbc","body_hash":"dcf9d2d09055c25941e881ebad704af94ad6a85d1f4ee9cbb8e2b89f44a018e3","strict":true,"agent_id":"pi","agent_model":"copilot/gpt-5.4","engine_versions":{"pi":"0.80.10"}} +# gh-aw-metadata: {"schema_version":"v4","frontmatter_hash":"92ba671cae94e3bd7ae67fd152d58f6f88e5e319d235f554538cf42e0d9d8637","body_hash":"c1fc7ec6a5ddbd8ace6af9664078f6946b535ae1beaaa615791cf27dfea8b743","strict":true,"agent_id":"pi","agent_model":"copilot/gpt-5.4","engine_versions":{"pi":"0.80.10"}} # gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GH_AW_OTEL_GRAFANA_AUTHORIZATION","GH_AW_OTEL_GRAFANA_ENDPOINT","GH_AW_OTEL_SENTRY_AUTHORIZATION","GH_AW_OTEL_SENTRY_ENDPOINT","GITHUB_TOKEN"],"actions":[{"repo":"actions/cache/restore","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/cache/save","sha":"55cc8345863c7cc4c66a329aec7e433d2d1c52a9","version":"v6.1.0"},{"repo":"actions/checkout","sha":"9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0","version":"v7.0.0"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"3a2844b7e9c422d3c10d287c895573f7108da1b3","version":"v9.0.0"},{"repo":"actions/setup-node","sha":"820762786026740c76f36085b0efc47a31fe5020","version":"v7.0.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.27.37","digest":"sha256:0d35e8682845f183c1c634699a8e8a6cbe2c271b867031410df74533243c5f67","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.27.37@sha256:0d35e8682845f183c1c634699a8e8a6cbe2c271b867031410df74533243c5f67"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.37","digest":"sha256:fc2970aadaeae05993e76697d29f03dc8bfb9248ff87a8f3d8b0975485a4b317","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.27.37@sha256:fc2970aadaeae05993e76697d29f03dc8bfb9248ff87a8f3d8b0975485a4b317"},{"image":"ghcr.io/github/gh-aw-firewall/cli-proxy:0.27.37","digest":"sha256:1d5300d9b08e1c4f2ad1830860656a0656383a83280058f17e805a7c3ecda203","pinned_image":"ghcr.io/github/gh-aw-firewall/cli-proxy:0.27.37@sha256:1d5300d9b08e1c4f2ad1830860656a0656383a83280058f17e805a7c3ecda203"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.27.37","digest":"sha256:5abc51995e5901c5d1daeefc957301ee409980e2e607391ec22c06cb2513327b","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.27.37@sha256:5abc51995e5901c5d1daeefc957301ee409980e2e607391ec22c06cb2513327b"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.4.3","digest":"sha256:3c744710ea275cd5ee65db92a1099e0d980754bd9fafda9ce67704c67004dc83","pinned_image":"ghcr.io/github/gh-aw-mcpg:v0.4.3@sha256:3c744710ea275cd5ee65db92a1099e0d980754bd9fafda9ce67704c67004dc83"},{"image":"ghcr.io/github/gh-aw-node","digest":"sha256:529d02eb970b1161aa25c593a9c3df57fdfad5a8add328cb3b6eccef66f3183b","pinned_image":"ghcr.io/github/gh-aw-node@sha256:529d02eb970b1161aa25c593a9c3df57fdfad5a8add328cb3b6eccef66f3183b"},{"image":"ghcr.io/github/github-mcp-server:v1.6.0","digest":"sha256:2b0c48b070f61e9d3969269ead600f62d00fb237b60ac849ef3d166ee7de9ad3","pinned_image":"ghcr.io/github/github-mcp-server:v1.6.0@sha256:2b0c48b070f61e9d3969269ead600f62d00fb237b60ac849ef3d166ee7de9ad3"}]} # This file was automatically generated by gh-aw. DO NOT EDIT. To debug this workflow, load the skill at https://github.com/github/gh-aw/blob/main/debug.md # @@ -563,27 +563,21 @@ jobs: env: GH_AW_SKILL_DIR: ".pi/skills" run: bash "${RUNNER_TEMP}/gh-aw/actions/restore_inline_skills.sh" - - env: - EXPR_GITHUB_WORKSPACE: ${{ github.workspace }} - name: Install docs dependencies - run: | - cd "$EXPR_GITHUB_WORKSPACE/docs" - npm install - env: EXPR_GITHUB_WORKSPACE: ${{ github.workspace }} name: Resolve slide deck PDF run: | cd "$EXPR_GITHUB_WORKSPACE/docs" node ../scripts/ensure-docs-slide-pdf.js + - name: Configure Chrome sandbox + run: "# The chrome-sandbox helper must be owned by root with mode 4755 (SUID) for Chrome\n# to launch inside the agent container. The runner has mode 0777 by default.\nif [ -f /opt/google/chrome/chrome-sandbox ]; then\n sudo chmod 4755 /opt/google/chrome/chrome-sandbox\n echo \"chrome-sandbox configured (mode 4755)\"\nelse\n echo \"chrome-sandbox not found — skipping\"\nfi\n" - env: - EXPR_GITHUB_RUN_ID: ${{ github.run_id }} EXPR_GITHUB_WORKSPACE: ${{ github.workspace }} - name: Start docs server - run: "LOG_FILE=\"/tmp/gh-aw/agent/docs-server-$EXPR_GITHUB_RUN_ID.log\"\nPID_FILE=\"/tmp/gh-aw/agent/docs-server-$EXPR_GITHUB_RUN_ID.pid\"\ncd \"$EXPR_GITHUB_WORKSPACE/docs\"\nnpm run build\nnohup npm run preview -- --host 127.0.0.1 --port 4321 > \"$LOG_FILE\" 2>&1 &\nPID=$!\necho $PID > \"$PID_FILE\"\necho \"Server PID: $PID\"\necho \"Server log: $LOG_FILE\"\n" - - env: - EXPR_GITHUB_RUN_ID: ${{ github.run_id }} - name: Wait for server readiness - run: "PID_FILE=\"/tmp/gh-aw/agent/docs-server-$EXPR_GITHUB_RUN_ID.pid\"\nLOG_FILE=\"/tmp/gh-aw/agent/docs-server-$EXPR_GITHUB_RUN_ID.log\"\nMAX_WAIT=135 # Maximum 135 seconds wait time\nWAITED=0\nuntil (echo > /dev/tcp/127.0.0.1/4321) > /dev/null 2>&1; do\n # Check if the server process has already died\n if [ -f \"$PID_FILE\" ] && ! kill -0 \"$(cat \"$PID_FILE\")\" 2>/dev/null; then\n echo \"::error::Documentation server process died before opening port 4321. Server log:\"\n cat \"$LOG_FILE\"\n exit 1\n fi\n WAITED=$((WAITED + 3))\n if [ $WAITED -ge $MAX_WAIT ]; then\n echo \"::error::Documentation server port 4321 did not open after ${MAX_WAIT}s. Server log:\"\n cat \"$LOG_FILE\"\n exit 1\n fi\n echo \"Waiting for docs port... ($WAITED/${MAX_WAIT}s)\"\n sleep 3\ndone\nWAITED=0\nuntil curl -sf http://localhost:4321/gh-aw/ > /dev/null 2>&1; do\n # Check if the server process has already died\n if [ -f \"$PID_FILE\" ] && ! kill -0 \"$(cat \"$PID_FILE\")\" 2>/dev/null; then\n echo \"::error::Documentation server process died before becoming ready. Server log:\"\n cat \"$LOG_FILE\"\n exit 1\n fi\n WAITED=$((WAITED + 3))\n if [ $WAITED -ge $MAX_WAIT ]; then\n echo \"::error::Documentation server did not start after ${MAX_WAIT}s. Server log:\"\n cat \"$LOG_FILE\"\n exit 1\n fi\n echo \"Waiting for server... ($WAITED/${MAX_WAIT}s)\"\n sleep 3\ndone\necho \"Server ready at http://localhost:4321/gh-aw/!\"" + name: Install and build docs + run: |- + cd "$EXPR_GITHUB_WORKSPACE/docs" + npm install + npm run build - name: Download container images run: bash "${RUNNER_TEMP}/gh-aw/actions/download_docker_images.sh" ghcr.io/github/gh-aw-firewall/agent:0.27.37@sha256:0d35e8682845f183c1c634699a8e8a6cbe2c271b867031410df74533243c5f67 ghcr.io/github/gh-aw-firewall/api-proxy:0.27.37@sha256:fc2970aadaeae05993e76697d29f03dc8bfb9248ff87a8f3d8b0975485a4b317 ghcr.io/github/gh-aw-firewall/cli-proxy:0.27.37@sha256:1d5300d9b08e1c4f2ad1830860656a0656383a83280058f17e805a7c3ecda203 ghcr.io/github/gh-aw-firewall/squid:0.27.37@sha256:5abc51995e5901c5d1daeefc957301ee409980e2e607391ec22c06cb2513327b ghcr.io/github/gh-aw-mcpg:v0.4.3@sha256:3c744710ea275cd5ee65db92a1099e0d980754bd9fafda9ce67704c67004dc83 ghcr.io/github/gh-aw-node@sha256:529d02eb970b1161aa25c593a9c3df57fdfad5a8add328cb3b6eccef66f3183b ghcr.io/github/github-mcp-server:v1.6.0@sha256:2b0c48b070f61e9d3969269ead600f62d00fb237b60ac849ef3d166ee7de9ad3 diff --git a/.github/workflows/daily-multi-device-docs-tester.md b/.github/workflows/daily-multi-device-docs-tester.md index 971177dd910..8687921bac4 100644 --- a/.github/workflows/daily-multi-device-docs-tester.md +++ b/.github/workflows/daily-multi-device-docs-tester.md @@ -34,7 +34,7 @@ tools: cli-proxy: true github: mode: gh-proxy - timeout: 120 # Multi-device runs include docs build + preview startup + timeout: 120 # Multi-device runs include preview startup and Playwright tests playwright: mode: cli bash: @@ -82,74 +82,29 @@ imports: - shared/otlp.md pre-agent-steps: - - name: Install docs dependencies - env: - EXPR_GITHUB_WORKSPACE: ${{ github.workspace }} - run: | - cd "$EXPR_GITHUB_WORKSPACE/docs" - npm install - name: Resolve slide deck PDF env: EXPR_GITHUB_WORKSPACE: ${{ github.workspace }} run: | cd "$EXPR_GITHUB_WORKSPACE/docs" node ../scripts/ensure-docs-slide-pdf.js - - name: Start docs server + - name: Configure Chrome sandbox + run: | + # The chrome-sandbox helper must be owned by root with mode 4755 (SUID) for Chrome + # to launch inside the agent container. The runner has mode 0777 by default. + if [ -f /opt/google/chrome/chrome-sandbox ]; then + sudo chmod 4755 /opt/google/chrome/chrome-sandbox + echo "chrome-sandbox configured (mode 4755)" + else + echo "chrome-sandbox not found — skipping" + fi + - name: Install and build docs env: - EXPR_GITHUB_RUN_ID: ${{ github.run_id }} EXPR_GITHUB_WORKSPACE: ${{ github.workspace }} run: | - LOG_FILE="/tmp/gh-aw/agent/docs-server-$EXPR_GITHUB_RUN_ID.log" - PID_FILE="/tmp/gh-aw/agent/docs-server-$EXPR_GITHUB_RUN_ID.pid" cd "$EXPR_GITHUB_WORKSPACE/docs" + npm install npm run build - nohup npm run preview -- --host 127.0.0.1 --port 4321 > "$LOG_FILE" 2>&1 & - PID=$! - echo $PID > "$PID_FILE" - echo "Server PID: $PID" - echo "Server log: $LOG_FILE" - - name: Wait for server readiness - env: - EXPR_GITHUB_RUN_ID: ${{ github.run_id }} - run: | - PID_FILE="/tmp/gh-aw/agent/docs-server-$EXPR_GITHUB_RUN_ID.pid" - LOG_FILE="/tmp/gh-aw/agent/docs-server-$EXPR_GITHUB_RUN_ID.log" - MAX_WAIT=135 # Maximum 135 seconds wait time - WAITED=0 - until (echo > /dev/tcp/127.0.0.1/4321) > /dev/null 2>&1; do - # Check if the server process has already died - if [ -f "$PID_FILE" ] && ! kill -0 "$(cat "$PID_FILE")" 2>/dev/null; then - echo "::error::Documentation server process died before opening port 4321. Server log:" - cat "$LOG_FILE" - exit 1 - fi - WAITED=$((WAITED + 3)) - if [ $WAITED -ge $MAX_WAIT ]; then - echo "::error::Documentation server port 4321 did not open after ${MAX_WAIT}s. Server log:" - cat "$LOG_FILE" - exit 1 - fi - echo "Waiting for docs port... ($WAITED/${MAX_WAIT}s)" - sleep 3 - done - WAITED=0 - until curl -sf http://localhost:4321/gh-aw/ > /dev/null 2>&1; do - # Check if the server process has already died - if [ -f "$PID_FILE" ] && ! kill -0 "$(cat "$PID_FILE")" 2>/dev/null; then - echo "::error::Documentation server process died before becoming ready. Server log:" - cat "$LOG_FILE" - exit 1 - fi - WAITED=$((WAITED + 3)) - if [ $WAITED -ge $MAX_WAIT ]; then - echo "::error::Documentation server did not start after ${MAX_WAIT}s. Server log:" - cat "$LOG_FILE" - exit 1 - fi - echo "Waiting for server... ($WAITED/${MAX_WAIT}s)" - sleep 3 - done - echo "Server ready at http://localhost:4321/gh-aw/!" features: gh-aw-detection: true --- @@ -181,13 +136,32 @@ This workflow has `strict: true` — it will fail if no safe output is produced. Start the documentation preview server and perform comprehensive multi-device testing. Test layout responsiveness, accessibility, interactive elements, and visual rendering across all device types. Use a single Playwright browser instance for efficiency. -## Step 1: Verify Server Availability +## Step 1: Start Server -The workflow pre-agent steps already installed docs dependencies, built the docs site, and started the Astro preview server. -Quickly verify it is reachable before testing: +The docs dependencies are already installed and the site is already built. Start the Astro preview server inside this container: ```bash -curl -sf http://localhost:4321/gh-aw/ > /dev/null && echo "Docs server is ready" +cd "${{ github.workspace }}/docs" +LOG_FILE="/tmp/docs-server.log" +nohup npm run preview -- --port 4321 > "$LOG_FILE" 2>&1 & +echo "Server PID: $!, log: $LOG_FILE" +``` + +Then wait for the server to be ready: + +```bash +LOG_FILE="/tmp/docs-server.log" +MAX_WAIT=120 +WAITED=0 +until curl -sf http://localhost:4321/gh-aw/ > /dev/null 2>&1; do + WAITED=$((WAITED + 3)) + if [ $WAITED -ge $MAX_WAIT ]; then + echo "Server log:" && cat "$LOG_FILE" + echo "ERROR: Server did not start after ${MAX_WAIT}s" && exit 1 + fi + sleep 3 +done +echo "Docs server ready at http://localhost:4321/gh-aw/" ``` ## Step 2: Device Configuration @@ -222,9 +196,6 @@ playwright-cli browser_run_code --code "async (page) => { }" ``` -- ✅ **Use `localhost` directly** — playwright-cli runs on the runner, so `localhost` reaches the dev server -- ❌ **Do NOT use bridge IP detection** — that is only needed in the deprecated MCP mode - For each device viewport, use playwright-cli to: - Set viewport size and navigate to `http://localhost:4321/gh-aw/` - Take screenshots and run accessibility audits @@ -305,8 +276,7 @@ Label with: `documentation`, `testing`, `automated` ## Step 6: Cleanup -No manual server cleanup is required in-agent for this workflow. -The server lifecycle is handled by pre-agent setup and job teardown. +No manual server cleanup is required. The server process will be cleaned up automatically when the agent job exits. ## Summary diff --git a/.github/workflows/smoke-call-workflow.lock.yml b/.github/workflows/smoke-call-workflow.lock.yml index b7fb052fab3..fbe4cdd2d92 100644 --- a/.github/workflows/smoke-call-workflow.lock.yml +++ b/.github/workflows/smoke-call-workflow.lock.yml @@ -1112,7 +1112,7 @@ jobs: # Imported from called workflow "smoke-workflow-call" because GitHub requires the caller job to grant permissions requested by reusable workflow jobs. # Review the called workflow's job-level permissions in ./.github/workflows/smoke-workflow-call.lock.yml. permissions: - actions: write + actions: read contents: read issues: write pull-requests: write