feat(seed): extend qa-seed with assets, KB, SLA, and appointments (PSA-55) #431
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/PSA-55-qa-seed-demo-gaps"
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?
The Mokosh demo (PSA-49) needs the assets, knowledge-base, SLA, and dispatch/calendar surfaces populated. mokosh-server already has a complete operator seed -
qa-seed(PMS-331) - covering companies/contacts/tickets/projects/time/contracts/invoices, so rather than build a second (file-driven) seed this extends the existing qa-seed, reusing itsis_qafail-closed guard, idempotency, and teardown.Added to the QA walkthrough dataset
All writes go through the tenant-scoped service layer (
AssetsService,KbService,SlaService,CalendarService); every record carries theQA-name prefix /qa-seedtag; teardown removes the new entities before the companies/tickets/projects they reference;QaReportgained matching counters and itsDisplay/doc were updated.Scope calls
AssetsServiceis built with a zero encryption key: the seed only creates plain assets/asset types, never the encrypted asset secrets (credentials / configuration items) that are the sole users of the key (PMS-188 removed the zero-keynew).Verification
cargo fmt --all --check+cargo clippy -p mokosh-server --all-targets -- -D warningsgreen in the pinnedrust-builder-*:v1.0.1-rust1.94-trixiecontainer (no local toolchain on this box). Runtime seeding is not exercised here (no Postgres): the create path is service-layer and compile-checked; the teardown SQL table/column names are grounded in each module's insert statements/models but not runtime-verified.Operator note
qa-seedshort-circuits when QA companies already exist, so an already-seeded QA tenant needsmokosh-bootstrap qa-teardown --tenant <id>thenqa-seedto pick up the new entities. A fresh QA tenant gets everything in one run.Fixes PSA-55.