Skip to content

feat(api,ui): showcase advanced seed config and scope selection (#409)#416

Merged
w7-mgfcode merged 5 commits into
devfrom
feat/showcase-completion-e3-seed-config-scope
Jun 13, 2026
Merged

feat(api,ui): showcase advanced seed config and scope selection (#409)#416
w7-mgfcode merged 5 commits into
devfrom
feat/showcase-completion-e3-seed-config-scope

Conversation

@w7-mgfcode

Copy link
Copy Markdown
Owner

Summary

Implements showcase-completion E3 #409 (Parallel after Foundation E1 #407, umbrella #406): an allow-listed nested seed-override contract, a store/product focus-pair selector, and replay-verbatim persistence of both into the E1 workspace story slots.

Backend

  • app/shared/seeder/overrides.py (NEW) — SeederOverrides: 7 curated knobs (stores, products, window_days, sparsity, promotion_intensity, stockout_intensity, noise_sigma), ConfigDict(strict=True, extra="forbid") — an unknown knob is a 422 (umbrella risk-1 mitigation, machine-enforced).
  • POST /seeder/generate — additive Optional overrides object; _apply_seed_overrides applied LAST in _build_config_from_params (wins over the scalar stores/products/sparsity); dataclasses.replace preserves preset character (sparse gaps, region/category lists). Absent = byte-identical (regression-tested).
  • DemoRunRequest — additive seed_overrides + user_scope with two cross-field validators: overrides require skip_seed=false; window_days rejected on the calendar-pinned holiday_rush; {} normalizes to None.
  • Pipelinestep_seed forwards overrides verbatim and echoes effective dims + overrides_applied; step_status validates a user_scope pair via /dimensions/*/{id}, adopts it ("(user-selected)"), or WARNS + falls back to discovery on a dangling pair (replay of a reset=true workspace can never hard-fail).
  • Workspacecreate_workspace records both story slots (sparse JSON / NULL, inside the warn-and-continue try); slots exposed on WorkspaceListItem (replay reads list rows; Detail inherits).

Frontend

  • SeedConfigPanel (collapsible 7-knob panel, gated on Re-seed first, holiday_rush window lock, NaN-WAPE caveat badge, live summary) + ScopeSelector (live /dimensions dropdowns + preview card with seeded window).
  • buildReplayRequest extended — replay re-submits recorded seed_overrides/user_scope verbatim; legacy rows stay byte-identical. Load repopulates panel + selector; Reset tick clears the scope (ids re-issue); Re-seed untick clears overrides.

Docs

  • API_CONTRACTS (seeder/demo/WS/workspaces rows), RUNBOOKS (showcase incident 29 + workspace-section scope update), DOMAIN_MODEL (authoritative slot schemas, requested-vs-effective grain).

ZERO migrations (E1 #407 owns the schema); no new endpoints; all changes additive.

Test plan

  • Backend gates: ruff + format + mypy --strict + pyright --strict + 2045 unit tests
  • Frontend: pnpm lint + 420 vitest; no new tsc -b errors in touched files
  • Integration (fresh DB): workspace slot persistence, demo+seeder slices, new e2e test_demo_replay_preserves_seed_overrides_and_scope (replay-verbatim slots + dangling-scope warn-fallback)
  • Real-browser dogfood (Playwright/Chromium): panel gating/clearing, holiday_rush window lock, Reset scope-clear caveat, overridden 8×20 keep-run green with truthful seed/status cards, panel Replay through the confirm dialog → identical slots + replayed_from_workspace_id lineage

Closes #409

@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: 0464697f-31e3-4544-82c7-4b6604414282

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-completion-e3-seed-config-scope

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 195b384 into dev Jun 13, 2026
8 checks passed
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