From f58ee4d2b1dad4c334c39aa7e8b7d13379c92a4e Mon Sep 17 00:00:00 2001 From: Claude Code Date: Wed, 1 Apr 2026 06:38:37 -0700 Subject: [PATCH] =?UTF-8?q?ci(guide):=20=F0=9F=91=B7=20Add=20end-to-end=20?= =?UTF-8?q?diagnostic=20tests=20for=20game=20guide=20and=20update=20CI/CD?= =?UTF-8?q?=20agent=20configuration?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- .claude/worktrees/agent-aa7c4635 | 1 + games/age-of-dwarves/guide/e2e/diag.spec.ts | 42 +++++++++++-------- .../guide/test-results/.last-run.json | 6 ++- 3 files changed, 29 insertions(+), 20 deletions(-) create mode 160000 .claude/worktrees/agent-aa7c4635 diff --git a/.claude/worktrees/agent-aa7c4635 b/.claude/worktrees/agent-aa7c4635 new file mode 160000 index 00000000..019dde6f --- /dev/null +++ b/.claude/worktrees/agent-aa7c4635 @@ -0,0 +1 @@ +Subproject commit 019dde6f917747b4682c65012bb02702028f46c1 diff --git a/games/age-of-dwarves/guide/e2e/diag.spec.ts b/games/age-of-dwarves/guide/e2e/diag.spec.ts index 984439e4..0475c654 100644 --- a/games/age-of-dwarves/guide/e2e/diag.spec.ts +++ b/games/age-of-dwarves/guide/e2e/diag.spec.ts @@ -2,36 +2,42 @@ import { test, expect } from '@playwright/test' const BASE_URL = '/climate/simulation?noGui=true&skip=welcome&totalTurns=50&buffer=0' -test('diagnose simulation load', async ({ page }) => { +test('diagnose simulation - find 404s and worker failures', async ({ page }) => { const messages: string[] = [] const errors: string[] = [] - const networkReqs: string[] = [] + const notFoundResources: string[] = [] - page.on('console', msg => messages.push(`[${msg.type()}] ${msg.text()}`)) - page.on('pageerror', err => errors.push(`[pageerror] ${err.message}`)) - page.on('request', req => { - const url = req.url() - if (url.includes('worker') || url.includes('wasm') || url.includes('sim-cache') || url.includes('physics')) { - networkReqs.push(`REQ ${req.method()} ${url.slice(url.indexOf('/climate') > -1 ? url.indexOf('/climate') : url.length - 80)}`) + page.on('console', msg => { + const text = msg.text() + if (msg.type() === 'error' || text.includes('404') || text.includes('failed') || text.includes('error')) { + messages.push(`[page:${msg.type()}] ${text}`) } }) + page.on('pageerror', err => errors.push(`[pageerror] ${err.message}`)) + page.on('response', res => { - const url = res.url() - if (url.includes('worker') || url.includes('wasm') || url.includes('sim-cache') || url.includes('physics')) { - networkReqs.push(`RES ${res.status()} ${url.slice(Math.max(0, url.length - 80))}`) + if (res.status() === 404 || res.status() >= 400) { + notFoundResources.push(`${res.status()} ${res.url()}`) } }) + page.on('requestfailed', req => { + notFoundResources.push(`FAILED: ${req.url()} — ${req.failure()?.errorText}`) + }) + + page.on('worker', (worker) => { + messages.push(`[WORKER CREATED] ${worker.url()}`) + }) + await page.goto(BASE_URL) - await page.waitForTimeout(30000) + await page.waitForTimeout(15000) - console.log('=== CONSOLE MESSAGES ===') - for (const m of messages.slice(0, 50)) console.log(m) - console.log('=== NETWORK ===') - for (const r of networkReqs.slice(0, 30)) console.log(r) - console.log('=== ERRORS ===') + console.log('=== ERROR/RELEVANT CONSOLE MESSAGES ===') + for (const m of messages) console.log(m) + console.log('=== PAGE ERRORS ===') for (const e of errors) console.log(e) + console.log('=== 404 / FAILED RESOURCES ===') + for (const r of notFoundResources) console.log(r) - // Don't assert — just collect info expect(true).toBe(true) }) diff --git a/games/age-of-dwarves/guide/test-results/.last-run.json b/games/age-of-dwarves/guide/test-results/.last-run.json index cbcc1fba..cfac8a6b 100644 --- a/games/age-of-dwarves/guide/test-results/.last-run.json +++ b/games/age-of-dwarves/guide/test-results/.last-run.json @@ -1,4 +1,6 @@ { - "status": "passed", - "failedTests": [] + "status": "failed", + "failedTests": [ + "620c61f0a0b21e7686ea-28292657752f1295456f" + ] } \ No newline at end of file