fix(catalog): correct stale Mokosh app names and disable vervain-agent (BUNYIP-374) #371
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/BUNYIP-374-applications-catalog-names-vervain"
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?
Fixes BUNYIP-374. This is the root-cause fix for PMS-667 (the stale mokosh-server applications list); traced there, the source is entirely bunyip.
Context
The hub admin "Applications" page is backed by bunyip's
applicationscatalog, seeded bymigrations/20260602000050_seed_distribution_catalog.sqlwith canonical "Mokosh" names andis_active = TRUE, viaINSERT ... ON CONFLICT (slug) DO NOTHING. Staging still shows the oldMokash/mokashdisplay names and an activeVervain Agent. Those old strings are not in any source (migrations, seed JSON, and git history all say "Mokosh";git log -i -S "Mokash"is empty) - they are live rows in staging's DB from an out-of-band seed or a manual admin edit, and the seed'sDO NOTHINGcan never correct them. mokosh-server does not produce this list.Change
migrations/20260715000010_fix_applications_catalog_names_and_vervain.sql- a one-time correction:UPDATE applications SET display_name = 'Mokosh Server' / 'Mokosh API' / 'Mokosh Web'for the mokosh slugs, scopedAND display_name <> '<canonical>'so already-correct / fresh rows are untouched and only the stale ones are rewritten.UPDATE applications SET is_active = FALSE WHERE slug = 'vervain-agent'.On a fresh DB it runs after the seed, so the name updates are a no-op and vervain-agent is simply disabled. On staging it corrects the stale rows. vervain-agent is disabled everywhere by default (PMS-667 decision); a deployment enables it in the admin UI when it ships, and that enable persists because the migration runs once.
tests/applications_catalog.rsasserts the post-migration catalog: mokosh apps have the canonical "Mokosh" names, no "Mokash" survives, and vervain-agent is inactive. Env-gated likerls_isolation.rs(needsBUNYIP_TEST_DATABASE_URL/RLS_TEST_DATABASE_URL; skips otherwise).Verification
Mokash Server/Mokash API/mokash www, active vervain-agent, plus an unrelateddrillmark): names corrected to canonical, vervain-agent flipped to inactive, the unrelated app untouched.just check-containergreen: fmt + clippy +cargo test --workspace --all-targets(the new test compiles and runs; it skips without a test-DB env var, matching the repo's existing integration-test posture).