Skip to content

08. Testing and Quality

Test layout

Confirmed: no *.test.* / *.spec.* files; no test script in package.json.

Quality relies on TypeScript, ESLint, Prettier, and manual use.

Commands

Command Role
pnpm typecheck Static types
pnpm lint ESLint + React hooks/refresh
pnpm build tsc -b + Vite production bundle
pnpm format Prettier

Backend / RAG coverage

None automated. High-risk untested areas:

  • RRF fusion edge cases
  • Keyword OR tsquery construction
  • Index transaction rollback behavior
  • Import/export IndexedDB deletion races

Frontend coverage

No component or e2e tests. Router/plugin generation and UI flows are manually verified.

Agent / worker tests

No worker unit tests. Embedding worker device/dtype assumptions (webgpu, q8) are untested across browsers.

CI quality gates

Deploy workflow runs install + build only. Lint/typecheck are not separate CI steps (typecheck is partially covered by tsc -b in build).

What is well-structured vs risky

Strength Risk
Clear module boundaries for RAG/LLM/DB No regression tests for retrieval
TypeScript throughout Prefs default id mismatch can hide bugs
In-app diagnostics UI CI does not run lint
Debug panel aids manual QA Cross-browser WebGPU variance

Quality interview questions

Q: How do you prevent retrieval regressions?
A: Today: manual debug panel inspection. Ideal: golden-query fixtures over a seeded PGlite dump.

Q: What’s the minimum CI upgrade?
A: Add pnpm lint and pnpm typecheck (if not fully redundant) before deploy; then unit tests for reciprocalRankFusion and chunkText.