Entity-level orientation: each subproject owns its pyramid; the entity owns the seams. Normative strategy: entity spec §11.
| Where | What | Command |
|---|---|---|
| service | 99 unit tests (matching, search, validation, privacy, models) | cargo test --lib |
| service | 7 API integration tests (needs PostgreSQL) | cargo test --test api_integration_test |
| service | 3 Criterion benchmark suites | cargo bench |
| matcher | unit + integration + doctests; clippy -D warnings gate |
cargo test |
| front-end | 8 Vitest unit tests (mocked fetch) | pnpm test |
| front-end | 6 Playwright smoke tests (no live service) | pnpm test:e2e |
Guides:
service AGENTS/testing.md ·
matcher AGENTS/testing.md ·
front-end spec §11.
Service↔matcher (exists):
tests/duplicate_detection.rs
— 13 black-box tests pinning both the adapter's field routing and the
matcher's scoring.
cd worker-service-with-loco
cargo test --test duplicate_detectionAdd a bridge test whenever the adapter gains a routing rule, the matcher exposes a new component the service surfaces, or a contract regression escapes the unit layers.
Front-end↔service (gap): no automated full-trio test yet — tracked as entity spec §13 T-3.
- A contract change (adapter routing, envelope, endpoint shape) is not done until the owning crate's suite and the seam suite pass, and entity spec §5/§9 match (entity §11.4).
- Matcher tests use synthetic fixtures only — no real PII, ever
(matcher
AGENTS.mdgolden rule 7). - Don't pin
NicknameTable::english()contents in tests; construct your ownwith_classtables. - Front-end e2e suites must keep passing with the API down (degraded shell render is itself a requirement, entity NFR-14).