feat(api): showcase workspace persistence backbone (#390)#394
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 E1 — Persistence Backbone of the showcase-workspace initiative (umbrella #389, epic #390). The demo slice gains its first persistence: a
showcase_workspacetable that records a preserved showcase run's configuration plus the soft-reference ids of every object the pipeline created.app/features/demo/models.py— newShowcaseWorkspaceORM model (first table owned by the demo slice). No ForeignKeys tomodel_run/scenario_plan/batch_job/agent_session— recorded ids are opaque soft references, by design (documented in the model docstring).alembic/versions/324a2fa37fcc_...— create-table migration off heade4f5a6b7c8d9; applies + downgrades cleanly;alembic checkreports no drift (env.py registers the demo models).DemoRunRequestgains additive Optionalpreservation: 'ephemeral'|'keep'(default'ephemeral'— legacy behaviour byte-identical) andworkspace_name(registry-alias pattern, ≤100 chars; requirespreservation='keep', else 422 problem+json).app/features/demo/workspace.py— create/finalize (warn-and-continue: a DB failure never breaks the demo pipeline) + unrouted get/list helpers for tests and E4 (feat(api,ui): showcase-workspace E4 — workspace restore/replay (list/load workspaces + replay through the run path) #393).run_pipelinecreates the row before the first step and finalizes it (completed/failed + collected ids + winner/WAPE/wall-clock) before the final yield — the mid-run-failure path records partialcreated_objectstoo.pipeline_complete.dataandDemoRunResultgain additiveworkspace_id.docs/_base/API_CONTRACTS.md— additive contract notes; PRP tracked underPRPs/.Validation
ruff check+ruff format --check+mypy --strict+pyright --strict+ unit suite (1952 passed) all greenalembic check: no new upgrade operationskeep→completedrow with real ids (winning_run_id,agent_session_id, alias, train model types); ephemeral → zero rows,workspace_id: null;workspace_namewithoutkeep→ 422application/problem+jsonCloses #390