refactor(desktop): structure suggestion pipeline and restore test gates

This commit is contained in:
Yun Chan 2026-10-31 23:14:11 +09:00
parent fe0989c456
commit 1d4f8d8401
17 changed files with 813 additions and 569 deletions

View file

@ -1,7 +1,7 @@
# 02 — Repository & Infrastructure Map
> Surface: whole repo
> Last updated: 2026-10-30 — desktop typing race/load verification tools (INFRA-20)
> Last updated: 2026-10-31 — desktop Vitest green baseline and unit/service/integration/eval tiers (GAP-QA-03)
> Source of truth for: layout, workspaces, build/test commands, CI/CD, Docker, deploy, scripts, resources
---
@ -111,6 +111,20 @@ Per-app commands that matter:
| web | `next build`, playwright e2e in `apps/web/e2e` |
| admin | `next build` (`build:admin`) |
Desktop Vitest uses one `apps/desktop/vitest.config.ts` SSOT with mode-specific include globs:
| Command (`npm --prefix apps/desktop run …`) | Scope |
|---|---|
| `test` | Deterministic offline unit + service tests (default gate) |
| `test:unit` | `tests/unit` only |
| `test:service` | `tests/main` + `tests/red` with process/network/model doubles |
| `test:integration` | Real Ollama/Supabase tests; requires their documented environment variables |
| `test:eval` | Suggestion quality/latency evaluation and pure replay metrics |
| `test:all` | All Vitest scopes (external tests skip when their environment is absent) |
| `test:e2e` | Playwright GUI tests |
2026-10-31 baseline (GAP-QA-03): `test:unit` 286 passed; `test:service` 2478 passed; default `test` 2764 passed; `test:all` 2788 passed / 10 skipped / 0 failed. External Ollama/Supabase tests were not run because their environment variables were absent. Run the full test gate separately from other CPU-heavy checks because voice timing suites can contend for resources.
Desktop GUI execution rule (from `CLAUDE.md` / `.agents/rules/`): run via `run-desktop.bat` or an external terminal; do not background-launch GUI from an agent subshell.
Desktop input verification (2026-10-30, INFRA-20):