This is the canonical verification guide for contributors and maintainers.
Opencom validation is organized into three layers:
- Static checks: lint + typecheck
- Package/runtime tests: Vitest for package-level and Convex integration coverage
- E2E behavior: Playwright for cross-surface workflows
Run from repository root:
pnpm lint
pnpm typecheck
pnpm test:convex
pnpm test:unit
pnpm test:e2eNotes:
pnpm testis an alias fortest:unitthentest:e2e.pnpm test:ciruns the same Vitest+Playwright stack in one command.
Use targeted checks first, then broaden as needed:
pnpm --filter @opencom/convex typecheck
pnpm --filter @opencom/convex test
pnpm --filter @opencom/convex test -- --run tests/<file>.test.ts
pnpm --filter @opencom/web typecheck
pnpm --filter @opencom/web test
pnpm --filter @opencom/widget typecheck
pnpm --filter @opencom/widget test
pnpm --filter @opencom/mobile typecheck
pnpm --filter @opencom/landing typecheckBefore web E2E runs, build/distribute the widget bundle:
bash scripts/build-widget-for-tests.shIf Convex-backed tests require local env loading in shell:
bash -lc 'set -a; source packages/convex/.env.local; set +a; pnpm --filter @opencom/convex test'For targeted Chromium specs:
pnpm playwright test apps/web/e2e/<spec>.ts --project=chromiumAuthenticated Playwright suites are parallel-safe by design:
- Each worker provisions or reuses one worker-local account/workspace
- Worker state is keyed by
parallelIndexand stored in worker-unique files - Auth refresh and persistence only touch the current worker's state files
- Missing or malformed worker state fails setup explicitly (no shared fallback)
Implementation reference: apps/web/e2e/fixtures.ts.
The canonical CI workflow is defined in .github/workflows/ci.yml:
- checks job: install, lint, typecheck, security gates, Convex tests, web build, dependency audit gate
- e2e job: Playwright suite with reliability report + reliability gate
To mirror CI locally where practical:
pnpm lint
pnpm typecheck
pnpm security:convex-auth-guard
pnpm security:convex-any-args-gate
pnpm security:secret-scan
pnpm security:headers-check
pnpm --filter @opencom/convex test
pnpm --filter @opencom/web build
pnpm web:test:e2epnpm test:summary— summarize recent E2E run failures fromtest-run-log.jsonlpnpm test:clear— clear run-history logpnpm test:e2e:prod— run E2E against production build path
- Run targeted package checks for touched area
- Run relevant tests for modified behavior
For release readiness integration, see ./security-and-operations.md.