Skip to content

Latest commit

 

History

History
45 lines (35 loc) · 2.65 KB

File metadata and controls

45 lines (35 loc) · 2.65 KB

TEST-NEEDS.md — flat-mate

CRG Grade: C — ACHIEVED 2026-04-04

Current Test State

Category Count Notes
Test files 5 All in packages/shared/src/matching/ (engine v2)
Unit tests 35 All passing (verified 2026-06-11)
App tests (api/web/mobile) 0 Apps are NOT wired to engine v2 and have no tests

What's Covered

Engine v2 library only (packages/shared/src/matching/):

  • Directional behaviour/tolerance scoring — weakest direction governs; drinking as interaction not distance; budget overlap-coefficient (containment scores 1, no-overlap scores 0 + warns) (compatibility.test.js)
  • Dealbreakers — symmetric firing, behaviour-not-tolerance targeting (v1 regression locked), structured attribution, uncheckable-rule warnings (compatibility.test.js)
  • Group audit — pairwise matrix catches the shipped broken "Bloomsbury Three" fixture; budget by INTERSECTION never mean; weakest pair named; group validation (group.test.js)
  • Dispersion detection — bimodal groups reported as SPLIT not averaged; shared-space forecast at the MINIMUM member standard, naming friction nodes (group.test.js)
  • Conceal tiers — effectiveTier lattice meet (symmetric, idempotent, never above either grant); T0 band leaks verdict only; T1 relational leaks no names/attribution/habit values; T2 unredacted (conceal.test.js)
  • Artifacts — universal agreement sections for every group, divergence sections from actual gaps, markdown rendering; brief budget intersection, HMO scaling, zero-stored-data guarantor/scam checklist (artifacts.test.js)
  • Missing-data policy — nulls score neutral WITH a warning, never favourably; corrupt enum values throw; weight sums asserted = 1 (compatibility.test.js)
  • Discovery boundary — structural group detection, solo-to-group scoring, not_viable filtering, tier redaction at the boundary (discovery.test.js)

Still Missing (for CRG B+)

  • apps/api integration tests (service is untested and not wired to engine v2)
  • apps/web tests — none exist
  • apps/mobile tests — none exist
  • Legacy packages/shared/src/domain.js (v0 swipe domain) tests — none; pending the v0 quarantine decision
  • Property-based tests (e.g. conceal-lattice monotonicity, scoring bounds)
  • CI fuzz placeholder

Run Tests

deno task test          # = deno test --allow-read packages/shared/src/matching/
deno task check         # typecheck + lint (engine, legacy domain, API)
deno task fmt:check     # format check (engine)