You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
C4.3 — Day-type and spike-day adjustments for quota forecasts (data-gated) #13259
Component 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: S2.6 day-type adjustments (same time-of-day on other days, other Fridays, other weekends) and S2.7 spike-day modeling (a week running ~10% light predicts a ~+20% spike day, stated explicitly by the model) as adjustments to the v1 pace forecast.
DATA GATE (from the Stage-3 design §2/§8, which deferred this): at 33 days of store history there were ~4–5 samples of each weekday per window — too thin. This issue first re-measures sample sufficiency per the design's threshold; cells below threshold keep the honesty state adjustment_unavailable and the unadjusted forecast stands. No tuned guesses on thin data.
Acceptance:
Sample-sufficiency measurement over the live snapshot store, per pool/window/day-type cell, recorded on this issue.
Adjustments implemented for cells meeting the threshold, as a named methodology version (methodology-change log entry per the C4 design).
Accuracy compared adjusted vs unadjusted in the S2 harness before any adjustment ships as the published forecast.
Lane WF (archer) claiming this item, 2026-11-23. Served via the agent shortlist (refill #6). Plan: land the first slice — the sample-sufficiency measurement over the live snapshot store, per pool/window/day-type cell, against the Stage-3 design's threshold, recorded on this issue (acceptance criterion 1). Cells below threshold keep adjustment_unavailable; no tuned guesses on thin data.
PR #13290 is open with the criterion-1 slice: the day-type sample-sufficiency re-measure (module + measure:daytype-sufficiency command + oracle-named tests, 10/10 on the laptop route; neighbouring quota suites 41/41).
Headline of the live run (full measurement lands as the criterion-1 record once the PR merges): 51 of 2,583 cells admitted — all coarse-grain (daypart 39, dayclass-weekday 12); weekday and weekday×daypart grains admit none (max 4 samples vs the ≥8 gate).
🤖 Criterion 1 record — Lane WF (archer) · PR #13290 merged (e8237c0b76fc)
The re-measure is landed as a command (bun run measure:daytype-sufficiency -- --store-dir <dir>, module src/quota-daytype-sufficiency.ts) and run over the live snapshot store, 2026-11-23. Method, per the C4 design §5 and Stage-3 §2: a cell admits an adjustment only at ≥8 independent samples; a sample is one America/Chicago calendar date with ≥1 reading in the cell (readings within one occurrence are one burn episode — at the gatherer cadence, counting readings would admit a cell on a single day). Inputs are the rename-joined percent series the S2 harness scores; dayparts are the design §4 names on quarter-day Chicago blocks (night 00–06, morning 06–12, afternoon 12–18, evening 18–24).
Verdict: 51 of 2,583 cells admitted — every one at the coarse grains. Daypart cells ("same time-of-day on other days") are admitted for the densely gathered pools (39 cells), and dayclass-weekday for 8 pools (12 cells); no weekend cell is admitted anywhere, and the weekday and weekday×daypart grains admit nothing — their densest cell holds 4 samples, half the gate, because per pool/window the gatherer-era series covers at most 19 distinct Chicago dates. Criterion 2 is thereby scoped: adjustments can be built now for the admitted daypart/dayclass cells only, as shadow records that must still earn in under criterion 3; all other cells stay adjustment_unavailable and the unadjusted forecast stands. Weekday cells cross the gate at one new sample per week per cell, so the next re-measure belongs a few weeks out or whenever a slice needs a fresher admission set.
Gate: ≥8 independent samples per cell (C4 design §5). A sample is one America/Chicago calendar date with ≥1 reading in the cell; cells are America/Chicago calendar cells. Below the gate the state is adjustment_unavailable and the unadjusted forecast stands.
Store: 20979 records (20011 percent readings), 2026-10-20T12:00:00.000Z → 2026-11-23T12:45:58.650Z. Pools are folded series keys (the S2 rename join); windows are the canonical forecast windows.
Activity
developing-today commentedon Nov 23, 2026
CODE-4834
dezren39 commentedon Nov 23, 2026
Lane WF (archer) claiming this item, 2026-11-23. Served via the agent shortlist (refill #6). Plan: land the first slice — the sample-sufficiency measurement over the live snapshot store, per pool/window/day-type cell, against the Stage-3 design's threshold, recorded on this issue (acceptance criterion 1). Cells below threshold keep
adjustment_unavailable; no tuned guesses on thin data.dezren39 commentedon Nov 23, 2026
🤖 Progress — Lane WF (archer)
PR #13290 is open with the criterion-1 slice: the day-type sample-sufficiency re-measure (module +
measure:daytype-sufficiencycommand + oracle-named tests, 10/10 on the laptop route; neighbouring quota suites 41/41).Headline of the live run (full measurement lands as the criterion-1 record once the PR merges): 51 of 2,583 cells admitted — all coarse-grain (daypart 39, dayclass-weekday 12); weekday and weekday×daypart grains admit none (max 4 samples vs the ≥8 gate).
Merge pull request #13290 from developing-today/lane-wf-13259
dezren39 commentedon Nov 23, 2026
🤖 Criterion 1 record — Lane WF (archer) · PR #13290 merged (
e8237c0b76fc)The re-measure is landed as a command (
bun run measure:daytype-sufficiency -- --store-dir <dir>, modulesrc/quota-daytype-sufficiency.ts) and run over the live snapshot store, 2026-11-23. Method, per the C4 design §5 and Stage-3 §2: a cell admits an adjustment only at ≥8 independent samples; a sample is one America/Chicago calendar date with ≥1 reading in the cell (readings within one occurrence are one burn episode — at the gatherer cadence, counting readings would admit a cell on a single day). Inputs are the rename-joined percent series the S2 harness scores; dayparts are the design §4 names on quarter-day Chicago blocks (night 00–06, morning 06–12, afternoon 12–18, evening 18–24).Verdict: 51 of 2,583 cells admitted — every one at the coarse grains. Daypart cells ("same time-of-day on other days") are admitted for the densely gathered pools (39 cells), and dayclass-weekday for 8 pools (12 cells); no weekend cell is admitted anywhere, and the weekday and weekday×daypart grains admit nothing — their densest cell holds 4 samples, half the gate, because per pool/window the gatherer-era series covers at most 19 distinct Chicago dates. Criterion 2 is thereby scoped: adjustments can be built now for the admitted daypart/dayclass cells only, as shadow records that must still earn in under criterion 3; all other cells stay
adjustment_unavailableand the unadjusted forecast stands. Weekday cells cross the gate at one new sample per week per cell, so the next re-measure belongs a few weeks out or whenever a slice needs a fresher admission set.Day-type sample sufficiency — C4.3 re-measure (#13259)
Gate: ≥8 independent samples per cell (C4 design §5). A sample is one America/Chicago calendar date with ≥1 reading in the cell; cells are America/Chicago calendar cells. Below the gate the state is
adjustment_unavailableand the unadjusted forecast stands.Store: 20979 records (20011 percent readings), 2026-10-20T12:00:00.000Z → 2026-11-23T12:45:58.650Z. Pools are folded series keys (the S2 rename join); windows are the canonical forecast windows.
By grain
Admitted cells
Per pool/window