Skip to content

feat: ForecastOps Control Center — Full Version (model health, incident export, action layer)#220

Merged
w7-mgfcode merged 2 commits into
devfrom
feat/ops-control-center-full
May 19, 2026
Merged

feat: ForecastOps Control Center — Full Version (model health, incident export, action layer)#220
w7-mgfcode merged 2 commits into
devfrom
feat/ops-control-center-full

Conversation

@w7-mgfcode
Copy link
Copy Markdown
Owner

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))

  • New read-only GET /ops/model-health endpoint. 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, tolerates None gaps); mirrors PRP-24's score_retraining_candidate pattern.
  • New /ops Model 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.
  • "Export report" dropdown in the page header — CSV (attention items) and Markdown (full report).

Phase C — Action Layer (feat(ui))

  • Retraining Queue gains row checkboxes + "Retrain selected (N)" → confirm dialog → sequential POST /jobs (never Promise.all — jobs run synchronously server-side), per-item toast.
  • "Promote to alias" on Model Health / candidate rows → confirm dialog → POST /registry/aliases.

Vision-alignment notes (per .claude/rules/product-vision.md)

  • The /ops page is now an action launcher. Phase C calls the existing, already-sanctioned POST /jobs and POST /registry/aliases endpoints — no new POST /ops/* mutating endpoint is added. The ops backend slice stays read-only (no models.py, no Alembic migration). This mild tension is accepted: the Forecast page already triggers train jobs the same way.
  • WebSocket live job updates were assessed and deliberately declined. The feature brief lists WS job updates under "Full Version", but that conflicts with the non-streaming product vision. Existing polling (/ops/summary 15s, use-jobs.ts 5s) 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).
  • Frontend tsc + lint (0 errors) + vitest — 84 tests passing.
  • Browser-dogfooded on /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.

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @w7-mgfcode, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 19, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a4d25bdf-fd60-4851-baa7-b706a48865f3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/ops-control-center-full

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@w7-mgfcode w7-mgfcode merged commit 1f65ffc into dev May 19, 2026
8 checks passed
@w7-mgfcode w7-mgfcode deleted the feat/ops-control-center-full branch May 19, 2026 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant