Skip to content

feat(api,ui): showcase-completion E4 — run-config phase controls (#410)#417

Merged
w7-mgfcode merged 4 commits into
devfrom
feat/showcase-run-config-phase-controls
Jun 13, 2026
Merged

feat(api,ui): showcase-completion E4 — run-config phase controls (#410)#417
w7-mgfcode merged 4 commits into
devfrom
feat/showcase-run-config-phase-controls

Conversation

@w7-mgfcode

Copy link
Copy Markdown
Owner

Summary

Implements E4 — run-config phase controls (epic #410, umbrella #406): start-frame-time run configuration for the showcase pipeline. An operator on /showcase can pick which forecasting models the pipeline trains/backtests, tune the backtest split + winner-ranking metric (WAPE/MAE/RMSE), preview exactly what will run, and find the config recorded on the saved workspace and replayed verbatim. No mid-run re-entry — the linear single-asyncio.Lock pipeline is preserved; all config is start-frame-only. Every change is additive: a legacy frame behaves byte-identically.

Changes

Backend

  • app/shared/model_taxonomy.py — public KNOWN_MODEL_TYPES allow-list (drift-locked) so the demo slice validates models without importing a sibling slice.
  • app/features/demo/schemas.pyDemoBacktestConfig; DemoRunRequest.{train_model_types,backtest} (additive Optional); WorkspaceListItem.run_config.
  • app/features/demo/models.py + migration b7c1d9e3f204 — nullable run_config JSONB replay-input column (not an E1 story slot; see DOMAIN_MODEL D1).
  • app/features/demo/workspace.pycreate_workspace records run_config (NULL on defaults).
  • app/features/demo/pipeline.pyResolvedRunConfig threads selection/split/metric; step_train fail-fast on a disabled opt-in flag (D6); step_backtest unified custom-selection loop + metric-driven winner (D4); step_v2_train honors the horizon (D8); pipeline_complete echoes the config.
  • app/features/model_selection/CandidateModelInfo.enabled overlaid in the service from the forecast_enable_* flags (D3; capabilities.py stays pure).

Frontend

  • run-config-utils.ts (defaults, dirty-rule helpers, train-plan, split-fit warning, parseRunConfig); DemoBacktestSettingsForm; RunConfigPanel (enabled-filtered picker + form + preview); showcase.tsx wiring (dirty-only inclusion, Load/Replay repopulation); WorkspacePanel config badge; buildReplayRequest forwards run_config verbatim; types/api.ts types.

Docs — additive notes in API_CONTRACTS, DOMAIN_MODEL, RUNBOOKS (incidents 30–31).

Validation

  • L1 — ruff + ruff format --check, mypy strict, pyright 0 errors, pnpm lint
  • L2 — 2066 backend unit + 446 frontend vitest ✅
  • L3 — migration up→down→up clean · 29 demo integration tests · live HTTP probes: catalog enabled overlay, 422 paths (unknown/duplicate/gap≥horizon), full custom run green (winner by rmse, run_config persisted on list+detail), legacy run byte-identical
  • L4 — browser dogfood: panel renders, disabled opt-ins hidden, picker/form/preview work ✅

Notes

  • GET /model-selection/models isn't in docs/_base/API_CONTRACTS.md (the slice predates the heuristic doc), so the enabled field behavior is documented in the demo rows rather than a one-off endpoint row.

Closes #410.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

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

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown

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: bc12e73f-cb55-48a8-80f1-c322435ea396

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/showcase-run-config-phase-controls

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 ce12037 into dev Jun 13, 2026
10 checks passed
@w7-mgfcode w7-mgfcode deleted the feat/showcase-run-config-phase-controls branch June 13, 2026 06:01
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