GeezerVison is showing github.com — impl(quota-plane): stage-3 S7 — weekly forecast-accuracy review job: fold accuracy back into the rules · Issue #12701 · developing-today/code
impl(quota-plane): stage-3 S7 — weekly forecast-accuracy review job: fold accuracy back into the rules #12701DescriptionStage-3 epic #12694, slice S7. Design record: doc/2026-11-22T22-35-00Z_design_quota-plane-stage-3/ (issue #1177; hub copy files/stage-3-design-2026-11-22.md in the usage-billing-hub goal files).
Gate: work starts after Drew's review of the Stage-3 design doc (per #1177's method).
Scope: A scheduled weekly job (registered in doc/fleet-schedule-registry.md in the same pass, per the schedule rule) that posts the forecast-accuracy report to epic #12694: per-pool projected-vs-realized for the week, detector findings from S5, and any rule adjustments the accuracy record warrants — adjustments themselves proposed through the S6 PR mechanism, never edited in place.
Acceptance criteria
Activitydeveloping-today commented on Nov 22, 2026 dezren39 commented on Nov 23, 2026 agent-note:v1
event: claim
by: lane US (archer seat, fleet fix lane)
at: 2026-11-23
Claiming #12701 (S7 weekly forecast-accuracy review job) via the fleet queue shortlist. Gate check: the Stage-3 design was approved by Drew 2026-11-22 (decision recorded on #12694, PR #12702 merged), so the design-review gate in this issue's body is lifted. Plan: one feature-slice PR — the weekly review job implementation + fleet schedule registry entry — then the first weekly report posted on #12694 by the job. dezren39 commented on Nov 23, 2026 agent-note:v1
event: progress
by: lane US (archer seat, fleet fix lane)
at: 2026-11-23
re: #12701 — S7 weekly forecast-accuracy review job
Done
The S7 job exists, is scheduled in configuration, and has run live once end to end.
Code — PR #13263 (merged cafdfdc5c9c3): src/quota-weekly-review.ts (pure review core), scripts/quota-weekly-review.ts (the job; package script review:quota-weekly), the pm-aggregator-quota-weekly-review package entry point, the NixOS quota-weekly-review service + timer, and the registry row. Follow-up PR #13270 (merged 45a3672f6d7f): the unit passes the laptop's real gh path (/etc/profiles/per-user/user/bin/gh) — the first live run found S6's default /usr/bin/gh does not exist on the laptop and the proposal step failed with ENOENT before any mutation; worth knowing for any future run of S6's script with defaults on this machine.
Acceptance criteria
- First weekly report posted on epic epic(quota-plane): Stage 3 — predictive, self-tuning quota operations #12694 by the job — epic(quota-plane): Stage 3 — predictive, self-tuning quota operations #12694 (comment) (week 2026-11-16 → 2026-11-23: 1,213 forecasts scored across 17 pools with per-pool precision/recall and wall error, 17 detector findings, the all-history S2 rollup, and the pace_hold section naming S4 impl(quota-plane): stage-3 S4 — live forecast-driven admission: pace_hold from projected exhaustion #12698 as not yet live).
- Job in the fleet schedule registry with cadence + owner —
doc/fleet-schedule-registry.md §2b row for quota-weekly-review.timer (OnCalendar=Mon *-*-* 07:20:00, owner/scope recorded). The timer itself is Nix-configured in nixos/services/pm-stack beside the weekly digest; activation lands with the next laptop NixOS deploy from the primary clone, the fleet's normal deploy path — the registry row records it as Nix-configured pending deployment until then.
- At least one rule consequence in the first two reports — the first report's §5 fold opened proposal PR proposal(quota-plane): lower the caution threshold NEAR_PCT 80 → 75 — pools enter caution at a lower measured percent (weekly walls arrive systematically early) #13265 (
caution-margin:NEAR_PCT:80->75, through S6's PR-only mechanism, with its evidence pack and the generator's evidence gaps recorded in the report).
Verification
- New tests
src/quota-weekly-review.test.ts: 7/7 (32 assertions, hand-computed fixture oracles). Neighbouring quota suites in the same run: 88/88 across 7 files; bunx tsc --noEmit clean.
- Remote dispatch attempted first (fleet run 45174756027): failed with
bun: command not found in 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; the verifying route is the laptop runs above.
nix build .#pm-aggregator succeeds and the packaged binary enforces the argument contract; the amd configuration evaluates the new timer (Mon *-*-* 07:20:00, Persistent) and service (oneshot, ExecStart rendering to the packaged binary with --open-prs --post).
Closing: every acceptance criterion is evidenced above. The one operational remainder — timer activation at the next laptop deploy — is recorded in the registry row itself and is not one of this issue's criteria.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|