Skip to content

feat(api,db): showcase-completion E1 — workspace metadata & provenance backbone (#407)#414

Merged
w7-mgfcode merged 4 commits into
devfrom
feat/showcase-completion-e1-metadata-provenance
Jun 12, 2026
Merged

feat(api,db): showcase-completion E1 — workspace metadata & provenance backbone (#407)#414
w7-mgfcode merged 4 commits into
devfrom
feat/showcase-completion-e1-metadata-provenance

Conversation

@w7-mgfcode

Copy link
Copy Markdown
Owner

Summary

Implements the Foundation epic of umbrella #406 per PRPs/PRP-showcase-completion-E1-metadata-provenance-backbone.md. Closes #407.

  • Migration d45cf40dfe47 (off head 324a2fa37fcc): 12 additive columns on showcase_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) with exclude_unset semantics: explicit null clears name/notes; explicit null on archived/pinned/tags is 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. status is NOT patchable — the pipeline owns it.
  • Replay provenanceDemoRunRequest gains additive Optional replayed_from_workspace_id (^[0-9a-f]{32}$, requires preservation='keep'); the Showcase Replay handler sends the source row's workspace_id; create_workspace records 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).
  • Responses — list items additively carry archived/pinned/tags/replayed_from_workspace_id; detail additionally carries notes/config_schema_version + the six slots. Legacy rows/frames behave byte-identically.
  • Docs — API_CONTRACTS + DOMAIN_MODEL (authoritative per-slot schemas — umbrella junk-drawer mitigation) + RUNBOOKS out-of-scope trim.

Validation

  • ruff check + ruff format --check + mypy --strict + pyright --strict + 1993 unit tests: green
  • Demo-slice integration suite (28 tests incl. tags .contains() containment, story-slot roundtrip, PATCH round-trip): green against docker-compose Postgres
  • Migration upgrade headdowngrade -1upgrade head: clean
  • Frontend: pnpm lint (0 errors), pnpm test --run 356 passed, tsc -b no new errors vs dev baseline (24 → 24)
  • Level-4 manual smoke on a live stack: keep-run → PATCH rename/notes/tags/pin → 404/422 paths → replay-shaped run recorded replayed_from_workspace_id while the source row stayed untouched

Frozen E1 contract notes for parallel-epic authors (#408#412) are in the PRP.

@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 12, 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: 6f13e073-e549-40f9-a8ed-710fe70a8401

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-e1-metadata-provenance

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.

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