Skip to content

chore: reporter batching + storageState pattern + typecheck pre-commit#3

Merged
MrFullStackDev merged 1 commit into
mainfrom
chore/reporter-and-tooling
May 2, 2026
Merged

chore: reporter batching + storageState pattern + typecheck pre-commit#3
MrFullStackDev merged 1 commit into
mainfrom
chore/reporter-and-tooling

Conversation

@MrFullStackDev

Copy link
Copy Markdown
Owner

Summary

  • DashboardReporter batching: buffer test rows in memory and flush in batches of 50 inside a transaction. Was one `fsync` per test (one transaction per insert) — fine at 100 tests, painful at 5000. WAL mode helps with parallelism but doesn't help with sync latency. Final flush in `onEnd()`.
  • storageState pattern: new `tests/auth/auth.setup.ts` logs in once with form auth and saves session to `.auth/form-auth.json`. Wired up to the `chromium-auth` project from PR ci: multi-browser sharded CI with PR gating + artifact upload #1 but currently inert (no test tagged `@auth` yet) — present as the reference pattern. Avoids re-running login in every authenticated test once the suite grows.
  • Pre-commit `tsc --noEmit`: type errors no longer slip through to CI. Lint-staged still runs first.

Test plan

  • Run a local test pass and confirm the DB still gets all rows (`sqlite3 dashboard/data/results.db 'select count(*) from tests'`)
  • Trigger a deliberate type error and confirm pre-commit blocks it
  • On a future authenticated test, tag it `@auth` and run `npx playwright test --project=chromium-auth` to verify storageState reuse

🤖 Generated with Claude Code

…re-commit

- DashboardReporter: buffer test rows and flush in batches of 50 inside
  a transaction. Was one fsync per test; matters at 5000+ tests.
- tests/auth/auth.setup.ts: documented storageState pattern. Logs in
  once and saves session to .auth/form-auth.json. Wired up to a future
  chromium-auth project (added in PR #1) but currently inert as no
  test is tagged @auth yet — present as a pattern reference.
- pre-commit: also runs `tsc --noEmit` after lint-staged, so type
  errors stop slipping through to CI.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@MrFullStackDev MrFullStackDev mentioned this pull request May 2, 2026
3 tasks
@MrFullStackDev MrFullStackDev merged commit 8b1aefa into main May 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant