feat(seed): add richer showcase demo dataset with create/refresh #430

Merged
Claude-Run merged 1 commit from feat/PMS-620-showcase-seed-dataset into main 2026-07-04 05:03:05 +02:00
Member

Add an operator-triggered showcase demo seed (PMS-620) sized for the Mokosh showcase video: ~20 MSP-generic client companies (one primary contact each), ~5 projects with phases and tasks across a mix of active/planning/completed statuses, a batch of tickets, and roughly two weeks of prior time entries for the operator user (last week Monday..Friday and this week Monday..today). Both weeks are submitted and approved through the real timesheet service, so the timesheet reads as approved history and the billable entries land in ready_to_bill for a report. The whole set writes through the real tenant-scoped service layer (validation, FKs, audit rows), not hand-rolled INSERTs, following the proven QA-seed pattern. PMS-621 (the uniform file-based generator) has not landed, so this uses the sanctioned hardcoded-rows fallback.

Expose it as three server subcommands: showcase-seed (create, idempotent skip if present), showcase-refresh (teardown + re-seed in one call so a recording take can be reset without manual DB surgery), and showcase-teardown (remove). Each resolves the target tenant from --tenant or MOKOSH_SHOWCASE_TENANT_ID and is fail-closed: it refuses with zero writes unless the tenant is explicitly marked settings->>'is_showcase' = true, and never runs against an environment=production tenant, mirroring the QA seed guardrail.

Everything is SHOWCASE- name-prefixed and showcase-tagged so teardown removes exactly the seeded rows in FK order and leaves stock config intact. Compile-time asserts pin the ~20-client / ~5-project volume and unit tests cover the client/project prefixes, the two-week/all-billable time-entry spread, and the Monday week-anchor helper.

#PMS-620

Add an operator-triggered showcase demo seed (PMS-620) sized for the Mokosh showcase video: ~20 MSP-generic client companies (one primary contact each), ~5 projects with phases and tasks across a mix of active/planning/completed statuses, a batch of tickets, and roughly two weeks of prior time entries for the operator user (last week Monday..Friday and this week Monday..today). Both weeks are submitted and approved through the real timesheet service, so the timesheet reads as approved history and the billable entries land in ready_to_bill for a report. The whole set writes through the real tenant-scoped service layer (validation, FKs, audit rows), not hand-rolled INSERTs, following the proven QA-seed pattern. PMS-621 (the uniform file-based generator) has not landed, so this uses the sanctioned hardcoded-rows fallback. Expose it as three server subcommands: showcase-seed (create, idempotent skip if present), showcase-refresh (teardown + re-seed in one call so a recording take can be reset without manual DB surgery), and showcase-teardown (remove). Each resolves the target tenant from --tenant or MOKOSH_SHOWCASE_TENANT_ID and is fail-closed: it refuses with zero writes unless the tenant is explicitly marked settings->>'is_showcase' = true, and never runs against an environment=production tenant, mirroring the QA seed guardrail. Everything is SHOWCASE- name-prefixed and showcase-tagged so teardown removes exactly the seeded rows in FK order and leaves stock config intact. Compile-time asserts pin the ~20-client / ~5-project volume and unit tests cover the client/project prefixes, the two-week/all-billable time-entry spread, and the Monday week-anchor helper. #PMS-620
feat(seed): add richer showcase demo dataset with create/refresh
All checks were successful
E2E / Playwright against staging (pull_request) Successful in 48s
Check / fmt + clippy + build + tests (pull_request) Successful in 1m44s
Integration / integration tests (pull_request) Successful in 8m50s
Create release / Gate (release-branch merges only) (pull_request) Successful in 1s
Create release / Create release from merged PR (pull_request) Has been skipped
0fbbf132bb
Add an operator-triggered showcase demo seed (PMS-620) sized for the Mokosh showcase video: ~20 MSP-generic client companies (one primary contact each), ~5 projects with phases and tasks across a mix of active/planning/completed statuses, a batch of tickets, and roughly two weeks of prior time entries for the operator user (last week Monday..Friday and this week Monday..today). Both weeks are submitted and approved through the real timesheet service, so the timesheet reads as approved history and the billable entries land in ready_to_bill for a report. The whole set writes through the real tenant-scoped service layer (validation, FKs, audit rows), not hand-rolled INSERTs, following the proven QA-seed pattern. PMS-621 (the uniform file-based generator) has not landed, so this uses the sanctioned hardcoded-rows fallback.

Expose it as three server subcommands: showcase-seed (create, idempotent skip if present), showcase-refresh (teardown + re-seed in one call so a recording take can be reset without manual DB surgery), and showcase-teardown (remove). Each resolves the target tenant from --tenant or MOKOSH_SHOWCASE_TENANT_ID and is fail-closed: it refuses with zero writes unless the tenant is explicitly marked settings->>'is_showcase' = true, and never runs against an environment=production tenant, mirroring the QA seed guardrail.

Everything is SHOWCASE- name-prefixed and showcase-tagged so teardown removes exactly the seeded rows in FK order and leaves stock config intact. Compile-time asserts pin the ~20-client / ~5-project volume and unit tests cover the client/project prefixes, the two-week/all-billable time-entry spread, and the Monday week-anchor helper.

#PMS-620
Claude-Run deleted branch feat/PMS-620-showcase-seed-dataset 2026-07-04 05:03:05 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-server!430
No description provided.