feat(api,db): showcase-completion E1 — workspace metadata & provenance backbone (#407)#414
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 the Foundation epic of umbrella #406 per
PRPs/PRP-showcase-completion-E1-metadata-provenance-backbone.md. Closes #407.d45cf40dfe47(off head324a2fa37fcc): 12 additive columns onshowcase_workspace— lifecycle (archived,pinned,notes,tags,config_schema_version), provenance (replayed_from_workspace_id— SOFT reference, deliberately no FK, not even self-referential), and six documented JSONB story slots (seed_overrides,user_scope,approval_events,rag_events,job_ids,phase_summaries— all NULL until their writer epic lands). Tags GIN index + replayed-from btree index. Upgrade/downgrade verified clean; server defaults backfill existing rows.PATCH /demo/workspaces/{workspace_id}— partial lifecycle update (rename/notes/tags/archive/pin) withexclude_unsetsemantics: explicitnullclearsname/notes; explicitnullonarchived/pinned/tagsis a 422 at the schema boundary (NOT NULL columns — send[]to clear tags);extra="forbid"; empty body = 200 no-op; missing id = RFC 7807 404.statusis NOT patchable — the pipeline owns it.DemoRunRequestgains additive Optionalreplayed_from_workspace_id(^[0-9a-f]{32}$, requirespreservation='keep'); the Showcase Replay handler sends the source row'sworkspace_id;create_workspacerecords it verbatim (no existence check — dangles are designed). Two-line frontend wiring; lineage rendering stays in E2 (feat(api,ui): showcase-completion E2 — safe replay & workspace lifecycle (confirm/diff, lineage, rename/archive/pin/tags, search, compare, link health) #408).archived/pinned/tags/replayed_from_workspace_id; detail additionally carriesnotes/config_schema_version+ the six slots. Legacy rows/frames behave byte-identically.Validation
ruff check+ruff format --check+mypy --strict+pyright --strict+ 1993 unit tests: green.contains()containment, story-slot roundtrip, PATCH round-trip): green against docker-compose Postgresupgrade head→downgrade -1→upgrade head: cleanpnpm lint(0 errors),pnpm test --run356 passed,tsc -bno new errors vs dev baseline (24 → 24)replayed_from_workspace_idwhile the source row stayed untouchedFrozen E1 contract notes for parallel-epic authors (#408–#412) are in the PRP.