Repository navigation
feat(quota): feed the C4 prediction log into the forecast backtest - #16847
Conversation
…13258) The backtest script published the accuracy ledger without ever passing resetDurationPredictions, so the C4.2 reset-duration section was permanently unmeasured even though the scorer and 15 scoreable live predictions exist. Add a strict --predictions option (#3352 contract) that loads the prediction log's reset_duration records (malformed ones counted on stderr, corrupt JSON fails loudly) and feeds them to buildForecastAccuracyLedger. Oracle: the argv test's fixture outcome — a resetsAt transition bracketed by readings at 01:00/02:00 realizes at the 01:30 midpoint; the predicted range [01:00, 02:00] covers it, width 1h.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Lane 0952-C (bravo SUSTAIN LANDINGS) — merging after firsthand verification. Full diff read: adds |
|
Verification (fleet-command run 46280917243, this branch): 3 pass / 0 fail in |
Part of epic #13256 (C4 quota forecasting), slice #13258 (C4.2).
What was actually missing
Criterion 3's scorer has been in production since #15824, and scoreable prediction/outcome pairs have existed since 2026-11-28 — but no production path ever fed predictions to the scorer:
quota-forecast-backtest.ts(the script that publishes the accuracy ledger) andquota-weekly-review.tsboth callbuildForecastAccuracyLedgerwithoutresetDurationPredictions, so the ledger's C4.2 section permanently read "unmeasured". Verified live 2026-11-29: feeding the live prediction log to the merged scorer yields 15 scored facts.Change
scripts/quota-forecast-backtest.tsgains a strict--predictions <jsonl>option (argument contract #3352: declared, parsed before any file I/O, usage error exit 2). It loads the prediction log'sreset_durationrecords and passes them to the ledger builder. Loader honesty: other kinds are skipped (not this scorer's input), malformedreset_durationrecords are counted and named on stderr, and a non-JSON line fails the run loudly (corrupt log). Without the option, behavior is byte-for-byte the old behavior.Verification
test/quota-forecast-backtest-argv.test.ts: fixture store whose resetsAt transition (bracketed by readings at 01:00/02:00) realizes at the 01:30 midpoint; the predicted range [01:00, 02:00] must score covered with width exactly 3,600,000 ms, the no_basis record stays unscored, a malformed record is reported skipped, and a bare run stays unmeasured.15 scored reset-duration predictions. The published accuracy record (forecast-accuracy-ledger.json+forecast-accuracy-report.mdbeside the store) now carries the C4.2 baseline:_openai.alt / 5h / reset_cadence / c4-meth:4 — 15 scored / 10 unscored, coverage 100.0% (target ~80%), mean width 3683.6m. Full evidence on C4.2 — Reset-duration predictions as ranges in Drew's formats #13258.Issue disposition
With this merged, #13258's three acceptance criteria are all met (criteria 1–2 landed via #13352, #14487, #15824; criterion 3's first scored outcomes are published — evidence on the issue), so this PR carries the closing keyword deliberately: merging closes #13258.
Closes #13258
{ "direct_parent": null, "links": [], "lineage": { "design": null, "roadmap_item": null, "priority": null }, "pm_meta": 1, "provenance": { "queue_id": null, "scheduled_start": null, "picked_up_at": null, "work_started_at": null, "created_at": "2026-11-29T15:55:34Z", "session_id": null, "lane": null, "host": "htch-runtime", "worktree": "/home/hatch", "model": null, "lane_start_issues": [], "workspace_ref": { "kind": "worktree", "id": "/home/hatch", "repo": "developing-today/code", "branch": "main", "sha": "ac3f377b7f752f50918f491d7443b79e95b5dc34" }, "auth_subject": "felix", "stamped_by": "fleet 0.1.0 (native)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.