LAN-first on mcl_core: the truth learner as a declared subscription, a boot without a realm (mcl-lan P5) #19
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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): mcl-graph runs on a LAN cluster through mcl_core. It hears
truth_assertedfacts from its cluster peers over the LAN and boots on a node that has no realm. Nothing changes for callers.DECIDED 2026-12-02 "I have created and cloned macula-services/mcl-core. Let's build this properly. In the end I hope we keep a single repo: mcl-core that will replace both mcl-om and mcl-lan" (Raf)
DECIDED 2026-12-02 "trust on sight. mcl-martha services should auto-cluster over LAN, no mcl-station required. Distributed Erlang offers us all we need." (Raf)
Refs macula-services/mcl-lan docs/DESIGN.md §5 (the mcl-graph row, "graph 1 + 2") and §7 P5, folded into graph's §2.3 package (martha-ai/mcl-martha#1). Builds on macula-services/mcl-core main 914650ae.
What changes
~> 1.0. Themcl_om*calls (wire, caller, ownership proof, publish, boot, health) move to theirmcl_core*names, and so do the config keys.learn_truths_from_meshsubscribes by itself today:mesh_handles, thenmacula:subscribe(..., #{sources => members})atlearn_truths_from_mesh.erl:65, 102. Instead it becomes amacula_subscribermodule named inmcl_graph_service:subscriptions/0withsources => members. mcl_core wires it on the LAN (apggroup) and, on a bridge node, also on the mesh. The learning itself stays the same: verified publisher, confidence 0.7, a non-map refused. Its/healthinput changes from "subscription held" to the subscriber process being alive.mcl_graph_facts:check_realm_name/0(:83) refuses a boot whose realm name does not hash to the configured realm. It stays for a node with a realm. A node without one (a LAN member,{error, no_realm}) boots.learn_link(:64) checks anasserted_byproof against the realm. Without a realm it still refuses withrealm_unknown, since an unchecked claim is never learned. So on the LAN a proof is checked only where a realm is configured, which is the bridge path. A plain LAN call is learned under thecallerthat mcl_core writes.Threat model (short)
sources => memberstakes every cluster node). That is as strong as distributed Erlang itself, since any member can already run code here (DESIGN §2.1). Provenance is still recorded: the publisher's node id is linkedassertedat 0.7.asserted_byon a node without a realm. Refused withrealm_unknown, never learned under the claimed identity. A test holds this.Done when
~> 1.0once 1.0.0 is on hex), with no mcl_om left in src, tests, config or CI.mcl_graph_service:subscriptions/0declarestruth_assertedwithsources => members, andlearn_truths_from_meshno longer callsmacula:subscribeormesh_handles.peernodes, as in mcl-core's LAN suites): a fact published on member node A is learned by graph on the bridge node B, which holds it, with node A's id as provenance.{mcl_graph_holder_off_mesh, member}; on a standalone node or the bridge it boots (unit tests).learn_linkwith anasserted_byis refusedrealm_unknownand learns nothing. Without one, it is learned under the writtencaller.Supervisor's ruling, relayed by Mars on 2026-12-02 (Raf may overrule): "place graph on the bridge node, like rag, so mesh-wide truth_asserted facts keep reaching it. The general rule: a service that consumes facts from off the LAN, or federates, runs on the bridge node."
How it is folded in:
store_holder) must talk to the mesh itself: a standalone release, or the cluster's bridge.mcl_graph_service:start/1refuses a holder on a LAN member with{mcl_graph_holder_off_mesh, member}. A member without the graph boots, with or without a realm.