Skip to content

C4.5 — Forecast push alerts (downtime + wall predictions to push notifications) #13261

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: S2.12 C4 half — push notifications carrying C4 predictions: predicted complete-downtime windows, predicted workhorse full-wall, and reset-duration ranges, in the design's rendered formats. Delivery precedent is the S5 anomaly path (alerts ledger via postIncident, source named); dedupe/threshold rules per the design (not every wall/reset alerts — S3.15's selectivity applies to pushes too).

Acceptance:

  • Alerts fire for predicted downtime windows and workhorse full-wall predictions meeting the design's thresholds, with the prediction record id attached.
  • Repeat ticks do not re-alert the same prediction (dedupe keyed on the prediction record).
  • Alert text uses the design's range formats verbatim from the record, never re-derived at send time.

Activity

  1. developing-today commented on Nov 23, 2026

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

    @dezren39
    MemberAuthor

    Lane WD claiming #13261 (served via the fleet shortlist, refill #6). Plan: land the next feature slice — the forecast-alert plumbing against the prediction-record shape and the S5 alerts-ledger precedent, with tests, per the issue's acceptance criteria. Worktree on the laptop; PR to follow.

  3. dezren39 commented on Nov 23, 2026

    @dezren39
    MemberAuthor

    Progress (Lane WD): first slice landed as PR #13276 — the alert-evaluation module (pm-stack/aggregator/src/quota-forecast-alerts.ts, +12 tests), built against the C4 design that merged today in PR #13268 (§1 record schema, §8 delivery).

    What the slice pins, per the acceptance criteria:

    • Criterion 1 (fires, id attached): evaluateForecastAlerts fires findings for predicted downtime_window records and for predicted pool_exhaustion records whose subject pool serves the workhorse section (the predicted workhorse full-wall); the finding and the ledger incident key carry the prediction record id, source quota-prediction per design §8.
    • Criterion 2 (dedupe): repeat evaluation over the same records with the returned tick state re-alerts nothing; a superseding record re-issuing the same prediction (same kind + subject + range) is also suppressed, while a moved range alerts as a new prediction.
    • Criterion 3 (verbatim): the alert body is the record's stored rendered string byte-for-byte; a test pins that changing basis/methodology fields cannot change the body.

    Selectivity decisions recorded in the module header: ordinary pool walls do not alert (S3.15); reset_duration and model_plan_arrival records do not alert standalone in this slice (design §8's alert set is downtime windows + workhorse full-wall). Honesty states evaluate silent with the state named; a predicted record with no rendered text or an inverted range evaluates unevaluable, never fired.

    Verification (laptop, at main c1700bc77d8): new suite 12/12 pass (failing-first confirmed before the module existed); full aggregator bun test src/ 210/210; tsc --noEmit clean.

    Remaining for this issue: the gatherer tick hook — read the C4 prediction log on each tick, post findings via AlertsStore.postIncident, persist the alert state beside the anomaly state. Next slice, in the same form: after the C4.1/C4.2 producers (#13257/#13258) publish records, scripts/gather-quota.ts shows forecast-alert findings posted to the ledger on a live tick. This issue stays open on that wiring.

  4. added a commit that references this issue on Nov 23, 2026
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