feat: ForecastOps Control Center — Full Version (model health, incident export, action layer)#220
Conversation
There was a problem hiding this comment.
Sorry @w7-mgfcode, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Implements PRP-25 (
PRPs/PRP-25-forecastops-control-center-full.md), taking the ForecastOps Control Center from its PRP-24 MVP to the Full Version. Closes #219.What changed
Phase A — Model Health & Drift (
feat(api))GET /ops/model-healthendpoint. Classifies forecast-error (WAPE) performance drift per(store, product)grain from the full successful-run history —improving/stable/degrading/unknown, ±10% relative band.classify_drift()— a pure, totally-defined helper (never raises, toleratesNonegaps); mirrors PRP-24'sscore_retraining_candidatepattern./opsModel Health section with drift badges + WAPE delta.Phase B — Incident Report Export (
feat(ui))incident-report.ts— pure builders: a CSV column set + a Markdown incident report assembled entirely client-side from already-loaded page data.Phase C — Action Layer (
feat(ui))POST /jobs(neverPromise.all— jobs run synchronously server-side), per-item toast.POST /registry/aliases.Vision-alignment notes (per
.claude/rules/product-vision.md)/opspage is now an action launcher. Phase C calls the existing, already-sanctionedPOST /jobsandPOST /registry/aliasesendpoints — no newPOST /ops/*mutating endpoint is added. Theopsbackend slice stays read-only (nomodels.py, no Alembic migration). This mild tension is accepted: the Forecast page already triggers train jobs the same way./ops/summary15s,use-jobs.ts5s) already delivers live job state. A WS would be a separate PRP if ever wanted.Validation
ruff+ruff format,mypy --strict,pyright --strict— clean.pytest— 1158 unit + 205 integration passing (fresh DB).tsc+lint(0 errors) +vitest— 84 tests passing./ops: Model Health renders with drift badges, CSV + Markdown export download, bulk-retrain creates a (verified completed) train job, promote creates an alias.No new dependency.