GeezerVison is showing github.com — C4.2 — Reset-duration predictions as ranges in Drew's formats · Issue #13258 · developing-today/code
C4.2 — Reset-duration predictions as ranges in Drew's formats #13258DescriptionComponent of #9572 (C4 quota forecasting), per its design record (doc/2026-11-13T15-12-00Z_design_reporting-architecture-event-driven/c4-forecasting-design.md).
Scope: per-pool reset-duration predictions (S2.13): how long a wall/downtime lasts until reset reopens the pool, expressed as a RANGE and rendered in Drew's formats — "between X and Y hours from now", "2.5 to 3.7 days", "2 days 4 hours to up to 3 days 16 hours", "likely runs out between tomorrow afternoon and Sunday 2 am" (natural-language windows in America/Chicago). Basis: observed reset cadence/interval history per pool from the snapshot store + the current window's resetsAt; each record names its basis (S2.14).
Acceptance:
- Prediction records of kind
reset_duration logged per walled/near-wall pool on gatherer ticks.
- Range rendering implements the design's format rules, including the natural-language window form.
- Scored on range coverage + width per the design; first scored outcomes published to the accuracy record.
Activitydeveloping-today commented on Nov 23, 2026 dezren39 commented on Nov 23, 2026 Lane WC (archer) claiming this item for one feature slice: premise + ownership checks passed (issue open, no live claim; the only comment is the queue task link). Working in a laptop worktree off main; one PR landing one acceptance-criterion slice with its test, per the feature-slice instructions. dezren39 commented on Nov 23, 2026 Lane WC — HOLD (platform execution-risk flag). While reading the laptop checkout of developing-today/code to scope this slice, a platform execution-risk check tripped on the checkout content. Per the standing hold rule I stopped immediately: nothing was modified, no worktree was created, no script/build/test was run inside the checkout, and I do not assess the flagged content's safety myself. Clearing this needs Drew's plain-words go-ahead for this specific item (#13258); the standing clone approval does not extend to flagged content.
Premise (verified by reads completed before the stop): TRUE. No reset_duration prediction records and no range rendering exist anywhere in the repo — the only mentions of reset-duration are the design statements (note.md C4; statement-inventory S2.13/S2.14). The neighbouring machinery is all in pm-stack/aggregator/src/: quota-forecast.ts (S1 forecast product + buildForecastLedgerRows, ledger source quota-forecast), quota-analytics.ts (projectWindow pace oracle), quota-forecast-accuracy.ts (S2 scoring/backtest; baselines ledger the weekly review reads), snapshot store records carry resetsAt per reading.
Prepared scope (one feature slice, ready to run on approval):
- New pure module
pm-stack/aggregator/src/quota-reset-duration.ts:
ResetDurationPrediction record: kind reset_duration, pool/window identity (canonical providerId + serviceId + window name, S1 keying), predicted reopen range [earliestMs, latestMs], the duration range, and a named basis (S2.14: e.g. current-window-resetsAt / observed-reset-cadence from consecutive snapshot resetsAt deltas for the pool/window, rename-joined via S1's forecastSeriesKey).
- Range construction: for a walled window, the reopen instant is the current window's
resetsAt; the range widens it by the observed reset-jitter spread (min/max deviation of realized resets from previously read resetsAt in the snapshot history). For a near-wall window (wallsBeforeReset true in the S1 projection), the duration range runs from the projected wall instant to the same reopen range. Thin/no history → an explicit honesty state with a named reason, never a fabricated range (mirrors the neighbourhood's insufficient-history rule).
- Rendering in Drew's formats (S2.13), pure functions of (range, now): sub-day spans as "between X and Y hours from now"; day-scale spans as decimals ("2.5 to 3.7 days"); mixed spans compound ("2 days 4 hours to up to 3 days 16 hours"); and the natural-language window form naming America/Chicago wall-clock landmarks ("reopens between tomorrow afternoon and Sunday 2 am") when the range crosses day boundaries.
- Tests
quota-reset-duration.test.ts in the S1/S2 test style: format-rule table (each design example shape), jitter-spread range construction from synthetic snapshot history, honesty states for thin history, and the exactly-at-boundary cases.
- This slice lands criterion 2 (range rendering per the design's format rules, incl. the natural-language form) plus the prediction-record builder criterion 1 consumes; the gatherer-tick wiring (records logged per walled/near-wall pool) and criterion 3 (coverage + width scoring into the accuracy record) follow as the next slices.
On Drew's go-ahead naming #13258, this takes one lane pass. dezren39 commented on Nov 23, 2026
Takeover — Lane YB (archer), 2026-11-23. Adopting Lane WC's orphaned claim: WC claimed at 12:41Z and stopped on a platform execution-risk hold at 12:43Z (record above), with no PR, no done record, and no activity since — the lane has ended. Drew batch-approved all outstanding flag holds on 2026-11-23 07:35 CST ("Approve all the flag holds listed above"), which covers #13258. Landing WC's prepared scope exactly as recorded in its hold comment: new pure module pm-stack/aggregator/src/quota-reset-duration.ts (reset_duration prediction records + range rendering in Drew's formats, incl. the natural-language America/Chicago window form) plus quota-reset-duration.test.ts. This slice lands acceptance criterion 2 and the prediction-record builder criterion 1 consumes; gatherer-tick wiring and criterion-3 scoring remain follow-on slices, so this issue stays open. Working in a laptop worktree off main. dezren39 commented on Nov 23, 2026
Done (builder slice) — Lane YB (archer), 2026-11-23. Adopted Lane WC's orphaned claim under Drew's 2026-11-23 batch approval of the flag holds and landed WC's prepared scope (its hold record above) exactly: PR #13352 merged (4ca7ab408626, head SHA-guarded at a0953e6ef4a).
What landed — pm-stack/aggregator/src/quota-reset-duration.ts + quota-reset-duration.test.ts:
- The
reset_duration prediction record in the C4 design's §1 shape: subject pool+window, singular basis reset_cadence (§7), methodology c4-meth:1, supersedes link, inputs naming the rename-joined series (forecastSeriesKey).
- Range construction: reopening anchored on the published
resetsAt, ranged by the reset jitter observed over completed reset periods (realized resets estimated at the midpoint of the bracketing readings); with no published reset, projected one observed cadence interval past the last published reset. earliest == latest refused (§1): a degenerate spread widens to the observation resolution (half the median reading gap).
- Honesty states with named reasons:
no_basis (no snapshot history), insufficient_history (no completed period; or the ranged reopening already in the past — stale inputs). Non-subject windows (not walled, not projected to wall before reset) publish nothing.
- Ledger mirror rows under source
quota-prediction (§1), payload verbatim.
Acceptance mapping: criterion 2 (range rendering per the design's format rules, incl. the natural-language window form) — landed: the stored rendered string comes from the one shared §4 formatter (renderPredictionRange, quota-downtime.ts), with the duration form and the America/Chicago calendar form both pinned by tests. Criterion 1 — the record builder it consumes is landed; the gatherer-tick wiring (assemble history per walled/near-wall pool, log per tick) remains. Criterion 3 (coverage + width scoring into the accuracy record) remains. This issue stays open on criteria 1 and 3.
Verification (laptop route of record):
bun test src/quota-reset-duration.test.ts: 14/14 pass (jitter-spread construction from synthetic history, degenerate-spread widening, subject selection, both honesty states, stale guards, cadence projection, both rendering forms, ledger mirror, null-rollover regression below).
- Six C4/quota suites together (reset-duration, downtime, arrival, forecast, forecast-alerts, daytype-sufficiency): 86 pass / 0 fail.
- Full aggregator suite post-
bun install: 3255 pass / 20 fail — all 20 failures are server-boot tests failing on port 4871, which the production pm-aggregator service on the laptop holds (verified via ss: the deployed pm-aggregator process, up 11h51m); zero failures in any quota file, and this PR modifies no existing file. (The pre-install run's extra failures were the fresh worktree's missing node_modules.)
- Remote dispatch (run 45191248128) failed on environment —
bun: command not found in the fleet-build container (the fleet: fleet-command dispatch container cannot run nix develop out of the box (experimental features, nixbld group, homeless-shelter purity) #13159 family), not a test result.
Review: Codex posted one P2 (null resetsAt readings past a published reset would extend the period bracket and bill the publication gap to the reset as jitter). Accepted and fixed forward on the PR before merge, mirroring the accuracy harness's unknown-reset-segment distinction; regression test included (an on-schedule rollover with a two-reading publication gap now measures +75m of jitter, not +150m).
Design notes filed: the §4 compound example form is unimplemented by the shared formatter and its day form is unreachable as ordered — filed as #13357 for the design owner rather than forked around here. dezren39 commented on Nov 24, 2026 Triage verdict for #13258 (C4.2 reset-duration predictions).
Fresh state 2026-11-24: #13258 is OPEN, but its builder slice landed as PR #13352 (merged, 4ca7ab4, feat(pm-aggregator): C4.2 reset-duration prediction records). The lane YB done-slice note on the issue records this. Related merged work: #13268 (design), #13276 (forecast alerts).
Remaining in the issue: the range-rendering acceptance items (Drew's natural-language formats). Those are not in #13352's scope as recorded. Left open for the rendering slice; no code change from this triage. dezren39 commented on Nov 24, 2026 Triage verdict — xaltha, 2026-11-24 (queue task 23129, coverage reconciliation pass 2)
Fresh verification (corrects the earlier 22292 triage note, which understated #13352's scope):
- Issue OPEN. Builder slice landed: PR feat(pm-aggregator): C4.2 reset-duration prediction records (#13258 builder slice) #13352 MERGED —
pm-stack/aggregator/src/quota-reset-duration.ts is on main today (18,417 bytes read back via the API), with the reset_duration record builder AND criterion 2's range rendering (per Lane YB's done-slice note).
- Remaining, verified by code search today: only
quota-reset-duration.test.ts references the module — no production caller exists. Criterion 1's gatherer-tick wiring (assemble history per walled/near-wall pool, log records per tick) is not done, and criterion 3 (coverage + width scoring into the accuracy record) is not done. Archer Lane YB holds no live claim on these remainders (its claim ended with the merged slice).
Routing: scoped follow-on packet enqueued as queue task 23570 — feature_slice 2, gatherer-tick wiring only (criterion 3 scoring stays a separate later slice). Issue stays open. No code changed in this pass. developing-today-fleet commented on Nov 26, 2026
Slice landed — Lane YD (archer), 2026-11-26. PR #14487 (C4.2 slice 2: gatherer-tick wiring for reset_duration prediction records) shepherded and merged — merge commit e6838b5697974e89b0d6ca28ec3301ca3bced36c. This completes criterion 1's gatherer-tick wiring (the production caller the 2026-11-24 triage found missing). Per the PR body it closes none of #13258: criterion 3 (scoring / first scored outcomes) remains open as a separate slice. Evidence: PR comment by Lane YD on #14487. developing-today-fleet commented on Nov 26, 2026
Triage verdict — Lane GD (archer), 2026-11-26 (queue task 24597, coverage reconciliation)
Fresh verification, all comments read (8 comments, latest 2026-11-26T16:04:58Z):
- Issue OPEN, labels only
status:in-review; no assignees, no live claim, no held/user label, no Drew-decision gate. The last agent note is Lane YD's done-slice for slice 2 — that lane has ended.
- Criterion 2 — LANDED. PR feat(pm-aggregator): C4.2 reset-duration prediction records (#13258 builder slice) #13352 merged (
4ca7ab408626): quota-reset-duration.ts record builder + range rendering via the shared §4 formatter, 14/14 tests at the time.
- Criterion 1 — LANDED today. PR C4.2 slice 2 (#13258): gatherer-tick wiring for reset_duration prediction records #14487 merged 2026-11-26T16:02:30Z, merge commit
e6838b5697974e89b0d6ca28ec3301ca3bced36c: gatherer-tick wiring in scripts/gather-quota.ts logs reset_duration records per walled/near-wall pool and mirrors them to the ledger under source quota-prediction (83 tests passing per the PR body). This corrects the 2026-11-24 triage, which found no production caller — that gap is now closed. Code search today confirms reset_duration in gather-quota.ts, quota-reset-duration.ts, and quota-forecast-alerts.ts.
- Criterion 3 — NOT done, verified today. Code search returns 0 hits for
reset_duration in pm-stack/aggregator/src/quota-forecast-accuracy.ts (45,267 bytes, sha 63406d2a): nothing scores these predictions on range coverage + width, and no first scored outcomes have been published to the accuracy record.
Routing: scoped follow-on packet enqueued as queue task 25108 — feature_slice 3, criterion 3 only: extend the S2 accuracy harness to score reset_duration (coverage + width on the reopening instant, per pool, per design §3) and publish the first scored outcomes to the accuracy record. Owned paths named in the packet: quota-forecast-accuracy.ts + its test file. Issue stays open on criterion 3. No code changed in this triage pass. developing-today commented on Nov 27, 2026
🤖 Agent note · triaged — task 25118 (lane code-g)
developing-today commented on Nov 27, 2026 Scoring slice checkpoint — 2026-11-27 (Fleet task 25108)
Pushed the first implementation of reset-duration accuracy scoring on code-h/25108-reset-duration-scoring at afe59259d1e. It adds inclusive range-coverage/width facts, per-pool/window/basis/methodology rollups, explicit unscored counts for honesty/open outcomes, and a section in the S2 report. Tests name the C4 §3 containment/width rule as the oracle.
Verification is being dispatched remotely now. The scoring API accepts the snapshot-derived realized reopening observations alongside prediction records; the backtest entry point still needs a history source for those inputs, and actual historical first-outcome publication remains to be verified before this criterion can close. developing-today-fleet commented on Nov 27, 2026 Scoring slice progress (task 25108): PR #15824 adds reset-duration coverage/width scoring, grouped rollups, explicit unscored counts, and snapshot-derived reopening estimates. Focused remote verification on Fleet run https://github.com/developing-today/fleet/actions/runs/45918528847 passed bun test src/quota-forecast-accuracy.test.ts, bun test src/quota-reset-duration.test.ts src/quota-forecast.test.ts src/quota-downtime.test.ts; repository-wide bunx tsc --noEmit remains red on existing unrelated errors in scripts/search-profile.ts, src/d1-stores.test.ts, test/search-profile.test.ts, and test/work-projection.test.ts (none in changed files). This closes only the accuracy-scoring slice; #13258 remains open for prediction generation/publication and the design-required range rendering formats. developing-today-fleet commented on Nov 27, 2026 Scoring slice resumed under Fleet task 25108. Re-read of the full issue history and C4 design §§1/3/7 confirms the outstanding acceptance is not just the scoring API: the first non-empty scored outcomes must be published. PR #15824 provides the scorer/report/tests, but its backtest CLI currently invokes the builder with no prediction log, so the report has empty reset-duration facts.
I checked both current checkouts and the locally available quota-predictions.jsonl copies: the tracked aggregator tree contains no snapshot store or prediction log; the available temp logs contain only downtime_window honesty records, no reset_duration predictions. I will not manufacture scores from synthetic data and call them first outcomes. Criterion 3 remains open until a gatherer run produces a reset_duration prediction plus a later observed reset transition from the same snapshot history, then the accuracy report is published with those scored rows. Existing focused Fleet tests are recorded on PR #15824; repository typecheck has unrelated existing failures per the run record. developing-today-fleet commented on Nov 27, 2026 Scoring slice resumed under Fleet task 25108 (lane oc-code-07). Fresh premise check: #13258 remains open; PR #15824 remains open at head 2188406, CLEAN and non-draft. The newest PR note (lane 2207-C, 04:32Z) confirms the earlier Fleet run 45918528847 concluded failure after focused commands passed, and does not count as exact-head passing CI. The prior 04:07Z data check found no real reset_duration prediction plus later observed reopening in available history; synthetic scores would not satisfy first-outcome publication. No new real-history evidence is present in the current task state. Criterion 3 remains open; resume when real prediction/snapshot history becomes available, then publish the non-empty scored report and obtain focused passing verification on the PR head. developing-today-fleet commented on Nov 27, 2026 Update (oc-code-04, 2026-11-27): premise check for scoring slice 3 found the same slice already landed by another lane. PR #15824 is MERGED at 2ea1ff55164e19a00f9e01bbc337a3d4c5479a28; no duplicate branch or PR was created. The merged scorer adds reset_duration coverage/width scoring and keeps open/honesty cases unscored, but the acceptance criterion is not complete yet: the first non-empty scored outcomes from a real reset_duration prediction plus its later observed reopening transition must be published to the accuracy record. Existing history says available prediction logs contain no such real pair; synthetic outcomes do not satisfy the criterion. Resume when real prediction and matching later snapshot transition are available, publish the non-empty report evidence, and verify it. Issue remains open. developing-today-fleet commented on Nov 27, 2026
Scoring slice 3 — data-gated park (lane oc-code-07, Fleet task 25108). Fresh premise-check: issue OPEN, no comments since oc-code-04's 05:30Z note; PR #15824 MERGED (2ea1ff5); C4 design sections 1/3/7 re-read on origin/main.
New since the last check: real reset_duration predictions are now flowing — quota-predictions.jsonl holds 66 predicted records from live gatherer ticks (first issued 2026-11-27T06:00:23Z, latest 07:30Z). What is still missing is the outcome side: the snapshot store's last reading is 2026-11-27T05:45:48Z, before the first prediction was issued, and the merged scorer only scores an outcome with realizedAt > issuedAt. Zero scoreable pairs exist, so no non-empty accuracy report can be published yet; synthetic scores would not meet acceptance.
Resume when the snapshot store shows a reset transition after a real prediction's issuance — then publish the non-empty scored report and verify it. No code changed. developing-today-fleet commented on Nov 27, 2026 Re-verification, lane oc-code-04 (queue task 25108), checked 2026-11-27 ~13:50 UTC: criterion 3 remainder is still data-gated, no code changed.
- Ran the merged scorer (PR Score reset-duration quota forecast accuracy #15824, on origin/main) against live laptop data: 265 real state=predicted reset_duration records (first issued 06:00:23Z, latest 13:45Z), 22,153 snapshot records (store last reading 12:00:13Z) yielding 649 derived reset outcomes — but zero outcomes with realizedAt after the first prediction issuance, so zero scoreable pairs. Scored facts: 0 across all 9 pool/window baselines.
- No synthetic scores published. Resume when a real reset transition lands in the snapshot store after a real prediction's issuance; then publish the non-empty scored report, verify, and record evidence here. Issue stays open.
developing-today-fleet commented on Nov 27, 2026
Scoring slice 3 — still data-gated (lane any-n, Fleet task 25108). Fresh premise check on origin/main 6f5adfe: issue OPEN, no comments since oc-code-04's ~13:50Z note; PR #15824 MERGED; C4 design §§1/3/7 re-read; no live competing claim (this task claimed by this lane).
Re-ran the merged scorer against live laptop data: 422 real state=predicted reset_duration records (first issued 06:00:23Z, latest 18:15Z, 10 pool/window baselines, basis reset_cadence), 22,154 snapshot records (store last reading 16:15:39Z) — 0 scored facts, 422 unscored: still no outcome with realizedAt after the first issuance. No code changed; no synthetic scores. Resume when the snapshot store shows a reset transition after a real prediction issuance; then publish the non-empty scored report, verify, and record evidence here. developing-today-fleet commented on Nov 28, 2026 Re-verification, lane oc-code-01 (queue task 25108), checked 2026-11-28 ~06:20Z: criterion 3 remainder is still data-gated, no code changed.
- Ran the merged scorer (PR Score reset-duration quota forecast accuracy #15824) from fresh origin/main (343c526) against live laptop data via a read-only script calling the merged scoreResetDurationPredictions/deriveResetDurationOutcomes entry points: 1722 real reset_duration records (812 state=predicted, first issued 2026-11-27T06:00:23Z, latest 2026-11-28T06:00:04Z), 22159 snapshot records (store last reading 2026-11-28T06:00:38Z) across 36 observation subjects yielding 649 derived reset outcomes — 0 outcomes with realizedAt after the first prediction issuance, so 0 scored facts, 1722 unscored.
- No synthetic scores published. No new branch or PR created; the merged scorer stands.
- Resume when the snapshot store shows a reset transition (resetsAt change) with realizedAt after a real reset_duration prediction issued_at; then publish the non-empty scored report, verify, and record evidence here. Issue stays open.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|