Wave 2: mcl_om ~> 1.9, and the org lives in info/0 (mcl-mail#31) #34
Loading…
Reference in a new issue
No description provided.
Delete branch "pluto/31-om-19-singleton"
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 (mcl-martha#1): the last commit of mcl-mail#31, the step that waited on hex mcl_om 1.9.0.
Refs macula-services/mcl-mail#31, martha-ai/mcl-martha#1, macula-services/mcl-om#8, macula-services/mcl-om#11
What changes
~> 1.6to~> 1.9. 1.9.0 is on hex (checksum 76bf6386...0c76029) and holds the multi-service boot andmcl_om_singleton. The release assembles with mcl_om 1.9.0 and macula 18.3.0 in it.info/0and nowhere else. mcl_om 1.9 takes each service's org frommcl_om:service_org/1, which reads this service'sinfo/0, so the{org, <<"mcl-mail">>}line leavesconfig/sys.config.src. That line was only ever read by mcl_om 1.8 and below; keeping it would be dead in this release and, in a bundle, a second org sharing one env with every sibling service.the_config_names_no_org_testfails if a config org comes back, and the newthe_org_mcl_om_boots_with_comes_from_info_testclears themcl_omenv, calls mcl_om's own decision function, and requires this service's org, so the answer proves info/0 supplied it.mcl_mail_sup, beside where a singleton child would go.What to check
orgremains inconfig/sys.config.srcand no code falls back to it:info/0'sorgis the only source in the service.mcl_omorg env (grep is clean; the test fixture setting it is the round-trip test's own configure, not a product path).Verified locally
OTP 28.4.3 / rebar 3.28.0:
rebar3 compileclean,MCL_LINT=1 rebar3 lintclean,rebar3 eunit158 tests, no failures,rebar3 dialyzerclean, andrebar3 as prod releaseassembles withmcl_om-1.9.0andmacula-18.3.0in it. A boot of that release is not run here: the shipped config is{mesh, required}, so a boot would reach the live realm's stations and claim. The org path is proven by mcl_om's ownservice_org/1with the env cleared, pluschecked_orgon the answer.C6 completes with the pin. mcl_om 1.9 boots several services in one node and takes each one's org from its own info/0 (`mcl_om:service_org/1', mcl-om#8), so the `{org, <<"mcl-mail">>}' line leaves config/sys.config.src: the `mcl_om' app env is one value per VM, and in a bundle every service on the node would share it, which is the one thing an org per service must not do. The drift test becomes its mirror. `the_config_names_no_org_test' fails if the line comes back, and `the_org_mcl_om_boots_with_comes_from_info_test' calls mcl_om's own decision function with that env cleared, so the answer being this service's org is what proves info/0 supplied it. No side effect is wrapped in mcl_om_singleton, and that is a decision: A3 package 4 lists six wave-2 services with per-node work, mail has none (no mesh publish or subscribe; the read model is one ETS table per node that every node must fill), and what a double run would do if that ever changes is written down in mcl_mail_sup. Verified on OTP 28.4.3: rebar3 compile, MCL_LINT=1 rebar3 lint, rebar3 eunit (158 tests), rebar3 dialyzer, and `rebar3 as prod release' assembles with mcl_om 1.9.0 and macula 18.3.0.