.cursor/skills/debug-ci-workflows/SKILL.md
Debug failing GitHub Actions workflows (especially deploy + Playwright E2E) in this repo. Use when CI fails in tests, webServer readiness hangs, or Playwright can't launch browsers.
npx skillsauth add jdconley/wodbrains debug-ci-workflowsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill captures the proven workflow for quickly diagnosing and fixing failing deploy.yml runs in this repo.
gh run list --workflow deploy.yml --limit 10
gh run view <run_id> --log-failed
gh run view <run_id> --json status,conclusion,url,displayTitle
--log-failed, pull the full job log (common when a later step exits fast, or when multiple packages run tests):# Get the job database ID(s)
gh run view <run_id> --json jobs --jq '.jobs[] | {name: .name, id: .databaseId, conclusion: .conclusion}'
# Dump logs for a specific job ID and filter to likely errors
gh run view <run_id> --job <job_id> --log | rg -n "ERR_|FAIL|Error|\\#\\#\\[error\\]|Process completed with exit code" -S
Notes:
pnpm -r --workspace-concurrency=1 test can continue printing subsequent package blocks even after the first failure. Find the first real stack trace / assertion and fix that.[MISSING_ENV_FILE] lines.This avoids macOS networking differences and matches CI more closely.
docker run --rm -v "$PWD":/repo -w /repo mcr.microsoft.com/playwright:v1.58.0-jammy \
bash -lc '
corepack enable &&
corepack prepare [email protected] --activate &&
CI=true pnpm install --frozen-lockfile --prefer-offline &&
GITHUB_ACTIONS=true CI=true pnpm -r --workspace-concurrency=1 test
'
Gotchas:
ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY, set CI=true (as above).node_modules between platforms; native deps like workerd can break (install inside the container).act (workflow-level)Useful when you need the exact workflow steps/secrets behavior.
* and you use zsh, quote them to avoid glob expansion:act -W .github/workflows/deploy.yml -j deploy \
-s 'CLOUDFLARE_ROUTE_WODBRAINS=example.com/*' \
-s 'CLOUDFLARE_ROUTE_WWW=www.example.com/*'
When CI fails with Timed out waiting ... from config.webServer:
/api/ping) rather than /.apps/worker/public/.Local tip:
E2E_WORKER_PORT=8790 E2E_WEB_PORT=5176 pnpm --filter web test
When a CI failure looks timing-sensitive (timer “should be frozen”, element “should be visible”, etc.), reproduce serially first:
# Full E2E suite, single worker, stable ports
E2E_WORKER_PORT=8790 E2E_WEB_PORT=5176 pnpm exec playwright test -c playwright.config.ts --workers=1
# Or: a single failing test/spec
E2E_WORKER_PORT=8790 E2E_WEB_PORT=5176 pnpm exec playwright test -c playwright.config.ts apps/web/e2e/<spec>.spec.ts -g "<test name>" --workers=1
Gotcha:
--project=chromium unless your Playwright config defines projects (in this repo it may be empty).GitHub Actions runners do not guarantee Playwright browsers are preinstalled.
Add a workflow step after dependencies install:
- name: Install Playwright browsers
run: pnpm exec playwright install --with-deps chromium
If a Vite dev server is unreliable in CI:
baseURL pointing at the worker origin), while keeping local dev/E2E using Vite for a better dev experience.gh run list --workflow deploy.yml --limit 1
gh run watch <run_id> --exit-status
documentation
UI design guidelines for WOD Brains app - mobile-first, app-like design with consistent patterns. Use when making UI changes.
testing
Always create and run tests affected by changes, including Playwright for UI changes. Use when modifying Wodbrains features or UI.
development
Run Wodbrains worker parse evals and live Gemini tests locally using Wrangler `.dev.vars` keys. Use when you need to run `parse.evals.test.ts` / `parse.gemini.test.ts` against the real model (RUN_LIVE_AI_TESTS=1).
documentation
Regenerate README screenshots and the demo video for WOD Brains.