Parity PR 4: emitters, facts and CMD supervision into host_bookclub (#4) #15
Loading…
Reference in a new issue
No description provided.
Delete branch "mercurius/4-pr4-emitters"
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?
Purpose (feature): the mesh emitters, the facts module and the CMD supervision live in host_bookclub, as in mcl-bookclub (DECIDED 2026-12-01 "move them into host_bookclub...mcl-bookclub-phoenix should be as much aligned with mcl-bookclub as possible!"), and each emitter has a test that it publishes. This is PR 4 of #4, the "moved" rows of the alignment plan (comment c6881) and the emitter part of gap table H.4. The subscriber tests and the flake fix follow in PR 4b, stacked on this one.
Refs #4
What changes (in commit order)
3ab510c, the move.emit_member_registered_v1_to_mesh,emit_book_procured_v1_to_meshandemit_book_retired_v1_to_mesheach get their own slice folder in host_bookclub, as in E.MclBookclubPhoenix.FactsbecomesHostBookclub.MclBookclubFacts(Emcl_bookclub_facts.erl), with the same topics, fields and wire rules, and@specs added.interested_in/0readsXxxV1.event_type(), not a literal.HostBookclub.Supervisoris its own module, likehost_bookclub_sup.erl:16-46. It starts the policy and the 3 emitters, with E's restart limits of 5 in 10 s.mcl_om ~> 1.4andmacula ~> 16.0. The facade keepsmaculafor its capability handler.esqliteis nowhere in CMD.maculaandmcl_omappear only in theemit_*_to_meshdesks and the facts module.facts_contract_testbecomesmcl_bookclub_facts_testin host_bookclub.architecture/README.md,c4_diagrams.pyand the regeneratedc4-components.svg, in the same commit, which is the repo's rule.3d1bd83, tests.emit_member_registered_v1_to_mesh_test: each of the 3 emitters publishes its fact after a real store dispatch. meck stands in for:maculaand:mcl_om([:passthrough, :no_link], as E and the repo'sevent_store_testdo), so nothing leaves the VM. Both emitter tests check skip-on-replay and the event type each one listens for.supervisor_test: the policy and the 3 emitters are the children.Closes gap rows: §C emit_member_registered, emit_book_procured, emit_book_retired, facts, CMD supervision, facade supervisor (emitters out); §F emitters.
Notes for review
mcl_om:boot/1, as in E.init/1is trivial. A publish before the mesh is up returns{:error, _}from:mcl_om.mesh_handles/0, and evoq's retry owns redelivery. Their replay policy is:skip.maculaandmcl_omapps.macula_rootstarts local workers and empty supervisors only; dialing ismcl_om:boot/1, which only the facade calls.start_subscribers), which is the flake fix.Checks (msi00, CI image, at this tip
3d1bd83)format --check-formatted, compile--warnings-as-errors, credo--strict, dialyzer: all rc 0Mutants killed:
club_name: killed by "a registered member is published as a fact".Landed by fast-forward: main is
3d1bd83a3e(fromac1fd97c), PASS r=1, CI 6215, 6216. This repository does not allow the manually-merged style, so the PR is closed by hand.Pull request closed