feat(api,ui): showcase-completion E4 — run-config phase controls (#410)#417
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 |
Summary
Implements E4 — run-config phase controls (epic #410, umbrella #406): start-frame-time run configuration for the showcase pipeline. An operator on
/showcasecan 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.Lockpipeline 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— publicKNOWN_MODEL_TYPESallow-list (drift-locked) so the demo slice validates models without importing a sibling slice.app/features/demo/schemas.py—DemoBacktestConfig;DemoRunRequest.{train_model_types,backtest}(additive Optional);WorkspaceListItem.run_config.app/features/demo/models.py+ migrationb7c1d9e3f204— nullablerun_configJSONB replay-input column (not an E1 story slot; see DOMAIN_MODEL D1).app/features/demo/workspace.py—create_workspacerecordsrun_config(NULL on defaults).app/features/demo/pipeline.py—ResolvedRunConfigthreads selection/split/metric;step_trainfail-fast on a disabled opt-in flag (D6);step_backtestunified custom-selection loop + metric-driven winner (D4);step_v2_trainhonors the horizon (D8);pipeline_completeechoes the config.app/features/model_selection/—CandidateModelInfo.enabledoverlaid in the service from theforecast_enable_*flags (D3;capabilities.pystays pure).Frontend
run-config-utils.ts(defaults, dirty-rule helpers, train-plan, split-fit warning,parseRunConfig);DemoBacktestSettingsForm;RunConfigPanel(enabled-filtered picker + form + preview);showcase.tsxwiring (dirty-only inclusion, Load/Replay repopulation);WorkspacePanelconfig badge;buildReplayRequestforwardsrun_configverbatim;types/api.tstypes.Docs — additive notes in API_CONTRACTS, DOMAIN_MODEL, RUNBOOKS (incidents 30–31).
Validation
ruff format --check, mypy strict, pyright 0 errors,pnpm lint✅enabledoverlay, 422 paths (unknown/duplicate/gap≥horizon), full custom run green (winner byrmse,run_configpersisted on list+detail), legacy run byte-identical ✅Notes
GET /model-selection/modelsisn't indocs/_base/API_CONTRACTS.md(the slice predates the heuristic doc), so theenabledfield behavior is documented in the demo rows rather than a one-off endpoint row.Closes #410.