Skip to content

End-to-End Demo

The autowright-v3 repo ships a self-contained demo: a fake loan portal, a scraper that logs into it, and a switch that breaks the portal on purpose. It’s the fastest way to watch the whole capture → classify → fix → PR pipeline run for real.

The pieces

  • Target site (demo/target-site) — a tiny Express app on port 3000 with a /login page and a /dashboard page of loan data.
  • Scraper (demo/scraper.ts) — logs in with #username / #password, clicks #login-btn, then loads the dashboard.
  • CHAOS mode — with CHAOS=true, the site serves the same login page but renames id="login-btn" to id="signin-button" (and the dashboard’s #loans-table to #data-grid). Deterministic selector breakage on demand.

1. Start the stack and the site

Terminal window
cp .env.example .env # add ANTHROPIC_API_KEY + GITHUB_TOKEN for real fixes
docker compose up service fixer minio minio-init target-site

2. Run the scraper — happy path

Terminal window
npm run scraper -w @autowright/demo

The scraper logs in, reaches the dashboard, and prints Scraper completed successfully. Every action was captured invisibly; nothing was reported because nothing failed.

3. Flip CHAOS on and run again

Terminal window
CHAOS=true docker compose up -d target-site
npm run scraper -w @autowright/demo

Now page.click('#login-btn') times out — the button is #signin-button. The scraper exits non-zero with the real Playwright error (Autowright never masks it), and behind the scenes:

  1. The failure is classified SELECTOR_NOT_FOUND.
  2. Screenshots, the DOM (containing the renamed button), network and console logs are bundled and uploaded to MinIO.
  3. The service dedupes and queues one fix job.
  4. The fixer clones the repo, and the agent finds id="signin-button" in the captured DOM — evidence of exactly what the site did.

4. Watch the fix arrive

A pull request appears updating the scraper’s selector, and Slack (if configured) gets the fix summary with its cost. Check the queue while it works:

Terminal window
curl http://localhost:4400/api/fixes

Re-run the scraper with the PR’s change applied — it passes against the chaos site, because #signin-button is what the site actually serves now.

No API keys? Run the mock E2E

scripts/e2e-fixer.sh runs this whole pipeline against mock Anthropic/GitHub/Slack servers — no real keys, no real PR, same flow:

Terminal window
./scripts/e2e-fixer.sh

Next