GeezerVison is showing github.com — C4.5 gather-tick wiring: post forecast-alert findings to ledger (#13261) by dezren39 · Pull Request #14575 · developing-today/code
Conversation
dezren39
commented
Nov 24, 2026
•
edited by blacksmith-sh
Bot
Loading
Uh oh!
There was an error while loading. Please reload this page.
Slice 2 of #13261 (C4.5 forecast push alerts). Wires the merged evaluation module (#13276) into the gatherer tick.
What changes
scripts/gather-quota.ts: new runForecastAlerts beside runAnomalyDetectors. Each tick reads the C4 prediction log (quota-predictions.jsonl), evaluates the newest record per (kind, subject), and posts each new alertable prediction via AlertsStore.postIncident with forecastAlertIncidentInput (source quota-prediction, key = prediction record id, body = the record's stored rendered string verbatim).
- Fired record ids persist in
quota-forecast-alert-state.json beside the anomaly state (QUOTA_FORECAST_ALERT_STATE_PATH), so repeat ticks do not re-alert.
- Workhorse membership joins the deployed config through
sectionPoolIdsFromConfig. An unreadable config silences pool walls only; downtime windows still fire.
src/quota-forecast-alerts.ts: parseForecastAlertLog (newest per subject, skips torn/foreign lines) and isForecastAlertState (state guard for the re-baseline path).
Tests
src/quota-forecast-alerts.test.ts: 16 pass, including new tests for log parsing, state guard, two-tick post/suppress/moved-range, and empty workhorse set.
test/gather-quota.test.ts: 10 pass, including a new end-to-end test that runs the real gatherer twice. Tick 1 reports the finding and the skip (no alerts store in test env). Tick 2 reports 0 new findings.
tsc --noEmit is clean for touched files. The pre-existing prompts.test.ts type error is unrelated.
Not in this PR
Refs #13261
{
"direct_parent": null,
"links": [],
"lineage": {
"design": null,
"roadmap_item": null,
"priority": null
},
"pm_meta": 1,
"provenance": {
"queue_id": null,
"scheduled_start": null,
"picked_up_at": null,
"work_started_at": null,
"created_at": "2026-11-24T19:51:17Z",
"session_id": "ses_e5df14e8adcffefU9CfPlmIt35",
"lane": null,
"host": "amd",
"worktree": "/home/user/git/fleet/oc-code-06-23625-13261",
"model": null,
"lane_start_issues": [],
"workspace_ref": {
"kind": "worktree",
"id": "/home/user/git/fleet/oc-code-06-23625-13261",
"repo": "developing-today/code",
"branch": "wt-23625-gather-tick-forecast-alert",
"sha": "2efdd2ad33c91c1304dcae7ac6c1788809421ba9"
},
"auth_subject": "oc-code-05",
"stamped_by": "fleet 0.1.0 (native)"
}
}
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Wire the merged evaluateForecastAlerts module into the gatherer tick.
Each tick reads the C4 prediction log, evaluates the newest record per
subject, and posts new alertable predictions via AlertsStore.postIncident
(source quota-prediction, key = prediction record id, body = the record's
stored rendered string verbatim). Fired record ids persist in
quota-forecast-alert-state.json beside the anomaly state so repeat ticks
do not re-alert. Workhorse pool membership joins the deployed config via
sectionPoolIdsFromConfig; an unreadable config silences walls only.
Refs #13261
Warning
Review limit reached
You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.
Next included review available in 13 minutes.
Check out review usage here.
View limit details
-
Limit details: You’ve used the included review currently available.
Learn how review limits work.
Review configuration:
Run configuration
-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: defaults
- Review profile: CHILL
- Plan: Advanced
- Run ID:
06108a35-50b9-404e-9726-9c92355cf22b
Commits
-
Reviewing files that changed from the base of the PR and between 697fb3b and 2efdd2a.
Files selected for processing: 4
-
pm-stack/aggregator/scripts/gather-quota.ts
pm-stack/aggregator/src/quota-forecast-alerts.test.ts
pm-stack/aggregator/src/quota-forecast-alerts.ts
pm-stack/aggregator/test/gather-quota.test.ts
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
-
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|