The node-engine writes the followed user list into the bus module's have even when it does not apply that module (issue 1945) #146

Merged
mesh-tools merged 1 commits from fix/have-keeps-user-list into main 2026-10-26 12:52:15 +00:00
Member

Issue 1945 (the grants part's take-over of the bus user list).

Live since 13:26: novox's node-engine followed the bus user list and logged that it handed the six hashes "in the bus module's have", but NoteUserList (internal/link/have.go) only kept the list in memory: writeHaves writes the haves of modules this engine applies, and since the switch to wants nothing applies the bus module nats (it has no want; diagnosis running separately). So novox.nats never carried user-list, the vault adopted nothing and mesh-grants said "the bus node's have of the bus module names no key yet".

Fix: writeUserListsAlone, on every have pass after writeRemoved: for each module whose user list the engine holds but whose have it does not write, read the key, set only UserList, write it at the revision read (compare-and-set; a refused write is merged again next pass). Nothing is written when the value already matches. A missing key is never invented (a have must state a phase): it is said once and the module's first own have carries the list. The early return also looks at the held lists.

Tests: TestAUserListReachesTheHaveOfAModuleNoApplyHereSays (fails on main: "the user list is not in the have"). Unit suite passes; go vet -tags integration ./... clean. Try try-1793018774358550555 passed (unit 1035, integration 1040).

Acceptance after delivery: novox.nats carries user-list (follows, digest, key, handed); mesh-vault.secret_own adopts the six hashes; mesh-grants.grants_user_list holds 58 of 58.

Reviewed-by: review-havewrite@shanks at 43f2d6020e

Issue 1945 (the grants part's take-over of the bus user list). Live since 13:26: novox's node-engine followed the bus user list and logged that it handed the six hashes "in the bus module's have", but `NoteUserList` (internal/link/have.go) only kept the list in memory: `writeHaves` writes the haves of modules this engine applies, and since the switch to wants nothing applies the bus module `nats` (it has no want; diagnosis running separately). So `novox.nats` never carried `user-list`, the vault adopted nothing and mesh-grants said "the bus node's have of the bus module names no key yet". Fix: `writeUserListsAlone`, on every have pass after `writeRemoved`: for each module whose user list the engine holds but whose have it does not write, read the key, set only `UserList`, write it at the revision read (compare-and-set; a refused write is merged again next pass). Nothing is written when the value already matches. A missing key is never invented (a have must state a phase): it is said once and the module's first own have carries the list. The early return also looks at the held lists. Tests: `TestAUserListReachesTheHaveOfAModuleNoApplyHereSays` (fails on main: "the user list is not in the have"). Unit suite passes; `go vet -tags integration ./...` clean. Try try-1793018774358550555 passed (unit 1035, integration 1040). Acceptance after delivery: `novox.nats` carries user-list (follows, digest, key, handed); `mesh-vault.secret_own` adopts the six hashes; `mesh-grants.grants_user_list` holds 58 of 58. Reviewed-by: review-havewrite@shanks at 43f2d6020e11acd0a1d3c1d32014d8c1694c4b88
mesh-tools added 1 commit 2026-10-26 12:51:26 +00:00
Write the bus's user list into a have no apply here says, merged over the key's value
mesh/delivery merged: source.main moved to novox/mesh-host@94f9aa298cb8
mesh/check pass 43f2d6020e11 on 94f9aa298cb8 | carried from 7f04d1204765, mesh-catalog a4f5df797b68, mesh-sdk b4cd95e7c4a4 | unit 972 run, 423 kept, 3…
43f2d6020e
On the bus node the bus module has no want and has left the declaration, so no
pass of this engine held its fact and the follower's user list was kept in
memory and never written: the vault and the grants part read no hashes and no
key. A module's user list now reaches its key on every pass, merged into what
the key says with every other field kept; a missing key is said once, never
made up (ADR 0547 §8).
Author
Member

Delivery novox/mesh-host@43f2d6020e11 — merged since 2026-10-26T12:52:17Z

Source — source.main moved to novox/mesh-host@94f9aa298c. Whether it reached the machines is mesh-delivery-view's, derived from source.main, the wants and the haves.

Transitions

  • 2026-10-26 12:51 (new) → proposed (announced): novox/mesh-host#146's head announced
  • 2026-10-26 12:51 proposed → ready (accepted): a verdict names this commit and the trunk's head as its trunk commit, the gate passed or warned, and the repository's own check did not fail; or the check gates no merge (check-gates-merge false)
  • 2026-10-26 12:52 ready → merged (merged): on the trunk its modules follow: merged there

The commit's note under refs/notes/mesh-plan keeps every transition of this change up to its merge: git log --notes=mesh-plan.

<!-- mesh-delivery:view --> **Delivery** `novox/mesh-host@43f2d6020e11` — **merged** since 2026-10-26T12:52:17Z **Source** — source.main moved to novox/mesh-host@94f9aa298cb8. Whether it reached the machines is `mesh-delivery-view`'s, derived from `source.main`, the wants and the haves. **Transitions** - 2026-10-26 12:51 (new) → proposed (announced): novox/mesh-host#146's head announced - 2026-10-26 12:51 proposed → ready (accepted): a verdict names this commit and the trunk's head as its trunk commit, the gate passed or warned, and the repository's own check did not fail; or the check gates no merge (check-gates-merge false) - 2026-10-26 12:52 ready → merged (merged): on the trunk its modules follow: merged there The commit's note under `refs/notes/mesh-plan` keeps every transition of this change up to its merge: `git log --notes=mesh-plan`.
mesh-tools merged commit 94f9aa298c into main 2026-10-26 12:52:15 +00:00
mesh-tools deleted branch fix/have-keeps-user-list 2026-10-26 12:52:15 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: novox/mesh-host#146