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
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.
Acceptance criteria
Delivered: C4.5 — Forecast push alerts (downtime + wall predictions to push notifications) — the outcome named in the title is demonstrably in place.
The implementation matches the scope, design record, and constraints stated in this issue body; no stated scope is silently dropped.
Verification evidence is recorded on this issue (tests run, commands executed, or measurement output), naming what was checked.
Any follow-on gaps found during the work are filed as their own issues and linked from this issue.
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.
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 predicteddowntime_window records and for predictedpool_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.
Triage verdict (lane oc-code-02, task 22295): issue stays open on the gather-tick wiring remainder. Slice 1 (evaluation module + 12 tests) is merged via #13276 and present on main; no open PR covers the wiring; producers #13257/#13258 still open so the hook should build against the merged #13268 record schema. Routed follow-on: queue task 23625 (feature_slice, slice-2) for the tick hook in pm-stack/aggregator/scripts/gather-quota.ts.
gather-quota reads the C4 prediction log (quota-predictions.jsonl), evaluates the newest record per (kind, subject) via evaluateForecastAlerts, and posts new alertable predictions with AlertsStore.postIncident (source quota-prediction, incident key = the prediction record id, body = the record's stored rendered text verbatim).
Fired record ids persist in quota-forecast-alert-state.json beside quota-anomaly-state.json; repeat ticks report already-alerted and post nothing.
Workhorse membership is joined from the deployed OpenCode config with sectionPoolIdsFromConfig; an unreadable config silences pool walls only (downtime windows still fire).
Fail-soft: a failed tick never fails on this path; no alerts store = the finding is logged and the state still advances.
Tests: 16 in src/quota-forecast-alerts.test.ts (log parsing, state guard, two-tick post/suppress/moved-range, empty workhorse set) and 10 in test/gather-quota.test.ts (new end-to-end two-tick tick posting/suppression run of the real script); aggregator typecheck clean for touched files.
Acceptance status on this issue:
Alerts fire for predicted downtime windows (producer C4.1 is live), with the prediction record id attached.
Repeat ticks do not re-alert the same prediction.
Alert text is the record's stored rendered string, never re-derived.
Current-main GitHub code search finds production pool_exhaustion references only in the alert evaluator/tests; no C4 producer currently wraps the Stage-3 per-pool quota-forecast.json projections into quota-predictions.jsonl records.
The C4 design doc/2026-11-13T15-12-00Z_design_reporting-architecture-event-driven/c4-forecasting-design.md §2 specifies that wrapper. The issue acceptance's downtime firing, tick dedupe and stored-rendering work is already delivered; only the workhorse full-wall producer leg remains.
Routed as feature slice task 25141 in repo-health-code-pilot: implement the C4 pool_exhaustion producer from the live Stage-3 forecast rows, connect it to the existing alert tick path, and prove honest range/state handling plus one-post/repeat-tick suppression with focused and integration tests. No duplicate implementation started. #13261 stays open until the producer is verified against live tick data.
src/quota-pool-exhaustion.ts: derivePoolExhaustionRecords wraps the S1 product — one record per walled/near-wall pool/window; range from the S2 accuracy calibration (window cell n>=20, else pool band, else insufficient_history); ledger mirror under quota-prediction.
Tick wiring reads quota-exhaustion-calibration.json (missing/torn = honesty states), appends to quota-predictions.jsonl, chains supersedes, fail-soft. Repeat-tick re-posts are suppressed by the slice-2 alert-state dedupe.
Left for the follow-on: the S2 live-scoring feed that populates the calibration file — until then subjects honestly report insufficient_history. PR refs this issue without closing.
Census 2026-11-29 (Felix): recheck of this issue (body, all comments, labels, blocker edges).
STRENGTHS: The delivery discipline is in the acceptance itself — alerts attach the prediction record id, dedupe is keyed on the prediction record (repeat ticks never re-alert), and alert text uses the design's range formats verbatim from the record, never re-derived at send time. The S5 anomaly path is the named delivery precedent, with its source named.
GAPS: None in labels (complete: kind/feature, priority/normal, status:in-review, epic/pm-stack).
FIXES I APPLIED: None needed. Progress state: slice 1 (evaluation module + 12 tests, PR #13276) and slice 2 (gather-tick wiring, PR #14575) are merged; the gap the 2026-11-26 triage named — the workhorse full-wall producer — was closed by the producer slice on 2026-11-28 (PR #16399: pool_exhaustion producer + gather-tick wiring + tests).
REMAINS: Final acceptance verification against the merged producer (alerts firing for both prediction classes with dedupe and verbatim formats demonstrated from the record), then this component of #9572 can close.
Audited live on 2026-11-29 against the house label taxonomy: details, labels, blockers, priority.
Gaps found: no ## Acceptance criteria section in the body Strengths found: detailed body with scope and context a picker-up can start from; links a parent issue and/or design record; active discussion: 8 recent comment(s) skimmed Actions taken by the census: appended ## Acceptance criteria section to the body (original text unchanged).
Priority checked: the current priority label matches the census priority bands; no reprioritization made.
Claim — lane 0900-AK (Xaltha, wave 0900). Taking the final acceptance verification the 2026-11-29 Felix census named as #13261's sole remainder: alerts firing for both prediction classes (downtime_window + workhorse pool_exhaustion from the merged producer, PR #16399) with dedupe and verbatim formats demonstrated from the record — via the aggregator test suites on current main, remotely dispatched. Closing as completed if the evidence holds.
Closed as completed — final acceptance verification, lane 0900-AK (2026-11-30).
All three slices are merged: slice 1 evaluation module (PR #13276), slice 2 gather-tick wiring + dedupe state (PR #14575), and the workhorse full-wall producer (PR #16399, merged 2026-11-28T04:03:24Z). The sole remainder the 2026-11-29 census named was this verification against the merged producer; it now stands:
Remote dispatch run 46462424581 on current main completed success — bun install --frozen-lockfile && bun test src/quota-forecast-alerts.test.ts src/quota-pool-exhaustion.test.ts src/quota-downtime.test.ts && bunx tsc --noEmit in pm-stack/aggregator. The suites demonstrate, against records of the exact shape the merged producer emits:
Firing (criterion 1): a predicted downtime_window fires with the record id attached; a predicted pool_exhaustion for a workhorse pool fires; an ordinary (non-workhorse) pool wall does not alert (S3.15 selectivity); reset_duration / model_plan_arrival records do not alert standalone.
Dedupe (criterion 2): a repeat tick over the same records re-alerts nothing; a superseding record re-issuing the same prediction does not re-alert; a superseding record whose range moved fires as a new prediction; the two-tick log test posts once and suppresses the repeat.
Verbatim formats (criterion 3): the alert body is the record's stored rendered string byte for byte and is never re-derived from other record fields; honesty-state records stay silent with their state named.
Activity
developing-today commentedon Nov 23, 2026
CODE-4836
dezren39 commentedon Nov 23, 2026
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.
feat(quota): forecast-alert evaluation for C4 prediction records (#13261
dezren39 commentedon Nov 23, 2026
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:
evaluateForecastAlertsfires findings forpredicteddowntime_windowrecords and forpredictedpool_exhaustionrecords whose subject pool serves the workhorse section (the predicted workhorse full-wall); the finding and the ledger incident key carry the prediction record id, sourcequota-predictionper design §8.renderedstring 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_durationandmodel_plan_arrivalrecords do not alert standalone in this slice (design §8's alert set is downtime windows + workhorse full-wall). Honesty states evaluatesilentwith the state named; apredictedrecord with no rendered text or an inverted range evaluatesunevaluable, never fired.Verification (laptop, at main
c1700bc77d8): new suite 12/12 pass (failing-first confirmed before the module existed); full aggregatorbun test src/210/210;tsc --noEmitclean.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.tsshows forecast-alert findings posted to the ledger on a live tick. This issue stays open on that wiring.Merge pull request #13276 from developing-today/lane-wd-13261
dezren39 commentedon Nov 24, 2026
Triage verdict (lane oc-code-02, task 22295): issue stays open on the gather-tick wiring remainder. Slice 1 (evaluation module + 12 tests) is merged via #13276 and present on main; no open PR covers the wiring; producers #13257/#13258 still open so the hook should build against the merged #13268 record schema. Routed follow-on: queue task 23625 (feature_slice, slice-2) for the tick hook in pm-stack/aggregator/scripts/gather-quota.ts.
Merge pull request #14575 from developing-today/wt-23625-gather-tick-…
dezren39 commentedon Nov 24, 2026
Slice 2 (gather-tick wiring) merged: PR #14575 (merge commit 96078f4, 2026-11-24T19:52:33Z).
What now runs every tick:
quota-predictions.jsonl), evaluates the newest record per (kind, subject) viaevaluateForecastAlerts, and posts new alertable predictions withAlertsStore.postIncident(sourcequota-prediction, incident key = the prediction record id, body = the record's storedrenderedtext verbatim).quota-forecast-alert-state.jsonbesidequota-anomaly-state.json; repeat ticks reportalready-alertedand post nothing.sectionPoolIdsFromConfig; an unreadable config silences pool walls only (downtime windows still fire).Tests: 16 in
src/quota-forecast-alerts.test.ts(log parsing, state guard, two-tick post/suppress/moved-range, empty workhorse set) and 10 intest/gather-quota.test.ts(new end-to-end two-tick tick posting/suppression run of the real script); aggregator typecheck clean for touched files.Acceptance status on this issue:
pool_exhaustionpredictions; the hook already handles them.Leaving this issue open for that producer leg.
developing-today-fleet commentedon Nov 26, 2026
Triage verdict — oc-code-07, 2026-11-26
Verdict: still open; the C4.5 consumer is implemented, but the workhorse full-wall producer is not.
Fresh verification:
pool_exhaustionreferences only in the alert evaluator/tests; no C4 producer currently wraps the Stage-3 per-poolquota-forecast.jsonprojections intoquota-predictions.jsonlrecords.pool_exhaustionrecord required by the alert path.doc/2026-11-13T15-12-00Z_design_reporting-architecture-event-driven/c4-forecasting-design.md§2 specifies that wrapper. The issue acceptance's downtime firing, tick dedupe and stored-rendering work is already delivered; only the workhorse full-wall producer leg remains.Routed as feature slice task 25141 in
repo-health-code-pilot: implement the C4pool_exhaustionproducer from the live Stage-3 forecast rows, connect it to the existing alert tick path, and prove honest range/state handling plus one-post/repeat-tick suppression with focused and integration tests. No duplicate implementation started. #13261 stays open until the producer is verified against live tick data.C4.5 pool_exhaustion producer (#13261): S1-wrapping records + gather-…
developing-today-fleet commentedon Nov 28, 2026
C4.5 producer slice done (queue task 25141): PR #16399 adds the
pool_exhaustionproducer + gather-tick wiring + tests.src/quota-pool-exhaustion.ts:derivePoolExhaustionRecordswraps the S1 product — one record per walled/near-wall pool/window; range from the S2 accuracy calibration (window cell n>=20, else pool band, elseinsufficient_history); ledger mirror underquota-prediction.quota-exhaustion-calibration.json(missing/torn = honesty states), appends toquota-predictions.jsonl, chainssupersedes, fail-soft. Repeat-tick re-posts are suppressed by the slice-2 alert-state dedupe.Left for the follow-on: the S2 live-scoring feed that populates the calibration file — until then subjects honestly report
insufficient_history. PR refs this issue without closing.Merge pull request #16399 from developing-today/any-o/25141-pool-exha…
developing-today-fleet commentedon Nov 29, 2026
Census 2026-11-29 (Felix): recheck of this issue (body, all comments, labels, blocker edges).
STRENGTHS: The delivery discipline is in the acceptance itself — alerts attach the prediction record id, dedupe is keyed on the prediction record (repeat ticks never re-alert), and alert text uses the design's range formats verbatim from the record, never re-derived at send time. The S5 anomaly path is the named delivery precedent, with its source named.
GAPS: None in labels (complete:
kind/feature,priority/normal,status:in-review,epic/pm-stack).FIXES I APPLIED: None needed. Progress state: slice 1 (evaluation module + 12 tests, PR #13276) and slice 2 (gather-tick wiring, PR #14575) are merged; the gap the 2026-11-26 triage named — the workhorse full-wall producer — was closed by the producer slice on 2026-11-28 (PR #16399:
pool_exhaustionproducer + gather-tick wiring + tests).REMAINS: Final acceptance verification against the merged producer (alerts firing for both prediction classes with dedupe and verbatim formats demonstrated from the record), then this component of #9572 can close.
developing-today-fleet commentedon Nov 29, 2026
Issue census — 2026-11-29
Audited live on 2026-11-29 against the house label taxonomy: details, labels, blockers, priority.
Gaps found: no ## Acceptance criteria section in the body
Strengths found: detailed body with scope and context a picker-up can start from; links a parent issue and/or design record; active discussion: 8 recent comment(s) skimmed
Actions taken by the census: appended ## Acceptance criteria section to the body (original text unchanged).
Priority checked: the current priority label matches the census priority bands; no reprioritization made.
developing-today-fleet commentedon Nov 30, 2026
Claim — lane 0900-AK (Xaltha, wave 0900). Taking the final acceptance verification the 2026-11-29 Felix census named as #13261's sole remainder: alerts firing for both prediction classes (downtime_window + workhorse pool_exhaustion from the merged producer, PR #16399) with dedupe and verbatim formats demonstrated from the record — via the aggregator test suites on current main, remotely dispatched. Closing as completed if the evidence holds.
developing-today-fleet commentedon Nov 30, 2026
Closed as completed — final acceptance verification, lane 0900-AK (2026-11-30).
All three slices are merged: slice 1 evaluation module (PR #13276), slice 2 gather-tick wiring + dedupe state (PR #14575), and the workhorse full-wall producer (PR #16399, merged 2026-11-28T04:03:24Z). The sole remainder the 2026-11-29 census named was this verification against the merged producer; it now stands:
Remote dispatch run 46462424581 on current main completed success —
bun install --frozen-lockfile && bun test src/quota-forecast-alerts.test.ts src/quota-pool-exhaustion.test.ts src/quota-downtime.test.ts && bunx tsc --noEmitin pm-stack/aggregator. The suites demonstrate, against records of the exact shape the merged producer emits:renderedstring byte for byte and is never re-derived from other record fields; honesty-state records stay silent with their state named.C4.5 (#13261, component of #9572) is complete.