mcl-graph#19: on mcl_core, LAN first; the truth learner as a declared subscription, the holder on the mesh #20

Open
neptunus wants to merge 7 commits from neptunus/19-lan-mcl-core into main
Member

mcl-lan P5 for mcl-graph (macula-services/mcl-lan docs/DESIGN.md §5, "graph 1 + 2"), with the Supervisor's placement ruling folded in. Refs #19.

What changes

  • mcl_om → mcl_core (git pin on mcl-core main 914650ae until 1.0.0 is on hex, then ~> 1.0).
  • Graph 1: learn_truths_from_mesh becomes a macula_subscriber declared in mcl_graph_service:subscriptions/0 (sources => members), on the holder only. mcl_core wires it on the LAN (pg) and, on a node on the mesh, on the mesh too. The pool/resubscribe code goes. /health loses its not_hearing_truths input, because the subscription is now mcl_core's to keep and to report.
  • Graph 2: check_realm_name/1. The holder needs a realm. A member without the graph may have none ({error, no_realm}), and a realm that is set must still match. learn_link keeps refusing asserted_by with realm_unknown where no realm is set.
  • Placement (Supervisor ruling, #19 c8480): a holder on a LAN member refuses to boot with {mcl_graph_holder_off_mesh, member}. It runs standalone or on the bridge, so mesh-wide truth_asserted facts still reach it.

Proof (local, OTP 28)

  • rebar3 lint, rebar3 dialyzer and rebar3 eunit are green (154 tests). This includes mcl_graph_lan_tests: two peer nodes with gossip TTL 0, so nothing leaves the host. A member publishes a truth, and the graph on the bridge learns it at 0.7, with the member's node id linked asserted. It passed 3 times in a row on its own.
  • Mutants, 7 of 7 killed on an assertion:
    • placement removed
    • realm always required
    • any realm error accepted
    • the no-realm clause dropped
    • no subscription (killed by the LAN test)
    • open sources
    • provenance replaced (killed by the LAN test)
mcl-lan P5 for mcl-graph (macula-services/mcl-lan docs/DESIGN.md §5, "graph 1 + 2"), with the Supervisor's placement ruling folded in. Refs #19. ## What changes - **mcl_om → mcl_core** (git pin on mcl-core main 914650ae until 1.0.0 is on hex, then `~> 1.0`). - **Graph 1:** `learn_truths_from_mesh` becomes a `macula_subscriber` declared in `mcl_graph_service:subscriptions/0` (`sources => members`), on the holder only. mcl_core wires it on the LAN (`pg`) and, on a node on the mesh, on the mesh too. The pool/resubscribe code goes. /health loses its `not_hearing_truths` input, because the subscription is now mcl_core's to keep and to report. - **Graph 2:** `check_realm_name/1`. The holder needs a realm. A member without the graph may have none (`{error, no_realm}`), and a realm that is set must still match. `learn_link` keeps refusing `asserted_by` with `realm_unknown` where no realm is set. - **Placement (Supervisor ruling, #19 c8480):** a holder on a LAN member refuses to boot with `{mcl_graph_holder_off_mesh, member}`. It runs standalone or on the bridge, so mesh-wide `truth_asserted` facts still reach it. ## Proof (local, OTP 28) - `rebar3 lint`, `rebar3 dialyzer` and `rebar3 eunit` are green (154 tests). This includes `mcl_graph_lan_tests`: two `peer` nodes with gossip TTL 0, so nothing leaves the host. A member publishes a truth, and the graph on the bridge learns it at 0.7, with the member's node id linked `asserted`. It passed 3 times in a row on its own. - Mutants, 7 of 7 killed on an assertion: - placement removed - realm always required - any realm error accepted - the no-realm clause dropped - no subscription (killed by the LAN test) - `open` sources - provenance replaced (killed by the LAN test)
- mcl_om -> mcl_core (git pin on mcl-core main 914650ae until 1.0.0 is on hex).
- learn_truths_from_mesh is a macula_subscriber named in
  mcl_graph_service:subscriptions/0 (sources => members), on the holder
  only; mcl_core wires it on the LAN and, on a node on the mesh, the mesh.
  The pool/resubscribe code and the hearing input to /health go: the
  subscription is mcl_core's to keep and to report.
- Placement (Supervisor ruling): a graph holder on a LAN member is refused
  at boot, {mcl_graph_holder_off_mesh, member}; it runs standalone or on
  the bridge, where mesh-wide truth_asserted facts still reach it.
- The realm: required on the holder; a member without the graph may have
  none, and one that has a realm is still checked.
- Two-node LAN test (peer, gossip TTL 0): a member's truth is learned by
  the graph on the bridge with the member's node id as provenance.

Refs macula-services/mcl-graph#19
mcl-graph#19: line lengths and an aligned continuation
All checks were successful
c4 model / c4-model-1 (pull_request) Successful in 9s
c4 model / c4-model (pull_request) Successful in 0s
lint-and-test / check (pull_request) Successful in 6m32s
lint-and-test / The tested lock arrives whole (pull_request) Successful in 1s
df971eb35f
mcl-graph#19: every desk export => mesh (Supervisor ruling A): mesh callers keep learn_link and the resolve desks
All checks were successful
c4 model / c4-model-1 (pull_request) Successful in 6s
c4 model / c4-model (pull_request) Successful in 0s
lint-and-test / check (pull_request) Successful in 7m0s
lint-and-test / The tested lock arrives whole (pull_request) Successful in 4s
dac71c0265
All checks were successful
c4 model / c4-model-1 (pull_request) Successful in 6s
c4 model / c4-model (pull_request) Successful in 0s
lint-and-test / check (pull_request) Successful in 7m0s
lint-and-test / The tested lock arrives whole (pull_request) Successful in 4s
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'neptunus/19-lan-mcl-core:neptunus/19-lan-mcl-core'
git switch 'neptunus/19-lan-mcl-core'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
macula-services/mcl-graph!20
No description provided.