feat: ship Wave 5-6 multi-surface hygiene, optimization, and bug fixes

This commit is contained in:
Yun Chan 2026-11-14 11:51:41 +09:00
parent 01ef3293cf
commit 66b6b45ba9
399 changed files with 17828 additions and 11330 deletions

View file

@ -1,7 +1,7 @@
# 02 — Repository & Infrastructure Map
> Surface: whole repo
> Last updated: 2026-11-08 — TDD 2.0 Phase 0-1 gates (test metrics, protected acceptance, quality ratchet) added to CI quality
> Last updated: 2026-11-13 — Source/packaging hygiene (`clean:deep`, trimmed `apps/desktop/resources/sox`, macOS-only `@nut-tree-fork` `asarUnpack`, Android R8 + `shrinkResources` + 12-locale `localeFilters`), `@d3ro/i18n` 2,500-key split, `site/` static/build CI gate, and TDD v2.0 Phase 2–5 gates (`check:i18n`, `check:ds-contract`, `test:affected`, `release:installer:smoke`)
> Source of truth for: layout, workspaces, build/test commands, CI/CD, Docker, deploy, scripts, resources
---
@ -29,9 +29,8 @@ D:/workspace/D3ROVoice
│ ├── cloudflare-worker/ Edge gateway (wrangler.toml + src/index.ts)
│ └── cloudflare-site-bridge/ Site bridge worker: forwards `/app/*` to WEB_APP_ORIGIN, rewrites upstream redirects, else proxies to Pages
├── site/ Vite landing site (deployed to Cloudflare Pages; GitHub Pages removed 2026-09-26, Wave 3)
├── resources/ icons/ (empty), sox/ (bundled Windows SoX binaries)
├── release/ Version identity SSOT + license/evidence public keys
├── scripts/ ~145 automation scripts + scripts/ci/ (31) + scripts/lib/
├── scripts/ Automation scripts + scripts/ci/ (32, incl. clean-deep.mjs) + scripts/lib/ + scripts/verification/
├── docs/ Design, phases, v2/v3 plans, deployment, map/ (this map)
├── memory/ Project status, handoffs, archive
├── test-results/ Last-run artifacts (root tests/e2e removed 2026-11-04 — orphaned duplicates)
@ -81,28 +80,35 @@ npm run build:all | npm run ci # typecheck + test + desktop/admin/web productio
npm run checksum # scripts/ci/generate-checksums.mjs
npm run version:check | version:sync
npm run release:metadata[:test]
npm run release:installer:smoke[:test] # PE64, gzip blockmap, SHA-512, app-update.yml, ASAR Pickle, Ed25519 .sig smoke gate
npm run release:forgejo[:check] # canonical Forgejo publisher/feed
npm run release:tag # annotated/signed immutable release tag
npm run security:secrets[:test] # hardcoded-secret scanner
npm run check:desktop-renderer[:test] # built renderer pages reference only assets on disk
npm run check:migrations[:test] # Supabase migration filename/order/non-empty metadata checks; no DB replay or remote drift
npm run check:migrations[:test] # Supabase migration filename/order/non-empty metadata checks (74 migrations); no DB replay or remote drift
npm run check:i18n[:test] # 12-locale 2,500-key parity, placeholder consistency, literal t() existence & orphan budget
npm run check:ds-contract[:test] # @d3ro/ui DS exports, theme-token purity, ARIA roles, and contract test coverage
npm run rebuild:app # rebuild better-sqlite3 in-place for Electron ABI
npm run rebuild:test # rebuild better-sqlite3 in-place for host Node ABI (Vitest)
node scripts/ci/verify-native-abi.mjs --self-test # required packaged N-API prebuild missing/present fixture
node scripts/ci/sync-i18n-locales.mjs # synchronize 12 locales against ko/en SSOT
node scripts/ci/sync-i18n-locales.mjs [--check] # verify/sync 12 locales against ko/en SSOT (zero hardcoded translations)
npm run test:e2e:red # content-report red e2e
npm run release:mobile:boundary[:test]
npm run release:mobile:config[:test]
npm run release:mobile:build-config:test
npm run release:play:assets[:test]
npm run typecheck # all workspaces; web/admin run `next typegen` before `tsc`
npm run test # all workspaces
npm run typecheck:site # site/ tsc --noEmit (outside npm workspaces)
npm run test # all workspaces (desktop, web, api-client, core, i18n, ui)
npm run test:affected[:test] # affected test selector over git diff (falls back to full suite on unknown paths)
npm run lint # eslint apps/desktop apps/web apps/admin packages
npm run lint:site # eslint site/src --max-warnings=0
npm run format # prettier
npm run typecheck:mobile # apps/mobile-rn tsc (outside npm workspaces)
npm run lint:mobile # apps/mobile-rn eslint --max-warnings=0
npm run test:mobile # apps/mobile-rn test:ci (jest --runInBand)
npm run verify:all # aggregate: workspaces + mobile (typecheck/lint/test)
npm run verify:all # aggregate: hygiene + protected-tests + quality + i18n + ds-contract + workspaces + mobile + site
npm run clean:deep # remove build outputs, caches, temp browser profiles, dangling symlinks (--dry-run supported)
```
Per-app commands that matter:
@ -155,11 +161,11 @@ See [`03-shared-packages.md`](./03-shared-packages.md). Summary:
| Package | Provides |
|---|---|
| `@d3ro/core` | Domain types, `D3ROError`/`ErrorCode`, IPC channel SSOT, key-binding SSOT (`./keybinding`), plan/quota catalog including `knowledge_embedding`, constants, `crypto-license`, `pii-redactor`, `secure-memory`, `supabase-config`, `meeting-markdown`, `markdown-to-docx`; Deno consumes the generated contract checked by `contract:check`; has vitest tests (`packages/core/vitest.config.ts`, `npm run test --workspace=@d3ro/core`) |
| `@d3ro/ui` | Theme tokens, CSS vars, MUI DS components (web/desktop) |
| `@d3ro/ui-native` | RN design system (MetalCard, PhosphorText, Led, PhysicalButton, WaveBars, …) |
| `@d3ro/i18n` | 12 locales / 2,742 parity-checked keys, `I18nProvider`, `t()`, date/number/relative formatters; includes native updater-dialog keys |
| `@d3ro/api-client` | Supabase browser/server clients, meetings/history/usage/transcribe wrappers, canonical push-token/provider + push/quota RPC types; has vitest tests |
| `@d3ro/core` | Domain types, `D3ROError`/`ErrorCode`, IPC channel SSOT, key-binding SSOT (`./keybinding`), plan/quota catalog including `knowledge_embedding`, constants, `crypto-license`, `pii-redactor`, `secure-memory`, `supabase-config`, `meeting-markdown`, `markdown-to-docx`, plus cross-surface `guards`, `csv`, `format`, `unified-search`, `admin-roles`, speaker diarization helpers (`meeting-transcript`), and deterministic `Clock`/`Random` `ports`; Deno consumes the generated contract checked by `contract:check`; has vitest tests (`packages/core/vitest.config.ts`, 38 files / 618 tests) |
| `@d3ro/ui` | Theme tokens, CSS vars, MUI DS components (web/desktop), ARIA-accessible `SegmentControl` (`tablist`/`tab`), and DS contract tests (`packages/ui/__tests__/ds-contract.test.tsx`, guarded by `check:ds-contract`) |
| `@d3ro/ui-native` | RN design system (MetalCard, PhosphorText, Led, PhysicalButton, WaveBars, …) + `>=600dp` tablet/foldable responsive primitives (`responsive.tsx`: `resolveResponsiveLayout`, `useResponsiveLayout`, `useContentWidth`, `<ContentColumn>`) |
| `@d3ro/i18n` | 12 locales / 2,500 parity-checked keys (253 orphan keys pruned on 2026-11-13), `I18nProvider`, `t()`, date/number/relative formatters; guarded by `check:i18n` and `packages/i18n/__tests__/locale-contract.test.ts` (15 tests) |
| `@d3ro/api-client` | Supabase browser/server clients, meetings/history/usage/transcribe wrappers, canonical push-token/provider + push/quota RPC types, `meeting_memos.revision` CAS shape; has vitest tests (4 files / 31 tests) |
---
@ -174,7 +180,7 @@ See [`03-shared-packages.md`](./03-shared-packages.md). Summary:
Stages `validate → test → build → e2e → package → publish → deploy`. Primary pipeline for desktop Windows/macOS releases (Forgejo Generic Registry is the canonical updater feed; GitLab project 1172 is a legacy mirror) and production mobile releases (`mobile-production-release`, manual/protected). Admin NAS deploy job is intentionally **disabled**. `package-windows`/`package-macos` build the faster-whisper sidecar (`sidecar:setup` → `sidecar:build`) and run `scripts/ci/verify-sidecar-bundle.mjs` before electron-builder, so a release can never ship without the local STT engine. Every pipeline that runs `npm run build --workspace=@d3ro/desktop` (`.forgejo` CI/release/portable) then runs `scripts/ci/verify-desktop-renderer-bundles.mjs`, which fails packaging when a renderer page references an asset the build did not emit (GAP-INFRA-05).
### Forgejo Actions (`.forgejo/workflows/`)
`ci.yml` — CI is now Forgejo-only (`.github/workflows` deleted 2026-09-26, Wave 3, dc43884). Jobs: `quality` (`version:check`, `contract:check`, `release:metadata:test`, migration checker self-test + actual filename/order/non-empty check, secret scan, mobile release/config/build-config self-tests, Play asset contract, lint, typecheck, Vitest), `build-validation` (desktop renderer verification + admin + web production builds), `mobile-quality`, `edge-functions` (Deno), `api-server-tests`. Web/admin typecheck runs Next 16 `typegen` before `tsc`, so a clean checkout generates and checks route/root-param declarations instead of relying on a prior dev/build artifact. The migration checks are file metadata/order gates only; Supabase replay, shadow DB, and remote drift remain separate runtime/integration gates. A separate isolated local run on 2026-11-04 applied all 73 migrations from empty and after reset, then returned an empty `pg-delta --strict-coverage` shadow diff; that runtime gate is not yet part of CI and says nothing about linked remote drift.
`ci.yml` — CI is now Forgejo-only (`.github/workflows` deleted 2026-09-26, Wave 3, dc43884). Jobs: `quality` (`version:check`, `contract:check`, `release:metadata:test`, `release:installer:smoke:test`, migration checker self-test + actual 74-migration filename/order/non-empty check, secret scan, mobile release/config/build-config self-tests, Play asset contract, `test:hygiene[:test]`, `check:protected-tests[:test]`, `test:quality[:test]`, `check:i18n[:test]`, `check:ds-contract[:test]`, `test:affected:test`, `lint`, `lint:site`, `typecheck`, `typecheck:site`, Vitest across desktop/web/api-client/core/i18n/ui), `build-validation` (desktop renderer verification + admin + web + `site/` production builds), `mobile-quality`, `edge-functions` (Deno), `api-server-tests`. Web/admin typecheck runs Next 16 `typegen` before `tsc`, so a clean checkout generates and checks route/root-param declarations instead of relying on a prior dev/build artifact. The migration checks are file metadata/order gates only; Supabase replay, shadow DB, and remote drift remain separate runtime/integration gates. A separate isolated local run on 2026-11-04 applied all 73 prior migrations from empty and after reset, then returned an empty `pg-delta --strict-coverage` shadow diff; that runtime gate is not yet part of CI and says nothing about linked remote drift.
`payple-renew.yml` — daily cron (+ manual dispatch) → `payple-renew` edge function; ported from the never-run `.github/workflows/payple-renew.yml` because the repository has no GitHub remote. Requires Forgejo secrets `SUPABASE_URL`, `CRON_SECRET`. 2026-09-26~10-11 `SUPABASE_URL` 시크릿이 로컬 주소(`127.0.0.1:55321`)라 한 번도 성공하지 못했다(GAP-OPS-03).
@ -185,7 +191,7 @@ Stages `validate → test → build → e2e → package → publish → deploy`.
`portable.yml` — 태그/수동 실행으로 **서명 없이** portable 채널(95MiB 7z 분할 볼륨 + Scoop 매니페스트 + 설치 스크립트)을 게시한다. `WIN_CSC_*` 불필요, updater feed는 건드리지 않는다.
`deploy-site.yml` — 유일한 사이트 배포 경로(Linux, Cloudflare Pages). Windows 수동 중복 워크플로(`deploy-site-windows.yml`)는 2026-09-26 삭제됐다(dc43884). build `site`, write release identity, deploy to Cloudflare Pages `d3ro` (`d3ro.pages.dev`), verify live commit/version, app-links, legal URLs. 커스텀 도메인 `d3ro.chanpaca.net` 은 Pages 커스텀 도메인이 DNS CNAME을 요구하므로, DNS를 건드릴 수 없는 동안은 Workers 라우트 브리지 `server/cloudflare-site-bridge/`(`d3ro.chanpaca.net/*` → Pages 프록시, 수동 `npx wrangler deploy`)가 서빙한다. CNAME을 추가한 뒤 브리지를 삭제하면 Pages 커스텀 도메인으로 직접 서빙된다(GAP-REL-09b).
`release.yml` — tag-triggered Windows build (signed) + `publish-forgejo-release.mjs` to the canonical Forgejo feed/release hub.
`release.yml` — tag-triggered Windows build + `verify-desktop-installer-smoke.mjs` (PE64/blockmap/SHA-512/ASAR/feed smoke gate) + `publish-forgejo-release.mjs` to the canonical Forgejo feed/release hub.
---
@ -208,7 +214,7 @@ Public endpoints (production): `https://d3ro.chanpaca.net` — **랜딩/다운
## 7. `server/supabase` (backend)
- `config.toml` — project `d3ro-voice`, ports 55321-55324, DB major 17, Supabase CLI 3.x `[local_smtp]`, auth redirects (localhost, `d3ro.chanpaca.net`, `d3ro-voice://auth-callback`), providers Google/GitHub/Apple. `audio-purge` has an explicit function stanza with gateway JWT verification disabled because its handler verifies the exact pg_cron service credential. An isolated local stack proved missing/non-service key 401, service 200, and pg_cron/Vault/pg_net removal of the queue row, `audio_files` row, and Storage object; deployment and the production schedule remain unverified.
- `migrations/` — **73 SQL migrations** (schema, RLS, auth triggers, storage, team invites, knowledge/pgvector, push outbox, Payple billing (legacy Stripe columns/provider values kept for history), admin roles, mobile platform/monetization, atomic command reorder, device revocation, content reporting, audit log, meeting documents, STT quota reservations, ad reward replay protection, team activity feed).
- `migrations/` — **74 SQL migrations** (schema, RLS, auth triggers, storage, team invites, knowledge/pgvector, push outbox, Payple billing (legacy Stripe columns/provider values kept for history), admin roles, mobile platform/monetization, atomic command reorder, device revocation, content reporting, audit log, meeting documents, STT quota reservations, ad reward replay protection, team activity feed, cross-device sync parity & tombstones, and immutable `meeting_memos.revision` CAS `20261113000001`).
- `functions/` — **24 Deno Edge Functions** (`stt-proxy`, `llm-proxy`, `content-report`, `generate-meeting-document`, `embed-chunks`, `search-knowledge`, `realtime-token`, `team-invite`, `team-accept`, `send-push`, `audio-purge`, `account-delete`, `admin-users`, `admin-subscriptions`, `admin-payments`, `admin-audit-log`, billing `billing-catalog`/`payple-checkout`/`payple-manage`/`payple-renew`/`payple-webhook`, `iap-verify`, `admob-ssv`, `google-play-rtdn`; Stripe functions removed 2026-09-26). Shared contracts in `functions/_shared/` — push transports now include `webpush.ts` (VAPID + RFC 8291) and `apns.ts` (.p8 token) alongside FCM. CI (`edge-functions`) runs `deno check` + `deno test` and also the Cloudflare worker drain test.
- `tests/` — integration/E2E for content report, mobile platform/recording/reward-race, payments, mobile release preflight, push, team push security, STT quota.
@ -223,7 +229,8 @@ Full detail: [`09-supabase-backend.md`](./09-supabase-backend.md).
- **Deploy/release:** `deploy-nas.ps1/.sh`, `nas-control.sh`, `publish-gh.ps1`, `gen-keystore.js` (`deploy-site-to-nas.js` deleted 2026-09-26, Wave 3, cd9d199 — site deploy is Cloudflare Pages only).
- **Android artifact verification (2026-11-01):** `verify-android-artifact.mjs` parses both legacy `Signer #1` and Build Tools 37 `V2/V3.x Signer` certificate output. Self-test and the actual universal E2E APK verification pass with Build Tools `37.0.0`.
- **GCP/Google OAuth automation + inspection (~70 `*.mjs`):** `auto-configure-oauth`, `automate-google-oauth`, `setup-consent`, `create-*-client`, `check-*`, `inspect-*` — mostly one-off/browser-driven console automation.
- **AdMob console automation:** `admob-probe.mjs` (read-only login/app/ad-unit probe), `admob-login.mjs` + `run-admob-login.bat` (one interactive headful Chrome login into a persistent profile), `admob-automate.mjs` (dry-run by default; `--apply` creates/verifies banner+rewarded units and reports Play-store link). Uses `playwright` with `channel: 'chrome'` and the gitignored `.chrome-playwright-profile`.
- **AdMob console automation:** `admob-probe.mjs` (read-only login/app/ad-unit probe), `admob-login.mjs` (one interactive headful Chrome login into a persistent profile), `admob-automate.mjs` (dry-run by default; `--apply` creates/verifies banner+rewarded units and reports Play-store link). Uses `playwright` with `channel: 'chrome'` and the gitignored `.chrome-playwright-profile`.
- **Clean-up:** `scripts/ci/clean-deep.mjs` (`npm run clean:deep`, `--dry-run`) strips monorepo `out`/`dist`/`.next`/`bin`/`obj`/Android `build`/`.maestro-output`, temp `.chrome-*`/`.playwright-*` profiles, and any dangling `apps/mobile-rn/node_modules/d3ro-voice-monorepo` reparse point. The untracked `scripts/local/` dump directory (109 one-off probe scripts) and 16 unreferenced loose root scripts were deleted on 2026-11-13.
- **E2E / verification:** `test-and-capture-all-10-ad-services.js`, `verify-live-production-d3ro.js`. The old ad-hoc `e2e-desktop-*.js` / `real-app-multi-tab-e2e.js` / `run_e2e_*.cjs` runners were deleted 2026-11-04 (machine-specific paths, no references); Playwright specs under `apps/desktop/tests/e2e` are the E2E path.
- **Screenshots/captures:** `capture-*.js`.
- **Forgejo ops:** `check-forgejo-actions-runs.js`, `capture-forgejo-*.js`.
@ -236,11 +243,11 @@ Full detail: [`09-supabase-backend.md`](./09-supabase-backend.md).
| File | Purpose |
|---|---|
| `release/product-version.json` | version `1.16.1`, `androidVersionCode`/`iosBuildNumber` `1160100`, releaseDate `2026-11-04`, desktop license keyId |
| `release/product-version.json` | version `1.16.5`, `androidVersionCode`/`iosBuildNumber` `1160500`, desktop license keyId |
| `release/android-release-identity.json` | package `com.d3ro.voice`, Play app ID, app-signing SHA-256, upload cert SHA-256, evidence keyId, AdMob unit IDs |
| `release/desktop-license-public.pem` | Ed25519 public key for desktop offline licenses |
| `release/mobile-release-evidence-public.pem` | Ed25519 public key for mobile release evidence |
| `apps/desktop/electron-builder.yml` | appId `com.d3ro.voice`, NSIS x64 (forced code signing), macOS DMG/ZIP arm64, generic Forgejo publish feed, asarUnpack native modules + `@ffmpeg-installer`, extraResources (icons, sounds, sox, **sidecar**, ffmpeg, ollama) |
| `apps/desktop/electron-builder.yml` | appId `com.d3ro.voice`, NSIS x64 (forced code signing), macOS DMG/ZIP arm64, generic Forgejo publish feed, asarUnpack native modules (`better-sqlite3`, `uiohook-napi`, `koffi`, `@koromix`, `@ffmpeg-installer`; `@nut-tree-fork` unpacked on macOS only), extraResources (icons, sounds, filtered `sox.exe`+`zlib1.dll`+`LICENSE.GPL.txt`, **sidecar**, ffmpeg, ollama) |
| `apps/desktop/src/main/update-feed.ts` | Auto-update feed SSOT (canonical Forgejo + legacy GitLab mirror, channels) |
| `release/update-policy.json` | Update policy SSOT (channels, minimum supported version, forced update, delta/full, staged rollout, kill switch) |
| `site/src/release.ts` | Download-center desktop release contract (installer filename + release date); version and date are kept on the SSOT by `npm run version:sync` (drifted to 1.2.0 once — GAP-REL-08). `apps/web/src/lib/desktop-release.ts` and the `apps/web` download/releases pages were deleted 2026-09-26 (Wave 3, cd9d199) — `site/` is the only download surface, and `/download`/`/releases` on `apps/web` now redirect to it |
@ -253,18 +260,22 @@ Version sync is enforced by `scripts/ci/sync-version.mjs` and `verify-release-me
## 10. Resources & tests
- `resources/sox/` — bundled Windows SoX (`sox.exe` + DLLs) for audio capture.
- `apps/desktop/resources/sox/` — canonical bundled Windows SoX (`sox.exe`, `zlib1.dll`, `LICENSE.GPL.txt`; PE-verified, unused `wget.exe`/`pthreadgc2.dll`/PDFs and duplicate root `resources/sox/` removed 2026-11-13) for audio capture.
- `resources/ffmpeg/` — optional bundled ffmpeg (CI or manual); `getFfmpegPath()` also resolves the `@ffmpeg-installer/ffmpeg` binary from `app.asar.unpacked`.
- `apps/desktop/sidecar-dist/` — PyInstaller sidecar bundle consumed by `extraResources` (gitignored; built by `npm --prefix apps/desktop run sidecar:build`).
- `resources/icons/` — empty; electron-builder falls back to `build/icon.ico|png`.
- Desktop tests: `apps/desktop/tests/` — `unit/`, `main/`, `red/`, `shared/`, `integration/`, `eval/` run under Vitest; `e2e/` holds Playwright specs plus the shared `e2e/support/electron-app.ts` fixture (per-test temp user-data dir). Artifacts in `apps/desktop/test-results/`.
- Test taxonomy + hygiene gate: `docs/tdd-red/06-repo-application.md`. `npm run test:hygiene` (+ `:test`) rejects `.only`, reason-less `.skip()`, trivial assertions, `isVisible()`-gated assertions, machine-specific paths, `waitForTimeout`, and `.e2e.test.ts` names; wired into CI `quality`.
- Test-system gates (TDD 2.0 Phase 0-1, 2026-11-08):
- `npm run test:metrics` / `test:metrics:write` — suite/file/case/assertion counts plus weak-assertion and ambient-time totals; writes `docs/tdd-red/metrics/<date>.md`. Metric only, never fails.
- Test-system gates (TDD 2.0 Phases 0–5, 2026-11-08..13):
- `npm run test:metrics` / `test:metrics:write` — suite/file/case/assertion counts across all 10 suites (incl. `@d3ro/i18n` and `@d3ro/ui`) plus weak-assertion and ambient-time totals; writes `docs/tdd-red/metrics/<date>.md`. Metric only, never fails.
- `npm run check:protected-tests` (+ `:test`) — `scripts/ci/check-protected-tests.mjs` diffs the six protected acceptance specs (`06 §5`) against a base revision and fails when tests, assertions, or `.only`/`.skip` change without an `allow-protected-change:` commit marker. CI runs it against `HEAD^` (the quality job fetches depth 2).
- `npm run test:quality` (+ `:test`, `:update`) — ratchet over `scripts/ci/test-quality-baseline.json`: per-file weak-assertion and ambient-time counts may only go down. `--update` is a reviewed action.
- Shared file-detection helpers live in `scripts/ci/lib/test-files.mjs` so all three gates see the same test files.
- Mobile tests: `apps/mobile-rn/__tests__/` (57 suites / 353 tests per mobile SSOT), `.maestro/` + `.maestro-output/` E2E evidence. Note: a full parallel Jest run can hit the 5s render timeout on slow machines; re-run the failing spec in isolation before treating it as a regression.
- `npm run test:quality` (+ `:test`, `:update`) — ratchet over `scripts/ci/test-quality-baseline.json`: per-file weak-assertion and ambient-time counts may only go down (scans both tracked and untracked working-tree test files). `--update` is a reviewed action.
- `npm run check:i18n` (+ `:test`) — `scripts/ci/check-i18n-contract.mjs` verifies 12-locale 2,500-key set equality, non-empty strings, `{{placeholder}}` parity, literal `t('...')` key existence, and unreferenced-key budget (`<=35`).
- `npm run check:ds-contract` (+ `:test`) — `scripts/ci/check-ds-contract.mjs` verifies `@d3ro/ui` DS component exports, zero raw hex outside `theme.ts`/`theme-raw.ts`, required ARIA roles (`SegmentControl` `tablist`/`tab`), and DS contract test references.
- `npm run test:affected` (+ `:test`) — `scripts/ci/run-affected-tests.mjs` maps git diffs to targeted Vitest/Jest/Deno/.NET test commands and safely falls back to the full suite on unmapped paths (CI continues to run full suites).
- `npm run release:installer:smoke` (+ `:test`) — `scripts/ci/verify-desktop-installer-smoke.mjs` validates NSIS `.exe` PE64 headers, gzip `.blockmap` magic, `latest.yml` SHA-512 & byte size, `win-unpacked` `D3RO Voice.exe` PE64, `resources/app-update.yml` feed URL, `resources/app.asar` Chromium Pickle JSON header, and optional Ed25519 `.sig` manifest signature inside `release-desktop.mjs` and `.forgejo/workflows/release.yml`.
- Shared file-detection helpers live in `scripts/ci/lib/test-files.mjs` so `test:metrics` and `test:quality` inspect the exact same test files.
- Mobile tests: `apps/mobile-rn/__tests__/` (89 suites / 605 tests PASS on 2026-11-13), `.maestro/` + `.maestro-output/` E2E evidence. Note: a full parallel Jest run can hit the 5s render timeout on slow machines; `test:mobile` uses `--runInBand`.
- Web tests: `apps/web/tests/` (vitest pure-logic contracts: billing catalog, Web Push client, web STT client — now part of root `npm test`) and `apps/web/e2e/` (playwright: `smoke.spec.ts` owns the unauthenticated surface contract; billing/payple/dashboard/history are fixture-based browser journeys). Web declares its own `@playwright/test` + `vitest` devDeps (2026-11-04) instead of relying on the desktop workspace's hoisted copies.
- API tests: `apps/api-server.Tests/` (xUnit).
- Root: `test-results/.last-run.json` (no root-level e2e suite).