feat(seed): demo-msp template generator and committed template (PSA-51) #343
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/PSA-51-demo-seed-template"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Adds
gen-demo-seed, a deterministic generator for the demo seed template the video needs (PSA-49), plus the committedbunyip-api/seed/demo-msp.jsonit produces. Load it with the PSA-50 loader to populate every admin and member surface:Deterministic by construction
The generator is a pure function of fixed input data (name pools, app catalog, index-driven status/tier assignment) with no RNG and no clock, so its output is byte-stable: re-running regenerates an identical file. It only writes JSON; it never touches a database.
demo-msp contents
@demo.psa-systems.testsharing one password: 2 admins, 3 lifetime, 3 past-due, 2 grace, 2 canceled, 3 no-membership, the rest active; 12 early-adopter price-locked; 2 unverified.(No per-user
created_at: the schema has no such field, so seeded users take the loader's insert time. Noted as a limitation - a future schema addition could spread signups.)Tests (run in the gate, no DB)
committed_template_is_up_to_date: the committeddemo-msp.jsonexactly equals the generator's output, so an edit to the generator without regenerating fails CI.generated_template_parses_and_validates: the template parses and validates against the real PSA-50 schema, with the expected section counts and distributions (42 users, 8 apps, 3 groups, 6 entitlements, 7 feedback, 3 lifetime, 12 price-locked, 2 admins, 1 spam).Verification
just check-containergreen (fmt + clippy-D warnings+cargo test --workspace --all-targets).Stacking
Stacked on the PSA-50 branch (
feat/PSA-50-seed-import-foundation) because it usesseed::parse. Base this PR on that branch; it retargets to main once PSA-50 (#342) merges.Fixes PSA-51.