Wave 2: kanban names its own store, org, keys and data root, and boots under the bundle #12
Loading…
Reference in a new issue
No description provided.
Delete branch "juno/11-wave2-bundle"
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?
Wave 2 of the one mcl-martha release: mcl-kanban stops assuming it is alone in a VM.
Refs macula-services/mcl-kanban#11
Refs martha-ai/mcl-martha#1
Refs macula-services/mcl-om#8
What changed
GuideCardLifecycle.Storeis the one place this board's store is named:id/0is the single definition,dispatch/1is the one way the board dispatches, andLiveStatenames the same store when it starts an aggregate. All 16 dispatch sites go through it. The:evoq, :store_idenv stays set -- evoq still falls back to it for a projection replay that carries no store -- but no read of the board's own goes through it.MclKanban.Service.org/0is the org's one definition, carried ininfo/0(where mcl_om reads it from a2aa62e3 on) and set into the shared:mcl_om, :orgenv, which is what mcl_om 1.8.0 reads. The four crew keys move to:guide_card_lifecycle, with their defaults in that app'sapplication/0env.:mcl_kanban, :bundledonly skips the app's ownmcl_om:boot.MclKanban.Service.start/1is idempotent: it starts the named supervisor and answers{:error, {:already_started, pid}}with{:ok, pid}, so the race is settled by the name and not by a check-then-start.MCL_DATA_DIR, published as:mcl_kanban, :data_root; the subdir comes from:mcl_kanban, :data_subdir, whose default (empty) lives in the app module. Empty is no subdir, so the standalone release's files stay exactly where they always were. The node's identity key and health socket stay at the root, shared by every service in a bundle.config/runtime.exsinto the app modules and app env, which is what a dependency can carry.bin/startof ours still migrates.bin/migrateandbin/startare untouched.Not in this PR
CrewStandingReconciler.mcl_om_singletonexists only from mcl-oma2aa62e3(mcl-om#8), which is in no tag: hex serves 1.8.0 and 1.9.0 waits on a Raf yes. The wrap lands as the last commit here once the pin moves to~> 1.9.mode, which stays:single(it must not ship before reckon-db#2).Proof
mix format --check-formatted,mix credoandmix dialyzerclean on the same tree.Store.dispatchignoring the store;Store.id/0falling back to the env; each of the four crew reads slid back to:mcl_om;data_path/0ignoring the subdir;bundled?hardcoded;start/1without thealready_startedclause; the migration switch ignored in either direction./healthansweredokwith"org":"mcl-kanban", and its data landed at the root with no subdir (kanban.sqlite3,mcl_kanban_store/,identity/identity.key) -- the backward-compatibility check.C7 -- one shape, bundled or not. MclKanban.Application always starts this service's tree; `:mcl_kanban, :bundled` only skips the app's own mcl_om:boot, because a release hosting several services boots them all from one list and a second boot from inside an app would fight it. MclKanban.Service.start/1 is idempotent: it starts the NAMED supervisor and answers `{:error, {:already_started, pid}}` with `{:ok, pid}`, so the caller that arrives second gets the tree already running and the race is settled by the name rather than by a check-then-start. The boot function is a seam, so the test hands a spy and counts calls instead of reading a log. C8 -- one shared data root, one subdir per service. The root is MCL_DATA_DIR, published as `:mcl_kanban, :data_root`; the subdir comes from `:mcl_kanban, :data_subdir`, whose default (empty) lives in the app module (C9) and not in this repo's runtime.exs, so a release hosting several services sets one per service and nothing overwrites it on the way. Empty is no subdir, which keeps the standalone release's files exactly where they always were. The node's identity key and its health socket stay at the root -- shared by every service in a bundle -- and only the store dir and kanban.sqlite3 take the subdir. Mutants caught by name: bundled? hardcoded false; start/1 without the already_started clause; data_path ignoring the subdir; and the four crew reads slid back to `:mcl_om`.