calibration: count same-day closes honestly (#34) #54

Merged
christian merged 2 commits from feat/calibration-honesty into main 2026-07-09 19:23:59 +00:00
Owner

Closes the honesty gap in #34: the cold-start surface counted only usable closes and hid the ones that structurally can't calibrate.

The dishonesty

calibrationSamples silently drops closed+estimated issues that closed in 0 working days (same-day closes). The UI then showed N/20 closed issues estimated, reading as "just (20−N) closes away". On this repo that hid 10 of 24 closes: the note said 14/20 as if 6 away, when a third of the history will never count toward the fit.

Fix

  • core: calibrationCoverage(issues, timelines, asOf){ candidates, usable, excludedSameDay }, counting the silently-excluded same-day closes. Pure, tested.
  • surface: CalibrationData gains excludedSameDay; backlogCalibration returns the coverage; the Runway note and the Calibration screen now append "… · N same-day closes can't calibrate" — the thin sample is explained, not just reported.

Verification

Ran calibrationCoverage against christian/commitea: closed=24, usable=14, excludedSameDay=10 — so the note now honestly reads "14/20 closed issues estimated · 10 same-day closes can't calibrate."
131 core tests green (incl. new coverage test); core + desktop typecheck clean; 14 fixture e2e green. Appends preserve the existing live-runway assertion substring.

Base

Off main; touches app-shell.tsx (calibration prop) — small rebase expected against #52, which also edits that region.

🤖 Generated with Claude Code

Closes the honesty gap in **#34**: the cold-start surface counted only *usable* closes and hid the ones that structurally can't calibrate. ## The dishonesty `calibrationSamples` silently drops closed+estimated issues that closed in **0 working days** (same-day closes). The UI then showed `N/20 closed issues estimated`, reading as "just (20−N) closes away". On this repo that hid **10 of 24** closes: the note said `14/20` as if 6 away, when a third of the history will *never* count toward the fit. ## Fix - **core**: `calibrationCoverage(issues, timelines, asOf)` → `{ candidates, usable, excludedSameDay }`, counting the silently-excluded same-day closes. Pure, tested. - **surface**: `CalibrationData` gains `excludedSameDay`; `backlogCalibration` returns the coverage; the **Runway** note and the **Calibration** screen now append "… · N same-day closes can't calibrate" — the thin sample is *explained*, not just reported. ## Verification Ran `calibrationCoverage` against **christian/commitea**: `closed=24, usable=14, excludedSameDay=10` — so the note now honestly reads *"14/20 closed issues estimated · 10 same-day closes can't calibrate."* 131 core tests green (incl. new coverage test); core + desktop typecheck clean; 14 fixture e2e green. Appends preserve the existing live-runway assertion substring. ## Base Off `main`; touches `app-shell.tsx` (calibration prop) — small rebase expected against #52, which also edits that region. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
christian added 1 commit 2026-07-09 19:18:37 +00:00
The cold-start surface showed "N/20 closed issues estimated", implying you're
just (20−N) closes away. But calibrationSamples silently drops closed+estimated
issues that closed in 0 working days (same-day closes) — real closes that
structurally can't calibrate. On this repo that's 10 of 24 closes hidden: the
note read 14/20 as if 6 away, when a third of the history will never count.

- core: `calibrationCoverage(issues, timelines, asOf)` → { candidates, usable,
  excludedSameDay }, counting the silently-excluded same-day closes. Pure, tested.
- surface it: CalibrationData gains `excludedSameDay`; backlogCalibration returns
  the coverage; the Runway note and the Calibration screen now say "… · N same-day
  closes can't calibrate" so the thin sample is explained, not just reported.

Verified on christian/commitea: closed=24, usable=14, excludedSameDay=10.
131 core green (incl. new coverage test); core + desktop typecheck; 14 fixture e2e.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
christian added 1 commit 2026-07-09 19:23:56 +00:00
christian merged commit 2a6413821a into main 2026-07-09 19:23:59 +00:00
Sign in to join this conversation.
No description provided.