Skip to content

C4.1 — Complete-downtime window prediction (all pools walled at once) #13257

Open

Description

@dezren39

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: derive complete-downtime windows — intervals where every routing pool is predicted walled simultaneously — from the Stage-3 forecast product (quota-forecast.json, #12695) plus per-pool reset times. Emit C4 prediction records of kind downtime_window (schema in the design): range with earliest/latest reopening, basis named, logged for scoring.

Boundaries: consumes the existing forecast product and gatherer substrate; no second gatherer; no placement effect (advisory data for C6 pages and forecast alerts).

Acceptance:

  • Downtime-window records published on gatherer ticks alongside quota-forecast.json.
  • Windows scored per the design's scoring rules (start/end error, overlap) in the accuracy ledger.
  • A window with no defensible basis is an honesty state, never an invented interval.

Activity

  1. developing-today commented on Nov 23, 2026

    @developing-today
    Contributor
  2. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    🤖 Lane claim — Lane WA (archer)

    Taking #13257 (C4.1 complete-downtime window prediction), served by the queue shortlist (rank 6, rechecked unclaimed).

    Ownership check: no assignees, no labels, only comment is the bot task link — no live claim. Premise check and substrate survey first (design record doc/2026-11-13T15-12-00Z_design_reporting-architecture-event-driven/c4-forecasting-design.md, the #12695 forecast product, gatherer publication point); then one slice: one PR making one acceptance criterion pass, with its test.

  3. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · slice landed — Lane WA (archer)

    PR #13295 merged (619b7e56e6dc, head-SHA guarded at 6569d04a58c).

    Design conformance: the C4 design (PR #13268) landed mid-slice; this PR was reconciled to it before merge — the records are the design's (§1 schema, §7 derivation), not a parallel shape.

    What landed:

    • pm-stack/aggregator/src/quota-downtime.ts — pure derivation over the tick's Stage-3 forecast product (impl(quota-plane): stage-3 S1 — forecast product: per-tick quota-forecast from the analytics pace math #12695): per-pool wall intervals [wall, reset) intersected across every routing pool (canonical provider id); earliest = last member wall, latest = earliest member reset; basis since_last_reset with detail; §4 rendered string stored at issuance; supersedes linked from the log tail; methodology c4-meth:1.
    • Gatherer wiring (fail-soft, after the forecast publication): records append to quota-predictions.jsonl beside the forecast product and mirror into the Turso ledger under the C4 source quota-prediction.
    • pm-stack/aggregator/c4-methodology-log.jsonl — the §6 log's first entry.

    Acceptance:

    • Criterion 1 — downtime-window records published on gatherer ticks alongside the forecast product (proven by unit tests + the gather-quota integration test asserting the tick appends the record).
    • Criterion 3 — a window with no defensible basis is a published insufficient_history honesty state with a named reason, never an invented interval; a defensible no-window tick publishes no record (absence is the scored signal, §3).
    • Criterion 2 — remains: scoring downtime windows per §3 (start/end error, interval overlap) in the accuracy ledger. The mirrored records landed here are its input; that is the next slice.

    Verification (laptop route): bun test src/quota-downtime.test.ts 15/15; mutation check (intersection every→some) fails 9/15, restored green; gather + forecast + accuracy suites 38/38; tsc --noEmit 0 errors. Remote dispatch attempted (run 45178762980) and failed at command execution — the fleet-build container has no bun (#13159 family), not a test result.

    #13257 stays open on criterion 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions