Repository navigation
feat(quota-plane): S7 weekly forecast-accuracy review job (#12701) - #13263
Merged
Merged
Conversation
Stage-3 slice S7 (epic #12694; design §7, D7): the scheduled weekly job that scores the week's forecasts against realized outcomes and folds the accuracy record back into the rules — as a report and proposals, never in-place edits. - src/quota-weekly-review.ts: the pure review core. Week scoring over S2's scored facts (a forecast belongs to the week its reset period completed in), textbook precision/recall with S2's rounding and null rules, wall error via S2's errorDistribution; the §6 findings of the week; the §5 fold rendered as the week's rule consequence — S6 proposals with their PRs, or an explicit no-change finding carrying the week's numbers (the design's anti-decay rule), or a plain statement that the fold was not evaluated. pace_hold section names S4's absence until it lands. - scripts/quota-weekly-review.ts: the job (package script review:quota-weekly). Builds the ledger from the snapshot store, replays the detectors, runs the S6 generator when --route-config is supplied (draft packs under --out-dir; --open-prs opens the proposal PRs through S6's PR-only path), and with --post posts the report as a comment on epic #12694. #3352 argument contract. - pkgs/pm-aggregator: pm-aggregator-quota-weekly-review entry point. - nixos pm-stack module: quota-weekly-review service + timer (Mondays 07:20 local, Persistent) beside the weekly digest. - doc/fleet-schedule-registry.md: the job's §2b row with cadence and owner (Nix-configured pending deployment). Tests: src/quota-weekly-review.test.ts — hand-computed fixture oracles for week membership (half-open reset interval), precision/ recall, wall-error quantiles, findings grouping, and the report's rule-consequence shapes.
|
Warning Review limit reachedYou'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 59 minutes. View limit details
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. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Stage-3 slice S7 (epic #12694; design §7, D7): the scheduled weekly job that scores the week's forecasts against realized outcomes and folds the accuracy record back into the rules — as a report and proposals, never in-place edits.
pm-stack/aggregator/src/quota-weekly-review.ts— the pure review core: week scoring over S2's scored facts (a forecast belongs to the week its reset period completed in; textbook precision/recall with S2's rounding and null rules; wall error via S2'serrorDistribution), the §6 findings of the week, and the §5 fold rendered as the week's rule consequence — S6 proposals with their PRs, or an explicit no-change finding carrying the week's numbers (the design's anti-decay rule), or a plain statement that the fold was not evaluated. Thepace_holdsection names S4's absence until it lands.pm-stack/aggregator/scripts/quota-weekly-review.ts— the job (package scriptreview:quota-weekly). Builds the ledger from the snapshot store, replays the detectors, runs the S6 generator when--route-configis supplied (draft packs under--out-dir;--open-prsopens proposal PRs through S6's PR-only path), and with--postposts the report as a comment on epic epic(quota-plane): Stage 3 — predictive, self-tuning quota operations #12694. Design: unknown means stop — one strict argument contract for the repo's operator scripts #3352 argument contract.pkgs/pm-aggregator—pm-aggregator-quota-weekly-reviewentry point.nixos/services/pm-stack—quota-weekly-reviewservice + timer (Mondays 07:20 local,Persistent) beside the weekly digest.doc/fleet-schedule-registry.md— the job's §2b row with cadence and owner, marked Nix-configured pending deployment.Evidence
src/quota-weekly-review.test.ts: 7/7 pass, 32 assertions — hand-computed fixture oracles for week membership (half-open reset interval), precision/recall, wall-error quantiles, findings grouping, and the report's rule-consequence shapes.bunx tsc --noEmitclean.fleet queue dispatch, run 45174756027): failed withbun: command not foundin the fleet-build container — the known container gap (fleet: fleet-command dispatch container cannot run nix develop out of the box (experimental features, nixbld group, homeless-shelter purity) #13159 family), not a test result; verification is the laptop route above.nix build .#pm-aggregatorsucceeds; the packagedpm-aggregator-quota-weekly-reviewbinary enforces the argument contract. NixOS eval of theamdconfiguration:systemd.user.timers.quota-weekly-review.Timer.OnCalendar = "Mon *-*-* 07:20:00", serviceType = "oneshot", ExecStart renders to the packaged binary with the state-dir store, the checkout route config,--open-prs --post.caution-margin:NEAR_PCT:80->75) with its evidence gaps recorded. The first live run (report posted to epic(quota-plane): Stage 3 — predictive, self-tuning quota operations #12694 + proposal PR) follows this merge and is recorded on impl(quota-plane): stage-3 S7 — weekly forecast-accuracy review job: fold accuracy back into the rules #12701.Merge Danger
Low. Purely additive: a new module, script, package entry point, and timer; no existing unit, route, or config changes behaviour. The timer activates only on the next laptop NixOS deploy from the primary, and the job itself never edits quota config — its only writes are the epic comment and S6 proposal PRs.
{ "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-23T12:37:44Z", "session_id": null, "lane": null, "host": "amd", "worktree": "/home/user/wt-lane-us-12701", "model": null, "lane_start_issues": [], "workspace_ref": { "kind": "worktree", "id": "/home/user/wt-lane-us-12701", "repo": "developing-today/code", "branch": "lane-us-12701", "sha": "47728f458e9a166e2a84f650c2279e78185ff9e1" }, "auth_subject": "oc-code-02", "stamped_by": "fleet 0.1.0 (native)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.