Files
codebase-memory-mcp/scripts
Andrew Hundt af021ad8ca feat(benchmarks): report semantic pair quality and freshness policy
Previously, generated summaries treated semantic pair lifecycles as ordinary capability misses: expected deferred views and explicit capability-off controls could look like failures, pair F1 was absent or conflated with retrieval MRR, lifecycle query calls were double counted, dependency phases after mutation were omitted, and a stale fast delta could be shown as a matched-quality speedup.

Render TP/TN/FP/FN and Pair F1 for initial, post-edit, and fresh stages with relationship, task SHA, background commit/tree, freshness policy, and policy conformance. Classify a warned default deferred view as PASS: DEFERRED FRESHNESS while keeping immediate freshness visibly absent. Label individually disabled similarity/semantic controls as expected capability-off contrasts, not successful freshness deferrals. Read lifecycle indexing, dependency, response-size/latency, mutation, canonical, execution-order, and resource fields without duplicating the initial query observation.

Only calculate fresh/incremental speedup when semantic freshness is immediately matched; deferred rows retain raw latency and fresh rebuild cost but report speedup as n/a. Keep retrieval MRR separate from pair classification and explain that canonical comparison uses a matching index mode.

Verification: uv run python -m unittest tests.test_summarize_benchmark_results tests.test_benchmark_campaign tests.test_benchmark_incremental_speed (110 passed); Ruff checks; git diff --check. Retained large and six-cell MCP reports show Pair F1 and confusion witnesses, three query observations, dependency phases, expected deferred warnings, eager canonical equality, explicit disabled controls below target, and no unmatched-quality speedup claim.
Signed-off-by: Andrew Hundt <ATHundt@gmail.com>
2026-07-16 15:41:37 -04:00
..