test(infra): gate protected acceptance tests and ratchet test quality (TDD 2.0 Phase 1)
docs/tdd-red/07-revamp-plan.md Phase 1 — v1.1이 문서로만 선언한 것을 게이트로 옮긴다. 보호 수용 경로 게이트 (check-protected-tests.mjs): - 06 §5 의 보호 6경로를 base revision 과 비교한다. - 실패 조건: 테스트/스텝 블록 감소, expect 감소, .only 추가, skip/todo 추가, 보호 파일 삭제. - 정당한 스펙 변경은 커밋 본문 `allow-protected-change: <사유>` 또는 --reason 으로만 통과한다(사람 리뷰 대체 아님). CI quality 잡이 --base HEAD^ 로 실행하며 체크아웃이 depth 2 로 바뀐다. 얕은 클론에서는 SKIP 사유를 출력한다. 품질 래칫 (check-test-quality.mjs + test-quality-baseline.json): - 파일별 weak-assertion(toBeDefined/toBeTruthy/toBeFalsy/toBeNull)과 ambient-time(Date.now/Math.random/performance.now) 수치를 동결하고 증가만 막는다. - 128 / 203 건을 한 번에 고치지 않고 회귀만 차단한다. --update 는 리뷰 후 실행. 배선: verify:all 에 두 게이트 편입, CI quality 잡 단계 추가, map/02 §10 · tdd-red/06 §5·§6 · 07 Phase 0-1 상태 갱신. 검증: - self-test: check-protected-tests 6케이스, check-test-quality 6케이스 통과 - 실제 약화 주입 시 두 게이트가 exit 1 (smoke.spec.ts .only, 약한 단정 추가) 후 원복 - npm run test:hygiene / check:design GREEN, npm test GREEN (2800+605+31+24)
This commit is contained in:
parent
42583cc96b
commit
d3d6f34bfa
9 changed files with 658 additions and 22 deletions
|
|
@ -40,7 +40,8 @@ jobs:
|
|||
[ -d .git ] || git init -q .
|
||||
git remote remove origin 2>/dev/null || true
|
||||
git remote add origin "$url"
|
||||
git fetch -q --depth 1 origin "$GITHUB_REF"
|
||||
# depth 2: 보호 수용 테스트 게이트가 HEAD^ 와 비교한다 (얕은 클론 1이면 비교 불가).
|
||||
git fetch -q --depth 2 origin "$GITHUB_REF"
|
||||
git checkout -q -f FETCH_HEAD
|
||||
git clean -qfdx
|
||||
|
||||
|
|
@ -84,6 +85,13 @@ jobs:
|
|||
npm run test:hygiene:test
|
||||
npm run test:hygiene
|
||||
|
||||
- name: 보호 수용 테스트·품질 래칫
|
||||
run: |
|
||||
npm run check:protected-tests:test
|
||||
npm run check:protected-tests -- --base HEAD^
|
||||
npm run test:quality:test
|
||||
npm run test:quality
|
||||
|
||||
- name: 린트
|
||||
run: npm run lint
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# 02 — Repository & Infrastructure Map
|
||||
|
||||
> Surface: whole repo
|
||||
> Last updated: 2026-11-04 — Wave 4 toolchain/CI map reconciliation; Windows 1.16.1 release evidence remains unchanged
|
||||
> Last updated: 2026-11-08 — TDD 2.0 Phase 0-1 gates (test metrics, protected acceptance, quality ratchet) added to CI quality
|
||||
> Source of truth for: layout, workspaces, build/test commands, CI/CD, Docker, deploy, scripts, resources
|
||||
|
||||
---
|
||||
|
|
@ -259,6 +259,11 @@ Version sync is enforced by `scripts/ci/sync-version.mjs` and `verify-release-me
|
|||
- `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.
|
||||
- `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.
|
||||
- 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).
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
| `04-long-scenarios.md` | RED를 **긴 시나리오**(행위 사양)로 재구성 | 핵심 산출물 3 |
|
||||
| `05-framework.md` | 실행 프레임워크: 제어 루프·AGENTS.md·체크리스트·게이트 | 핵심 산출물 4 |
|
||||
| `06-repo-application.md` | **이 저장소 적용본**: 계층·경로·명령·게이트·삭제/통폐합 기록 | 실행 정본 |
|
||||
| `07-revamp-plan.md` | **v2.0 개편 계획**: v1.1이 문선만 선언한 것(보호경로·강도·결정성·i18n 계약·영향 선택)을 게이트로 옮기는 Phase 0~5 | 실행 계획(미실행) |
|
||||
| `07-revamp-plan.md` | **v2.0 개편 계획**: v1.1이 문서로만 선언한 것(보호경로·강도·결정성·i18n 계약·영향 선택)을 게이트로 옮기는 Phase 0~5 | Phase 0·1 완료 / 2~5 계획 |
|
||||
| `SOURCES.md` | 100개 정보 항목(약 94 외부) + 1차 소스 14개 | 증거 자료실 |
|
||||
|
||||
---
|
||||
|
|
@ -75,7 +75,8 @@ docs/tdd-red/
|
|||
├── 04-long-scenarios.md
|
||||
├── 05-framework.md
|
||||
├── 06-repo-application.md ← 이 저장소 경로·명령·게이트 (실행 정본)
|
||||
├── 07-revamp-plan.md ← v2.0 개편 계획 (Phase 0~5, 미실행)
|
||||
├── 07-revamp-plan.md ← v2.0 개편 계획 (Phase 0·1 완료)
|
||||
├── metrics/ ← test-metrics 기준선 (날짜별, 게이트 아님)
|
||||
└── SOURCES.md (100개 정보 항목: 약 94 외부 출처)
|
||||
└── 레드팀 검증 → `scratch/tdd-red/redteam/01~05*.md` (5방면)
|
||||
```
|
||||
|
|
|
|||
|
|
@ -125,8 +125,11 @@ apps/web/e2e/smoke.spec.ts
|
|||
규칙:
|
||||
0. 저장소 루트 `CODEOWNERS` 가 이 경로들(와 `docs/tdd-red/`, hygiene 스크립트)의 소유자를 지정한다.
|
||||
1. 이 파일의 **단정 삭제·약화·skip** 은 사람 승인 없이 금지(`05 §2`의 '보호' 다운그레이드).
|
||||
2. 새 수용 계약이 필요하면 이 목록에 추가하고 **이 문서 §4 에 근거를 남긴다.**
|
||||
— 2026-11-08부터 `npm run check:protected-tests` 가 이를 **기계적으로 막는다**(§6).
|
||||
2. 새 수용 계약이 필요하면 이 목록에 추가하고 **이 문서 §4 에 근거를 남긴다**
|
||||
(`scripts/ci/check-protected-tests.mjs` 의 `PROTECTED_FILES` 도 같은 커밋에서).
|
||||
3. 여정이 바뀌면 먼저 "왜 사용자가 하는 일이 바뀌었는가"를 커밋 본문에 적는다. 테스트만 고치지 않는다.
|
||||
커밋 본문의 `allow-protected-change: <사유>` 가 게이트를 통과시키는 유일한 경로다(사람 리뷰 대체 아님).
|
||||
|
||||
---
|
||||
|
||||
|
|
@ -135,6 +138,11 @@ apps/web/e2e/smoke.spec.ts
|
|||
```bash
|
||||
# 커밋 전 (빠름)
|
||||
npm run test:hygiene:test && npm run test:hygiene
|
||||
npm run check:protected-tests:test && npm run check:protected-tests
|
||||
npm run test:quality:test && npm run test:quality
|
||||
|
||||
# 지표(게이트 아님) — 날짜 문서로 기록
|
||||
npm run test:metrics:write
|
||||
|
||||
# 통합 전 (워크스페이스)
|
||||
npm run verify:all
|
||||
|
|
@ -156,6 +164,17 @@ npm run test:e2e --workspace=@d3ro/web
|
|||
`e2e/` 밖의 `*.spec.ts`, 단정이 한 줄도 없는 테스트 파일.
|
||||
규칙을 늘릴 때는 `--self-test` 에 unsafe/safe fixture 를 **함께** 추가한다(오탐 방지).
|
||||
|
||||
TDD 2.0 에서 추가된 게이트 (2026-11-08, `07-revamp-plan.md` Phase 0–1):
|
||||
|
||||
| 게이트 | 명령 | 막는 것 |
|
||||
|---|---|---|
|
||||
| 보호 수용 무결성 | `npm run check:protected-tests` (`--base <rev>`) | 보호 여정의 테스트·단정 감소, `.only`·`skip` 추가 — `allow-protected-change:` 커밋 마커 없이는 실패 |
|
||||
| 품질 래칫 | `npm run test:quality` | 파일별 **약한 단정**(`toBeDefined/toBeTruthy/toBeFalsy/toBeNull`)과 **ambient 시계/난수**(`Date.now/Math.random/performance.now`) 증가 |
|
||||
| 지표 | `npm run test:metrics[:write]` | 아무것도 막지 않는다. 추세 기록용(`docs/tdd-red/metrics/`) |
|
||||
|
||||
세 게이트는 테스트 파일 판정을 `scripts/ci/lib/test-files.mjs` 한 곳에서 공유한다.
|
||||
`test:quality` 기준선은 `scripts/ci/test-quality-baseline.json` 이며 `npm run test:quality:update` 로만 갱신한다(사람 리뷰).
|
||||
|
||||
> 데스크톱 E2E 는 CI 러너에 X 디스플레이가 없어 상시 잡으로 돌리지 않는다. 릴리스 전 로컬/Windows 러너에서 돌린다.
|
||||
> (이 저장소 규칙: 에이전트 서브셸에서 Electron GUI 를 백그라운드 실행하지 않는다.)
|
||||
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@
|
|||
| 스크립트 | 역할 | 최초 규칙 |
|
||||
|---|---|---|
|
||||
| `scripts/ci/check-protected-tests.mjs` | 보호 경로 diff 검사 | (a) 보호 파일에서 `it/test` 개수 **감소** 시 실패 (b) `expect(` 감소 시 실패 (c) `.skip/.only` 추가 시 실패 (d) 커밋 본문/PR 라벨에 `allow-protected-change:` 마커 + 사유가 없으면 실패 |
|
||||
| `scripts/ci/check-test-hygiene.mjs` **확장** | 규칙 2개 추가 | `weak-assertion`(`toBeDefined/toBeTruthy/not.toBeNull` **만** 있는 테스트 블록), `ambient-time`(테스트에서 무주입 `Date.now()/Math.random()` — 허용 목록: 시드 계산·`vi.setSystemTime` 직전) |
|
||||
| `scripts/ci/check-test-quality.mjs` | **래칫** 게이트(파일별 기준선 동결) | `weak-assertion`(`toBeDefined/toBeTruthy/toBeFalsy/toBeNull`), `ambient-time`(무주입 `Date.now/Math.random/performance.now`). 기준선 `scripts/ci/test-quality-baseline.json` |
|
||||
| `scripts/ci/check-i18n-contract.mjs` | 로케일 계약 | 키 집합 동일성(12개), `t('…')` 리터럴이 ko에 존재, 고아 키 리포트(게이트 아님 → 임계치 초과 시 실패) |
|
||||
| `scripts/ci/check-ds-contract.mjs` | DS 계약 | `packages/ui` DS 컴포넌트가 role/aria 최소 계약을 export하고 테스트가 참조하는지 |
|
||||
| `scripts/ci/test-metrics.mjs` | 지표 산출(게이트 아님) | 스위트별 케이스/시간/약한 단정/flaky 후보/뮤테이션 점수 → `docs/tdd-red/metrics/YYYY-MM-DD.md` |
|
||||
|
|
@ -91,12 +91,17 @@
|
|||
- 산출: `docs/tdd-red/metrics/2026-11-08.md` — 파일 407 · 케이스 3,498 · 단정 8,958 · 약한 단정 128 · ambient 203 · i18n 2,753키×12.
|
||||
- **Exit 충족**: 지표 문서 + `npm run test:metrics` / `test:metrics:write` 등록.
|
||||
|
||||
### Phase 1 — 집행 수단 1: 보호경로·위생 (2~3일)
|
||||
- `check-protected-tests.mjs` (+ self-test fixture: 약화/삭제/skip/정당한 변경 4케이스)
|
||||
- hygiene 규칙 `weak-assertion`, `ambient-time` 추가 + self-test fixture **동시** 추가(`06 §8`)
|
||||
- **기존 106건은 파일 단위 점진 정리**: 신규/수정 파일만 0 강제(`--changed` 모드) → 3주 내 전량.
|
||||
- CI `quality` 잡에 두 게이트 추가.
|
||||
- **Exit**: 보호 파일을 일부러 약화한 PR이 CI에서 **빨강**, 정당한 변경은 마커로 통과.
|
||||
### Phase 1 — 집행 수단 1: 보호경로·품질 래칫 (✅ 완료 2026-11-08)
|
||||
- `scripts/ci/check-protected-tests.mjs` — 보호 6경로 diff 검사:
|
||||
테스트/스텝 블록 감소 · `expect` 감소 · `.only` 추가 · `skip/todo` 추가 → 실패.
|
||||
정당한 변경은 커밋 본문 `allow-protected-change: <사유>` 또는 `--reason` 으로만 통과.
|
||||
CI `quality` 잡이 `--base HEAD^` 로 실행(체크아웃 depth 2). 얕은 클론에서는 SKIP 사유를 출력.
|
||||
- `scripts/ci/check-test-quality.mjs` + `scripts/ci/test-quality-baseline.json` — 래칫 게이트.
|
||||
오늘 수치(weak 128 / ambient 203)를 파일별로 동결하고 **증가만** 막는다.
|
||||
`--update` 는 사람 리뷰 후에만.
|
||||
- `npm run verify:all` 에 두 게이트 편입.
|
||||
- **Exit 충족**: `.only` 를 보호 여정에 넣으면 CI/로컬이 빨강(수동 검증 완료),
|
||||
새 약한 단정을 넣으면 `test:quality` 가 빨강(수동 검증 완료).
|
||||
|
||||
### Phase 2 — 집행 수단 2: 계약·i18n·DS (2~3일)
|
||||
- `packages/i18n/__tests__/locale-contract.test.ts`: 12로케일 키 집합 동일, `{placeholders}` 정합, 값이 비어있지 않음.
|
||||
|
|
@ -128,15 +133,16 @@
|
|||
## 5. 게이트 커맨드 (개편 후 최종형)
|
||||
|
||||
```bash
|
||||
# 커밋 전 (목표 < 90초)
|
||||
# 커밋 전 (목표 < 90초) — Phase 0·1 반영
|
||||
npm run test:hygiene:test && npm run test:hygiene
|
||||
npm run check:protected-tests
|
||||
npm run test:affected
|
||||
npm run check:protected-tests:test && npm run check:protected-tests
|
||||
npm run test:quality:test && npm run test:quality
|
||||
npm run test:affected # Phase 3
|
||||
|
||||
# PR / 통합
|
||||
npm run verify:all # 기존
|
||||
npm run check:i18n && npm run check:ds-contract
|
||||
npm run test:metrics:check # 약한 단정/고아 키 임계치
|
||||
npm run verify:all # 위 두 게이트 포함
|
||||
npm run check:i18n && npm run check:ds-contract # Phase 2
|
||||
npm run test:metrics:write # 지표 스냅샷(게이트 아님)
|
||||
|
||||
# 야간
|
||||
npm run test:mutation -- --full
|
||||
|
|
@ -172,9 +178,11 @@ npm run test:acceptance:web
|
|||
|
||||
## 8. 완료 정의 (v2.0)
|
||||
|
||||
- [ ] Phase 0~2 완료: 보호경로·i18n·DS 게이트가 CI에서 실제로 빨강을 낸다(자기검증 fixture 포함)
|
||||
- [x] Phase 0 완료: 지표 기준선(`docs/tdd-red/metrics/2026-11-08.md`) + `test:metrics`
|
||||
- [x] Phase 1 완료: 보호경로·품질 래칫이 실제로 빨강을 낸다(self-test 6+6 케이스)
|
||||
- [ ] Phase 2 완료: i18n·DS 계약 게이트가 CI에서 실제로 빨강을 낸다
|
||||
- [ ] `test:affected` 로컬 중앙값 < 60초
|
||||
- [ ] 핵심 6모듈 뮤테이션 점수 기준선 + 추세 기록
|
||||
- [ ] 보호 6경로가 릴리스 태그에서 실행되고 증거가 남는다
|
||||
- [ ] `docs/tdd-red/00`~`06`이 실행 결과와 일치(문서-코드 드리프트 0) — `06 §8` 갱신 규칙 준수
|
||||
- [ ] `docs/map/02-infrastructure.md` §테스트 인프라 행 갱신
|
||||
- [~] `docs/tdd-red/00`~`06`이 실행 결과와 일치 — `06 §5·§6` 갱신 완료, §2/§4는 Phase 2 에서
|
||||
- [x] `docs/map/02-infrastructure.md` §10 테스트 인프라 행 갱신 (Phase 0·1 게이트)
|
||||
|
|
|
|||
|
|
@ -59,6 +59,11 @@
|
|||
"test:hygiene:test": "node scripts/ci/check-test-hygiene.mjs --self-test",
|
||||
"test:metrics": "node scripts/ci/test-metrics.mjs",
|
||||
"test:metrics:write": "node scripts/ci/test-metrics.mjs --write",
|
||||
"check:protected-tests": "node scripts/ci/check-protected-tests.mjs",
|
||||
"check:protected-tests:test": "node scripts/ci/check-protected-tests.mjs --self-test",
|
||||
"test:quality": "node scripts/ci/check-test-quality.mjs",
|
||||
"test:quality:test": "node scripts/ci/check-test-quality.mjs --self-test",
|
||||
"test:quality:update": "node scripts/ci/check-test-quality.mjs --update",
|
||||
"test:acceptance:desktop": "npm run test:e2e --workspace=@d3ro/desktop",
|
||||
"test:acceptance:web": "npm run test:e2e --workspace=@d3ro/web -- smoke.spec.ts",
|
||||
"lint": "eslint apps/desktop apps/web apps/admin packages --ext .ts,.tsx --max-warnings=0",
|
||||
|
|
@ -66,7 +71,7 @@
|
|||
"typecheck:mobile": "npm --prefix apps/mobile-rn run typecheck",
|
||||
"lint:mobile": "npm --prefix apps/mobile-rn run lint",
|
||||
"test:mobile": "npm --prefix apps/mobile-rn run test:ci",
|
||||
"verify:all": "npm run test:hygiene && npm run typecheck && npm run typecheck:mobile && npm run lint && npm run lint:mobile && npm run test && npm run test:mobile && npm run check:design"
|
||||
"verify:all": "npm run test:hygiene && npm run check:protected-tests && npm run test:quality && npm run typecheck && npm run typecheck:mobile && npm run lint && npm run lint:mobile && npm run test && npm run test:mobile && npm run check:design"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
||||
|
|
|
|||
271
scripts/ci/check-protected-tests.mjs
Normal file
271
scripts/ci/check-protected-tests.mjs
Normal file
|
|
@ -0,0 +1,271 @@
|
|||
#!/usr/bin/env node
|
||||
// scripts/ci/check-protected-tests.mjs
|
||||
// TDD 2.0 Phase 1 — 보호 수용 경로(protected acceptance) 무결성 게이트.
|
||||
//
|
||||
// 정책 정본: docs/tdd-red/06-repo-application.md §5 · docs/tdd-red/07-revamp-plan.md §3-1
|
||||
// 목적: "읽지 못하게"가 아니라 "고치지 못하게"(05 §2). 보호 여정의 테스트가
|
||||
// 조용히 약화·삭제·skip 되는 것을 커밋 단계에서 막는다.
|
||||
//
|
||||
// 규칙 (protected 파일이 변경된 경우):
|
||||
// protected-deleted 보호 파일이 사라졌다
|
||||
// cases-decreased it/test/expectNoRuntimeErrors 기반 여정 블록이 줄었다
|
||||
// assertions-decreased expect(...) 가 줄었다
|
||||
// focused-only-added .only 가 새로 생겼다 (다른 여정을 건너뛴다)
|
||||
// unmarked-skip-added 이유 없는 .skip()/.todo() 가 새로 생겼다
|
||||
//
|
||||
// 정당한 변경(제품 행위 변경): 커밋 본문에 `allow-protected-change: <사유>` 를 남기거나
|
||||
// PROTECTED_CHANGE_REASON="<사유>" 로 실행한다. 사람 리뷰를 대체하지 않는다.
|
||||
//
|
||||
// 사용:
|
||||
// node scripts/ci/check-protected-tests.mjs # HEAD 대비 작업 트리
|
||||
// node scripts/ci/check-protected-tests.mjs --base origin/main
|
||||
// node scripts/ci/check-protected-tests.mjs --reason "..." # 정당한 스펙 변경
|
||||
// node scripts/ci/check-protected-tests.mjs --self-test
|
||||
|
||||
import { execFileSync } from 'node:child_process'
|
||||
import { existsSync, readFileSync } from 'node:fs'
|
||||
import { join } from 'node:path'
|
||||
|
||||
const CWD = process.cwd()
|
||||
|
||||
/** 보호 경로 — docs/tdd-red/06-repo-application.md §5 와 반드시 같아야 한다. */
|
||||
export const PROTECTED_FILES = [
|
||||
'apps/desktop/tests/e2e/navigation.spec.ts',
|
||||
'apps/desktop/tests/e2e/settings.spec.ts',
|
||||
'apps/desktop/tests/e2e/onboarding.spec.ts',
|
||||
'apps/desktop/tests/e2e/customer-support.spec.ts',
|
||||
'apps/desktop/tests/e2e/records.spec.ts',
|
||||
'apps/web/e2e/smoke.spec.ts',
|
||||
]
|
||||
|
||||
const TEST_BLOCK = /(?:^|\n)\s*test(?:\.(?:only|skip|todo|concurrent|each(?:\([^\n]*?\))?))?\s*\(/g
|
||||
const STEP_BLOCK = /test\.step\s*\(/g
|
||||
const ASSERTION = /\bexpect(?:NoRuntimeErrors)?\s*\(/g
|
||||
const ONLY = /\.only\s*\(/g
|
||||
// 보호 경로에서는 skip/todo 자체가 계약 변경이다 — 사유는 커밋 마커로 남긴다.
|
||||
const SKIP_ANY = /\.(?:skip|todo)\s*\(/g
|
||||
|
||||
function count(text, re) {
|
||||
re.lastIndex = 0
|
||||
let n = 0
|
||||
while (re.exec(text)) n += 1
|
||||
return n
|
||||
}
|
||||
|
||||
/** 보호 파일 본문 비교 — 순수 함수(테스트 가능). */
|
||||
export function detectWeakening(before, after) {
|
||||
const violations = []
|
||||
const beforeCases = count(before, TEST_BLOCK) + count(before, STEP_BLOCK)
|
||||
const afterCases = count(after, TEST_BLOCK) + count(after, STEP_BLOCK)
|
||||
if (afterCases < beforeCases) {
|
||||
violations.push({
|
||||
rule: 'cases-decreased',
|
||||
detail: `여정/스텝 블록 ${beforeCases} → ${afterCases}`,
|
||||
})
|
||||
}
|
||||
const beforeAssertions = count(before, ASSERTION)
|
||||
const afterAssertions = count(after, ASSERTION)
|
||||
if (afterAssertions < beforeAssertions) {
|
||||
violations.push({
|
||||
rule: 'assertions-decreased',
|
||||
detail: `단정 ${beforeAssertions} → ${afterAssertions}`,
|
||||
})
|
||||
}
|
||||
const onlyDelta = count(after, ONLY) - count(before, ONLY)
|
||||
if (onlyDelta > 0) {
|
||||
violations.push({ rule: 'focused-only-added', detail: `.only +${onlyDelta}` })
|
||||
}
|
||||
const skipDelta = count(after, SKIP_ANY) - count(before, SKIP_ANY)
|
||||
if (skipDelta > 0) {
|
||||
violations.push({ rule: 'unmarked-skip-added', detail: `skip/todo +${skipDelta}` })
|
||||
}
|
||||
return violations
|
||||
}
|
||||
|
||||
function git(args, options = {}) {
|
||||
return execFileSync('git', args, {
|
||||
cwd: CWD,
|
||||
encoding: 'utf8',
|
||||
maxBuffer: 1 << 26,
|
||||
// stderr 는 호출부가 처리한다(얕은 클론 등) — 콘솔을 더럽히지 않는다.
|
||||
stdio: ['ignore', 'pipe', 'ignore'],
|
||||
...options,
|
||||
})
|
||||
}
|
||||
|
||||
function changedFiles(base) {
|
||||
const tracked = git(['diff', '--name-only', base]).split('\n')
|
||||
const staged = git(['diff', '--name-only', '--cached', base]).split('\n')
|
||||
const untracked = git(['ls-files', '--others', '--exclude-standard']).split('\n')
|
||||
return [...new Set([...tracked, ...staged, ...untracked].map((l) => l.trim().replaceAll('\\', '/')).filter(Boolean))]
|
||||
}
|
||||
|
||||
function headBlob(base, path) {
|
||||
try {
|
||||
return git(['show', `${base}:${path}`])
|
||||
} catch {
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
function readWorking(path) {
|
||||
const full = join(CWD, path)
|
||||
return existsSync(full) ? readFileSync(full, 'utf8') : null
|
||||
}
|
||||
|
||||
function commitReason() {
|
||||
try {
|
||||
const body = git(['log', '-1', '--format=%B'])
|
||||
const match = /allow-protected-change:\s*(\S.*)/.exec(body)
|
||||
return match ? match[1].trim() : null
|
||||
} catch {
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
export function evaluate({ base, protectedFiles = PROTECTED_FILES, changed, beforeOf, afterOf }) {
|
||||
const violations = []
|
||||
for (const path of protectedFiles) {
|
||||
if (!changed.includes(path)) continue
|
||||
const before = beforeOf(path)
|
||||
const after = afterOf(path)
|
||||
if (after === null) {
|
||||
violations.push({ path, rule: 'protected-deleted', detail: '보호 파일이 삭제됐다' })
|
||||
continue
|
||||
}
|
||||
if (before === null) continue // 새 보호 여정 추가 — 약화가 아니다
|
||||
for (const v of detectWeakening(before, after)) violations.push({ path, ...v })
|
||||
}
|
||||
return { base, violations }
|
||||
}
|
||||
|
||||
function runSelfTest() {
|
||||
const cases = [
|
||||
{
|
||||
name: '테스트 하나 삭제 → cases-decreased',
|
||||
before: "test('a', async () => { expect(1).toBe(1) })\ntest('b', async () => { expect(2).toBe(2) })",
|
||||
after: "test('a', async () => { expect(1).toBe(1) })",
|
||||
expectRules: ['cases-decreased', 'assertions-decreased'],
|
||||
},
|
||||
{
|
||||
name: '단정 하나 약화/삭제 → assertions-decreased',
|
||||
before: "test('a', async () => { await expect(x).toBeVisible(); expect(y).toBe(1) })",
|
||||
after: "test('a', async () => { await expect(x).toBeVisible() })",
|
||||
expectRules: ['assertions-decreased'],
|
||||
},
|
||||
{
|
||||
name: '.only 추가 → focused-only-added',
|
||||
before: "test('a', async () => { expect(1).toBe(1) })",
|
||||
after: "test.only('a', async () => { expect(1).toBe(1) })",
|
||||
expectRules: ['focused-only-added'],
|
||||
},
|
||||
{
|
||||
name: '이유 없는 skip 추가 → unmarked-skip-added',
|
||||
before: "test('a', async () => { expect(1).toBe(1) })",
|
||||
after: "test.skip('a', async () => { expect(1).toBe(1) })",
|
||||
expectRules: ['unmarked-skip-added'],
|
||||
},
|
||||
{
|
||||
name: '여정·스텝·단정 추가 → 위반 없음',
|
||||
before: "test('a', async () => { expect(1).toBe(1) })",
|
||||
after:
|
||||
"test('a', async () => { await test.step('s', async () => { await expect(nav).toHaveCount(1) })\n expect(2).toBe(2) })",
|
||||
expectRules: [],
|
||||
},
|
||||
]
|
||||
|
||||
let failures = 0
|
||||
for (const c of cases) {
|
||||
const rules = detectWeakening(c.before, c.after).map((v) => v.rule).sort()
|
||||
const ok = JSON.stringify(rules) === JSON.stringify([...c.expectRules].sort())
|
||||
if (!ok) {
|
||||
failures += 1
|
||||
process.stdout.write(`FAIL ${c.name} — got ${JSON.stringify(rules)}\n`)
|
||||
} else {
|
||||
process.stdout.write(`ok ${c.name}\n`)
|
||||
}
|
||||
}
|
||||
|
||||
// evaluate() 자체 경로도 확인한다 (파일 삭제 + 변경 없음).
|
||||
const deleted = evaluate({
|
||||
base: 'test',
|
||||
protectedFiles: PROTECTED_FILES.slice(0, 1),
|
||||
changed: [PROTECTED_FILES[0]],
|
||||
beforeOf: () => "test('a', async () => { expect(1).toBe(1) })",
|
||||
afterOf: () => null,
|
||||
})
|
||||
if (deleted.violations[0]?.rule !== 'protected-deleted') {
|
||||
failures += 1
|
||||
process.stdout.write('FAIL 보호 파일 삭제 감지\n')
|
||||
} else {
|
||||
process.stdout.write('ok 보호 파일 삭제 감지\n')
|
||||
}
|
||||
|
||||
if (failures > 0) {
|
||||
process.stdout.write(`\ncheck-protected-tests self-test 실패 ${failures}건\n`)
|
||||
process.exit(1)
|
||||
}
|
||||
process.stdout.write('\ncheck-protected-tests self-test 통과\n')
|
||||
}
|
||||
|
||||
function main() {
|
||||
const argv = process.argv.slice(2)
|
||||
if (argv.includes('--self-test')) {
|
||||
runSelfTest()
|
||||
return
|
||||
}
|
||||
|
||||
const baseIndex = argv.indexOf('--base')
|
||||
const base = baseIndex >= 0 ? argv[baseIndex + 1] : 'HEAD'
|
||||
const reasonIndex = argv.indexOf('--reason')
|
||||
const reason = reasonIndex >= 0 ? argv[reasonIndex + 1] : process.env.PROTECTED_CHANGE_REASON || commitReason()
|
||||
|
||||
const missing = PROTECTED_FILES.filter((path) => !existsSync(join(CWD, path)))
|
||||
let changed
|
||||
try {
|
||||
changed = changedFiles(base)
|
||||
} catch {
|
||||
// CI 얕은 클론(depth 1)에서는 비교 기준 revision 이 없다. 게이트를 통과시키고 사실을 알린다.
|
||||
process.stdout.write(
|
||||
`[protected-tests] SKIP — 기준 revision \`${base}\` 을 찾을 수 없습니다(얕은 클론). ` +
|
||||
'로컬/전체 클론에서 검사하세요.\n',
|
||||
)
|
||||
return
|
||||
}
|
||||
const { violations } = evaluate({
|
||||
base,
|
||||
changed,
|
||||
beforeOf: (path) => headBlob(base, path),
|
||||
afterOf: (path) => readWorking(path),
|
||||
})
|
||||
|
||||
if (missing.length > 0) {
|
||||
for (const path of missing) {
|
||||
violations.push({ path, rule: 'protected-deleted', detail: '보호 파일이 저장소에 없다' })
|
||||
}
|
||||
}
|
||||
|
||||
if (violations.length === 0) {
|
||||
process.stdout.write(`[protected-tests] GREEN (base ${base}, 변경된 보호 파일 ${changed.filter((f) => PROTECTED_FILES.includes(f)).length}개)\n`)
|
||||
return
|
||||
}
|
||||
|
||||
if (reason) {
|
||||
process.stdout.write(`[protected-tests] 사유가 기록된 변경 — 통과: ${reason}\n`)
|
||||
for (const v of violations) process.stdout.write(` · ${v.path} ${v.rule} (${v.detail})\n`)
|
||||
return
|
||||
}
|
||||
|
||||
process.stdout.write('[protected-tests] 보호 수용 테스트가 약화되었습니다.\n')
|
||||
for (const v of violations) process.stdout.write(` ✗ ${v.path} · ${v.rule} — ${v.detail}\n`)
|
||||
process.stdout.write(
|
||||
'\n제품 행위가 정말 바뀌었다면 커밋 본문에 다음을 남기세요:\n' +
|
||||
' allow-protected-change: <왜 사용자가 하는 일이 바뀌었는가>\n' +
|
||||
'정책: docs/tdd-red/06-repo-application.md §5\n',
|
||||
)
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
if (process.argv[1] && process.argv[1].replaceAll('\\', '/').endsWith('check-protected-tests.mjs')) {
|
||||
main()
|
||||
}
|
||||
181
scripts/ci/check-test-quality.mjs
Normal file
181
scripts/ci/check-test-quality.mjs
Normal file
|
|
@ -0,0 +1,181 @@
|
|||
#!/usr/bin/env node
|
||||
// scripts/ci/check-test-quality.mjs
|
||||
// TDD 2.0 Phase 1 — 테스트 품질 래칫(ratchet) 게이트.
|
||||
//
|
||||
// 정책 정본: docs/tdd-red/02-meaningful-vs-meaningless-red.md (의미 없는 RED)
|
||||
// docs/tdd-red/07-revamp-plan.md §3-1 (약한 단정 · 결정성)
|
||||
//
|
||||
// 왜 래칫인가: 오늘 128건의 약한 단정과 203건의 ambient 시계/난수를 한 번에 고치면
|
||||
// 회귀 위험이 크다. 그래서 "현재 수치를 동결"하고 **증가만** 막는다.
|
||||
// (파일별 기준선 = scripts/ci/test-quality-baseline.json, --update 로만 갱신)
|
||||
//
|
||||
// 규칙:
|
||||
// weak-assertion expect(...).toBeDefined/toBeTruthy/toBeFalsy/toBeNull 만으로 끝나는 단정
|
||||
// → 관찰 가능한 값(문자열·개수·상태)을 단정하라
|
||||
// ambient-time 테스트 안에서 Date.now()/Math.random()/performance.now() 직접 호출
|
||||
// → 주입된 clock/rand 또는 vi.setSystemTime/vi.useFakeTimers 를 쓰라
|
||||
//
|
||||
// 사용:
|
||||
// node scripts/ci/check-test-quality.mjs # 기준선 대비 증가 시 실패
|
||||
// node scripts/ci/check-test-quality.mjs --update # 기준선 재생성(리뷰 필수)
|
||||
// node scripts/ci/check-test-quality.mjs --self-test
|
||||
|
||||
import { existsSync, readFileSync, writeFileSync } from 'node:fs'
|
||||
import { join } from 'node:path'
|
||||
import { scanQuality } from './lib/test-files.mjs'
|
||||
|
||||
const CWD = process.cwd()
|
||||
const BASELINE_PATH = 'scripts/ci/test-quality-baseline.json'
|
||||
|
||||
const RULES = [
|
||||
{
|
||||
key: 'weak-assertion',
|
||||
field: 'weak',
|
||||
hint: 'toBeDefined/toBeTruthy/toBeNull 대신 관찰 결과(값·개수·상태)를 단정하세요.',
|
||||
},
|
||||
{
|
||||
key: 'ambient-time',
|
||||
field: 'ambient',
|
||||
hint: '시간·난수는 주입하세요 (clock/rand 포트, vi.setSystemTime, vi.useFakeTimers).',
|
||||
},
|
||||
]
|
||||
|
||||
export function compareToBaseline(rows, baseline) {
|
||||
const violations = []
|
||||
for (const rule of RULES) {
|
||||
const frozen = baseline.rules?.[rule.key] ?? {}
|
||||
for (const row of rows) {
|
||||
const current = row[rule.field]
|
||||
const allowed = frozen[row.path] ?? 0
|
||||
if (current > allowed) {
|
||||
violations.push({ rule: rule.key, path: row.path, current, allowed })
|
||||
}
|
||||
}
|
||||
}
|
||||
return violations.sort((a, b) => b.current - b.allowed - (a.current - a.allowed))
|
||||
}
|
||||
|
||||
export function buildBaseline(rows, date) {
|
||||
const rules = {}
|
||||
for (const rule of RULES) {
|
||||
const frozen = {}
|
||||
for (const row of rows) {
|
||||
if (row[rule.field] > 0) frozen[row.path] = row[rule.field]
|
||||
}
|
||||
rules[rule.key] = frozen
|
||||
}
|
||||
return { generatedAt: date, note: 'TDD 2.0 래칫 기준선 — 증가만 막는다. --update 로만 갱신.', rules }
|
||||
}
|
||||
|
||||
function loadBaseline() {
|
||||
const full = join(CWD, BASELINE_PATH)
|
||||
if (!existsSync(full)) return { generatedAt: null, rules: {} }
|
||||
return JSON.parse(readFileSync(full, 'utf8'))
|
||||
}
|
||||
|
||||
function runSelfTest() {
|
||||
const baseline = {
|
||||
generatedAt: 'test',
|
||||
rules: { 'weak-assertion': { 'a.test.ts': 2 }, 'ambient-time': { 'b.test.ts': 1 } },
|
||||
}
|
||||
const fixtures = [
|
||||
{
|
||||
name: '기준선과 같으면 통과',
|
||||
rows: [
|
||||
{ path: 'a.test.ts', weak: 2, ambient: 0 },
|
||||
{ path: 'b.test.ts', weak: 0, ambient: 1 },
|
||||
],
|
||||
expected: 0,
|
||||
},
|
||||
{
|
||||
name: '약한 단정 증가 → 위반',
|
||||
rows: [{ path: 'a.test.ts', weak: 3, ambient: 0 }],
|
||||
expected: 1,
|
||||
},
|
||||
{
|
||||
name: '줄었으면 통과 (래칫은 증가만 막는다)',
|
||||
rows: [{ path: 'a.test.ts', weak: 1, ambient: 0 }],
|
||||
expected: 0,
|
||||
},
|
||||
{
|
||||
name: '기준선에 없는 파일에서 새 약한 단정 → 위반',
|
||||
rows: [{ path: 'c.test.ts', weak: 1, ambient: 0 }],
|
||||
expected: 1,
|
||||
},
|
||||
{
|
||||
name: 'ambient 증가 → 위반',
|
||||
rows: [{ path: 'b.test.ts', weak: 0, ambient: 2 }],
|
||||
expected: 1,
|
||||
},
|
||||
]
|
||||
|
||||
let failures = 0
|
||||
for (const fixture of fixtures) {
|
||||
const got = compareToBaseline(fixture.rows, baseline).length
|
||||
if (got !== fixture.expected) {
|
||||
failures += 1
|
||||
process.stdout.write(`FAIL ${fixture.name} — 기대 ${fixture.expected}, 실제 ${got}\n`)
|
||||
} else {
|
||||
process.stdout.write(`ok ${fixture.name}\n`)
|
||||
}
|
||||
}
|
||||
|
||||
const rebuilt = buildBaseline([{ path: 'a.test.ts', weak: 2, ambient: 0 }], 'test')
|
||||
if (rebuilt.rules['weak-assertion']['a.test.ts'] !== 2 || rebuilt.rules['ambient-time']['a.test.ts']) {
|
||||
failures += 1
|
||||
process.stdout.write('FAIL 기준선 생성 규칙\n')
|
||||
} else {
|
||||
process.stdout.write('ok 기준선 생성 규칙\n')
|
||||
}
|
||||
|
||||
if (failures > 0) {
|
||||
process.stdout.write(`\ncheck-test-quality self-test 실패 ${failures}건\n`)
|
||||
process.exit(1)
|
||||
}
|
||||
process.stdout.write('\ncheck-test-quality self-test 통과\n')
|
||||
}
|
||||
|
||||
function main() {
|
||||
const args = new Set(process.argv.slice(2))
|
||||
if (args.has('--self-test')) {
|
||||
runSelfTest()
|
||||
return
|
||||
}
|
||||
|
||||
const rows = scanQuality(CWD)
|
||||
const today = new Date().toISOString().slice(0, 10)
|
||||
|
||||
if (args.has('--update')) {
|
||||
const baseline = buildBaseline(rows, today)
|
||||
writeFileSync(join(CWD, BASELINE_PATH), JSON.stringify(baseline, null, 2) + '\n', 'utf8')
|
||||
const weak = Object.values(baseline.rules['weak-assertion']).reduce((a, b) => a + b, 0)
|
||||
const ambient = Object.values(baseline.rules['ambient-time']).reduce((a, b) => a + b, 0)
|
||||
process.stdout.write(`[test-quality] 기준선 갱신: ${BASELINE_PATH} (weak ${weak} / ambient ${ambient})\n`)
|
||||
return
|
||||
}
|
||||
|
||||
const violations = compareToBaseline(rows, loadBaseline())
|
||||
if (violations.length === 0) {
|
||||
process.stdout.write(`[test-quality] GREEN (${rows.length} test files, 기준선 대비 증가 없음)\n`)
|
||||
return
|
||||
}
|
||||
|
||||
const byRule = new Map()
|
||||
for (const v of violations) byRule.set(v.rule, (byRule.get(v.rule) ?? 0) + 1)
|
||||
process.stdout.write('[test-quality] 테스트 품질이 기준선보다 나빠졌습니다.\n')
|
||||
for (const v of violations.slice(0, 20)) {
|
||||
process.stdout.write(` ✗ ${v.path} · ${v.rule} ${v.allowed} → ${v.current}\n`)
|
||||
}
|
||||
if (violations.length > 20) process.stdout.write(` … 외 ${violations.length - 20}건\n`)
|
||||
for (const rule of RULES) {
|
||||
if (byRule.has(rule.key)) process.stdout.write(`\n${rule.key}: ${rule.hint}\n`)
|
||||
}
|
||||
process.stdout.write(
|
||||
'\n정당한 사유(예: 기존 테스트를 캐릭터라이제이션으로 교체)가 있으면 사람 리뷰 후\n' +
|
||||
' npm run test:quality:update\n' +
|
||||
'로 기준선을 갱신하고 커밋 본문에 이유를 적으세요.\n',
|
||||
)
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
main()
|
||||
138
scripts/ci/test-quality-baseline.json
Normal file
138
scripts/ci/test-quality-baseline.json
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
{
|
||||
"generatedAt": "2026-11-08",
|
||||
"note": "TDD 2.0 래칫 기준선 — 증가만 막는다. --update 로만 갱신.",
|
||||
"rules": {
|
||||
"weak-assertion": {
|
||||
"apps/desktop/tests/integration/cross-device-sync.supabase.test.ts": 1,
|
||||
"apps/desktop/tests/integration/meeting-import-media.test.ts": 1,
|
||||
"apps/desktop/tests/main/services/CustomInstructionService.test.ts": 3,
|
||||
"apps/desktop/tests/main/services/DictionaryService.test.ts": 2,
|
||||
"apps/desktop/tests/main/services/HistoryService.test.ts": 2,
|
||||
"apps/desktop/tests/main/services/KeyBindingService.test.ts": 2,
|
||||
"apps/desktop/tests/main/services/SuggestionService.test.ts": 1,
|
||||
"apps/desktop/tests/main/services/TypoCorrectionService.test.ts": 1,
|
||||
"apps/desktop/tests/main/services/VoiceModeService.test.ts": 1,
|
||||
"apps/desktop/tests/main/services/caption-owner-redteam-r1-3.test.ts": 1,
|
||||
"apps/desktop/tests/main/services/file-transcription-cancel-redteam-r2-1.test.ts": 1,
|
||||
"apps/desktop/tests/main/services/i18n-locale-parity.test.ts": 2,
|
||||
"apps/desktop/tests/main/services/input-intelligence.test.ts": 2,
|
||||
"apps/desktop/tests/main/services/input-telemetry-redteam-r1-1.test.ts": 1,
|
||||
"apps/desktop/tests/main/services/input-telemetry-stale-snapshot.test.ts": 8,
|
||||
"apps/desktop/tests/main/services/license-entitlement-r1-11.test.ts": 1,
|
||||
"apps/desktop/tests/main/services/runtime-install-release-redteam-r2-14.test.ts": 1,
|
||||
"apps/desktop/tests/main/services/screen-context-redteam-r1-3.test.ts": 2,
|
||||
"apps/desktop/tests/main/services/screen-context-redteam-r2-7.test.ts": 2,
|
||||
"apps/desktop/tests/main/services/update-service-status.test.ts": 1,
|
||||
"apps/desktop/tests/main/services/voice-mode-redteam-r1-3.test.ts": 2,
|
||||
"apps/desktop/tests/main/sync/cloud-credentials-redteam-r3-1.test.ts": 5,
|
||||
"apps/desktop/tests/main/sync/sync-redteam-r1-0.test.ts": 1,
|
||||
"apps/desktop/tests/main/update-policy.test.ts": 1,
|
||||
"apps/desktop/tests/main/windows/popup-navigation.test.ts": 1,
|
||||
"apps/desktop/tests/main/windows/recording-tip-error-menu-redteam-r3-4.test.ts": 1,
|
||||
"apps/desktop/tests/red/ads/admob-ssv.test.ts": 1,
|
||||
"apps/desktop/tests/red/ads/ads-mediation.test.ts": 4,
|
||||
"apps/desktop/tests/red/auth-login.usecase.test.ts": 2,
|
||||
"apps/desktop/tests/red/dictionary-redteam-r1-12.test.ts": 2,
|
||||
"apps/desktop/tests/red/history.usecase.test.ts": 5,
|
||||
"apps/desktop/tests/red/instruction.usecase.test.ts": 1,
|
||||
"apps/desktop/tests/red/ipc-surfaces.usecase.test.ts": 1,
|
||||
"apps/desktop/tests/red/meeting-import.usecase.test.ts": 1,
|
||||
"apps/desktop/tests/red/meeting-mode-redteam-r1-3.test.ts": 2,
|
||||
"apps/desktop/tests/red/meeting-recording-redteam-r2-1.test.ts": 2,
|
||||
"apps/desktop/tests/red/meeting.usecase.test.ts": 1,
|
||||
"apps/desktop/tests/red/silent-errors.usecase.test.ts": 1,
|
||||
"apps/desktop/tests/red/voice.usecase.test.ts": 2,
|
||||
"apps/desktop/tests/unit/AdMediationEngine.test.ts": 3,
|
||||
"apps/desktop/tests/unit/error-recovery-redteam-r3-21.test.ts": 2,
|
||||
"apps/desktop/tests/unit/keybinding-picker-capture-redteam-r3-23.test.ts": 1,
|
||||
"apps/desktop/tests/unit/meeting-transcript-view-redteam-r2-32.test.ts": 1,
|
||||
"apps/desktop/tests/unit/ollama-model-pull-redteam-r2-34.test.ts": 1,
|
||||
"apps/desktop/tests/unit/realtime-session-redteam-r1-30.test.ts": 2,
|
||||
"apps/desktop/tests/unit/stt-model-download-redteam-r3-24.test.ts": 6,
|
||||
"apps/mobile-rn/__tests__/auth-privacy-boundary.test.tsx": 9,
|
||||
"apps/mobile-rn/__tests__/auth-redteam-r3-16.test.tsx": 2,
|
||||
"apps/mobile-rn/__tests__/incoming-media-intent.test.ts": 1,
|
||||
"apps/mobile-rn/__tests__/meeting-creation-screen.test.tsx": 1,
|
||||
"apps/mobile-rn/__tests__/navigation-shell.test.tsx": 1,
|
||||
"apps/web/e2e/dashboard-dictionary-commands.spec.ts": 7,
|
||||
"apps/web/tests/billing-catalog.test.ts": 2,
|
||||
"packages/api-client/__tests__/client.test.ts": 2,
|
||||
"packages/api-client/__tests__/types.test.ts": 1,
|
||||
"packages/core/__tests__/keybinding.test.ts": 10,
|
||||
"packages/core/__tests__/terminal-prompt.test.ts": 1,
|
||||
"packages/core/__tests__/typo-correction.test.ts": 3
|
||||
},
|
||||
"ambient-time": {
|
||||
"apps/desktop/tests/eval/suggestion-latency.eval.test.ts": 2,
|
||||
"apps/desktop/tests/eval/suggestion-replay.eval.test.ts": 4,
|
||||
"apps/desktop/tests/integration/cross-device-sync.supabase.test.ts": 10,
|
||||
"apps/desktop/tests/integration/meeting-import-media.test.ts": 1,
|
||||
"apps/desktop/tests/integration/suggestion-quality.ollama.test.ts": 2,
|
||||
"apps/desktop/tests/main/db-open-atomic-redteam-r2-1.test.ts": 2,
|
||||
"apps/desktop/tests/main/services/KeyBindingService.test.ts": 4,
|
||||
"apps/desktop/tests/main/services/SuggestionService.test.ts": 2,
|
||||
"apps/desktop/tests/main/services/TypoCorrectionService.test.ts": 4,
|
||||
"apps/desktop/tests/main/services/file-transcription-cancel-redteam-r2-1.test.ts": 1,
|
||||
"apps/desktop/tests/main/services/file-transcription-glossary.test.ts": 1,
|
||||
"apps/desktop/tests/main/services/file-transcription-redteam-r1-5.test.ts": 1,
|
||||
"apps/desktop/tests/main/services/file-transcription-repetition.test.ts": 1,
|
||||
"apps/desktop/tests/main/services/history-redteam-r1-0.test.ts": 2,
|
||||
"apps/desktop/tests/main/services/input-flow-services.test.ts": 6,
|
||||
"apps/desktop/tests/main/services/input-intelligence.test.ts": 1,
|
||||
"apps/desktop/tests/main/services/input-telemetry-focus-flicker.test.ts": 5,
|
||||
"apps/desktop/tests/main/services/input-telemetry-redteam-r1-1.test.ts": 1,
|
||||
"apps/desktop/tests/main/services/input-telemetry-stale-snapshot.test.ts": 4,
|
||||
"apps/desktop/tests/main/services/modifier-state.test.ts": 6,
|
||||
"apps/desktop/tests/main/services/personal-graph-context.test.ts": 1,
|
||||
"apps/desktop/tests/main/services/suggestion-accept-hold.test.ts": 2,
|
||||
"apps/desktop/tests/main/services/suggestion-accept-word.test.ts": 2,
|
||||
"apps/desktop/tests/main/services/suggestion-app-scoped-learning.test.ts": 2,
|
||||
"apps/desktop/tests/main/services/suggestion-copy-guard.test.ts": 2,
|
||||
"apps/desktop/tests/main/services/suggestion-instant-personal.test.ts": 2,
|
||||
"apps/desktop/tests/main/services/suggestion-no-suggestion-notice.test.ts": 2,
|
||||
"apps/desktop/tests/main/services/suggestion-presence.test.ts": 3,
|
||||
"apps/desktop/tests/main/services/suggestion-redteam-r1-1.test.ts": 11,
|
||||
"apps/desktop/tests/main/services/suggestion-redteam-r2-3.test.ts": 6,
|
||||
"apps/desktop/tests/main/services/suggestion-redteam-r3-1.test.ts": 6,
|
||||
"apps/desktop/tests/main/services/suggestion-typo-correction.test.ts": 2,
|
||||
"apps/desktop/tests/main/services/textinsert-redteam-r2-4.test.ts": 2,
|
||||
"apps/desktop/tests/main/services/voice-mode-redteam-r1-3.test.ts": 2,
|
||||
"apps/desktop/tests/main/services/voice-mode-redteam-r2-7.test.ts": 2,
|
||||
"apps/desktop/tests/main/services/voice-recording-store-redteam-r3-1.test.ts": 1,
|
||||
"apps/desktop/tests/main/sync/SyncEngine.test.ts": 10,
|
||||
"apps/desktop/tests/main/sync/SyncExtensions.test.ts": 2,
|
||||
"apps/desktop/tests/main/sync/SyncTranscriptsPresets.test.ts": 3,
|
||||
"apps/desktop/tests/main/sync/audio-sync-redteam-r3-1.test.ts": 1,
|
||||
"apps/desktop/tests/main/sync/meeting-recording-pull.test.ts": 1,
|
||||
"apps/desktop/tests/main/sync/sync-redteam-r1-0.test.ts": 3,
|
||||
"apps/desktop/tests/red/ads/admob-ssv.test.ts": 3,
|
||||
"apps/desktop/tests/red/ads/ads-mediation.test.ts": 2,
|
||||
"apps/desktop/tests/red/chained.usecase.test.ts": 2,
|
||||
"apps/desktop/tests/red/crypto-license.usecase.test.ts": 8,
|
||||
"apps/desktop/tests/red/data-policy-redteam-r2-1.test.ts": 1,
|
||||
"apps/desktop/tests/red/meeting-import.usecase.test.ts": 1,
|
||||
"apps/desktop/tests/red/meeting-llm.usecase.test.ts": 1,
|
||||
"apps/desktop/tests/red/meeting-mode-redteam-r1-3.test.ts": 3,
|
||||
"apps/desktop/tests/red/meeting-recording-redteam-r2-1.test.ts": 6,
|
||||
"apps/desktop/tests/red/meeting.usecase.test.ts": 1,
|
||||
"apps/desktop/tests/red/rag.usecase.test.ts": 1,
|
||||
"apps/desktop/tests/red/templates-wiring-redteam-r2-15.test.ts": 1,
|
||||
"apps/desktop/tests/red/voice.usecase.test.ts": 2,
|
||||
"apps/desktop/tests/shared/entitlement.test.ts": 1,
|
||||
"apps/desktop/tests/unit/desktop-ux-gaps.test.ts": 3,
|
||||
"apps/mobile-rn/__tests__/admin-mobile.local.e2e.mjs": 5,
|
||||
"apps/mobile-rn/__tests__/data-portability.local.integration.mjs": 2,
|
||||
"apps/mobile-rn/__tests__/incoming-media-intent.test.ts": 4,
|
||||
"apps/mobile-rn/__tests__/knowledge-actions.local.integration.mjs": 2,
|
||||
"apps/mobile-rn/__tests__/talk.local.integration.mjs": 2,
|
||||
"apps/mobile-rn/__tests__/teams-push.local.integration.mjs": 3,
|
||||
"apps/mobile-rn/__tests__/templates-memos.local.integration.mjs": 6,
|
||||
"apps/web/e2e/billing.spec.ts": 3,
|
||||
"apps/web/e2e/dashboard-dictionary-commands.spec.ts": 1,
|
||||
"apps/web/e2e/history.spec.ts": 1,
|
||||
"packages/core/__tests__/personal-graph.test.ts": 1,
|
||||
"packages/core/__tests__/transcript-correction-hardening.test.ts": 2,
|
||||
"server/supabase/functions/_shared/admob-ssv.test.ts": 7
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue