|
1 | 1 | # Graph-estimated CRAP score — plan |
2 | 2 |
|
3 | | -> **Status:** open · **Priority:** P2 · **Effort:** M (~2 weeks) |
| 3 | +> **Status:** shipped (PR #C) · **Priority:** P2 · **Effort:** M (~2 weeks) |
4 | 4 | > |
5 | 5 | > **Motivator:** CRAP ranks **complex and undertested** functions. Codemap has `symbols.complexity` + ingested `coverage`, but `high-complexity-untested` is **misleading without ingest** (`COALESCE(coverage_pct, 0)` treats missing as 0%). Graph-estimated tiers (85/40/0%) from test reachability when measured coverage is absent. |
6 | 6 | > |
@@ -42,7 +42,7 @@ recipe high-crap-score (SQL only) |
42 | 42 | | 40% | 4 | `deeplyNested`, `relay`, … — `complexity-fixture.ts` reachable from test | |
43 | 43 | | 0% | 39 | `createClient`, `get`, … — not dependency-reachable from tests | |
44 | 44 |
|
45 | | -Reachability walk: `test_suites` + `*.test.*` / `*.spec.*` globs → recursive `dependencies` fan-out (value edges only). |
| 45 | +Reachability walk: `test_suites` + `*.test.*` / `*.spec.*` globs → recursive `dependencies` fan-out (value edges only — type-only imports never enter `dependencies` at index time). |
46 | 46 |
|
47 | 47 | ### Tracer bullet (slice 2.1) |
48 | 48 |
|
@@ -126,11 +126,11 @@ bun test scripts/query-golden-coverage-matrix.test.mjs # after golden scenario |
126 | 126 |
|
127 | 127 | ## Open decisions (impl PR) |
128 | 128 |
|
129 | | -| # | Question | |
130 | | -| --- | ------------------------------------------------------------------------------------------------ | |
131 | | -| Q1 | Include type-only imports in reachability walk? (default: value edges only, mirror import graph) | |
132 | | -| Q2 | Recipe id: `high-crap-score` vs `crap-score`? | |
133 | | -| Q3 | Materialised column at index time vs recipe-only — measure CTE cost on self-index first. | |
| 129 | +| # | Question | Lock (wave 2026-06) | |
| 130 | +| --- | ------------------------------------------------------------------------------------------------ | ------------------------------------- | |
| 131 | +| Q1 | Include type-only imports in reachability walk? (default: value edges only, mirror import graph) | **Value edges** — `dependencies` only | |
| 132 | +| Q2 | Recipe id: `high-crap-score` vs `crap-score`? | **`high-crap-score`** | |
| 133 | +| Q3 | Materialised column at index time vs recipe-only — measure CTE cost on self-index first. | **Recipe-only** (defer v2) | |
134 | 134 |
|
135 | 135 | --- |
136 | 136 |
|
|
0 commit comments