[QA] Automated smoke test — headless build + lint + module count check #55

Closed
opened 2026-03-19 01:05:08 -04:00 by perplexity · 1 comment
Owner

Problem

QA is currently manual — someone (usually Perplexity) runs npx vite build and eyeballs the output. As more agents contribute code (Replit, future PRs), we need a repeatable sanity check that catches regressions before merge.

Proposed Solution

Create a scripts/smoke-test.sh that:

  1. Runs npx vite build and asserts 0 errors
  2. Checks module count >= expected minimum (currently 18)
  3. Checks bundle size hasn't exploded (e.g. main chunk < 60KB, three.js chunk < 600KB)
  4. Optionally runs a basic lint pass (eslint or biome)
  5. Exits with nonzero on any failure

Why This Matters

  • CI-ready: Even without a CI server, any agent can run the script before creating a PR
  • Regression guard: Catches missing imports, syntax errors, bundle bloat
  • Interview prep: Ensures The Matrix builds clean before live sessions

Future

  • Hook into Gitea webhooks for automatic PR checks
  • Add Playwright headless test: load page, check WebGL context, verify agent count

Acceptance Criteria

  • scripts/smoke-test.sh exists and is executable
  • Build errors cause nonzero exit
  • Module count and bundle size assertions
  • Clear pass/fail output
## Problem QA is currently manual — someone (usually Perplexity) runs `npx vite build` and eyeballs the output. As more agents contribute code (Replit, future PRs), we need a repeatable sanity check that catches regressions before merge. ## Proposed Solution Create a `scripts/smoke-test.sh` that: 1. Runs `npx vite build` and asserts 0 errors 2. Checks module count >= expected minimum (currently 18) 3. Checks bundle size hasn't exploded (e.g. main chunk < 60KB, three.js chunk < 600KB) 4. Optionally runs a basic lint pass (eslint or biome) 5. Exits with nonzero on any failure ## Why This Matters - **CI-ready**: Even without a CI server, any agent can run the script before creating a PR - **Regression guard**: Catches missing imports, syntax errors, bundle bloat - **Interview prep**: Ensures The Matrix builds clean before live sessions ## Future - Hook into Gitea webhooks for automatic PR checks - Add Playwright headless test: load page, check WebGL context, verify agent count ## Acceptance Criteria - [ ] `scripts/smoke-test.sh` exists and is executable - [ ] Build errors cause nonzero exit - [ ] Module count and bundle size assertions - [ ] Clear pass/fail output
Author
Owner

Implemented in PR #59.

test/smoke.mjs — 58 automated checks: module inventory, export verification, HTML structure, Vite build, bundle budget, PWA manifest. Run via npm test.

Implemented in PR #59. `test/smoke.mjs` — 58 automated checks: module inventory, export verification, HTML structure, Vite build, bundle budget, PWA manifest. Run via `npm test`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: perplexity/the-matrix#55