One codec for the grants part's memberships state, so its writer and readers cannot drift (issue 774) #134

Merged
jschoubben merged 2 commits from fix/memberships-shape into main 2026-10-30 14:42:05 +00:00
Member

Recovery of design 47's release (issue 774, L3). Group fix/memberships-shape: mesh-sdk, mesh-delivery, mesh-tools; merge mesh-sdk first.

Fault (live 2026-10-30 14:11): mesh-grants wrote its state memberships wrapped ({node,module,digest,membership:{...},published}); the new tool runner decoded it bare, so every module on novox was issued no tools and no state (0 tools served); novox's tool runner is held on c9f6c674 meanwhile.

Quick fix: the tool runner unwraps. Thorough fix (chosen): one codec in mesh-sdk (membership.EncodeGrantsMembership / DecodeGrantsMembership; the decoder takes the bare shape, or an old wrapper only when it says published or unchanged); mesh-grants writes the bare membership, only when published or unchanged; node-tools reads through the codec, a refused value leaves the stream copy in force. The fixture that hid it (written by hand in the reader's shape) now writes through the encoder, and an integration test writes the grants part's real wrapped shape, including a held-back one. Recovery mode: no check waited on; the operator merges by hand.

Reviewed-by: rev-memberships@shanks at 83cf97b690

Recovery of design 47's release (issue 774, L3). Group fix/memberships-shape: mesh-sdk, mesh-delivery, mesh-tools; merge mesh-sdk first. Fault (live 2026-10-30 14:11): mesh-grants wrote its state memberships wrapped ({node,module,digest,membership:{...},published}); the new tool runner decoded it bare, so every module on novox was issued no tools and no state (0 tools served); novox's tool runner is held on c9f6c674 meanwhile. Quick fix: the tool runner unwraps. Thorough fix (chosen): one codec in mesh-sdk (membership.EncodeGrantsMembership / DecodeGrantsMembership; the decoder takes the bare shape, or an old wrapper only when it says published or unchanged); mesh-grants writes the bare membership, only when published or unchanged; node-tools reads through the codec, a refused value leaves the stream copy in force. The fixture that hid it (written by hand in the reader's shape) now writes through the encoder, and an integration test writes the grants part's real wrapped shape, including a held-back one. Recovery mode: no check waited on; the operator merges by hand. Reviewed-by: rev-memberships@shanks at 83cf97b690f5d598ad96f7cae70b7c029f89099a
mesh-tools added 2 commits 2026-10-30 14:41:23 +00:00
The grants part wrote its own wrapper into mesh-grants_memberships while the tool runner read the value as a bare
membership: novox's tool runner served no tool. EncodeGrantsMembership writes the bare membership;
DecodeGrantsMembership and BareGrantsMembership read it, still read the old wrapper for the transition, and refuse a
value naming no node or module instead of answering an empty membership.

Issue 774 (the bus login list, L3). Quick fix: write the bare membership in the grants part alone. Thorough, chosen:
one codec in mesh-sdk both sides use, because a hand-built test fixture agreed with the mistake and hid it.
Refuse an old wrapper of a held-back membership, so a reader falls back to the assignments stream
mesh/delivery merged: source.main moved to novox/mesh-sdk@0c99e847a2ae
mesh/delivery-group group fix/memberships-shape merged: every member is merged
mesh/check checking 83cf97b690f5 on 0c99e847a2ae | novox/mesh-sdk#134 in group fix/memberships-shape
83cf97b690
The grants part's old build wrote its wrapper for every membership, a held-back one too, with the unpublished
composition inside; the new part never rewrites such a key, so the decoder took the held-back membership as given.
It now reads a wrapper only when its published says published or unchanged. The codec's rows join the round-trip
test (mesh-sdk is over its unit budget). Review round 1 of issue 774's fix.
Author
Member

Delivery novox/mesh-sdk@83cf97b690f5 — merged since 2026-10-30T14:42:06Z

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

Group fix/memberships-shape: novox/mesh-delivery@180a3fe5db, novox/mesh-sdk@83cf97b690, novox/mesh-tools@ac645e2cae

Transitions

  • 2026-10-30 14:41 (new) → proposed (announced): novox/mesh-sdk#134's head announced
  • 2026-10-30 14:41 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-30 14:42 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-sdk@83cf97b690f5` — **merged** since 2026-10-30T14:42:06Z **Source** — source.main moved to novox/mesh-sdk@0c99e847a2ae. Whether it reached the machines is `mesh-delivery-view`'s, derived from `source.main`, the wants and the haves. **Group** `fix/memberships-shape`: novox/mesh-delivery@180a3fe5db30, novox/mesh-sdk@83cf97b690f5, novox/mesh-tools@ac645e2caedd **Transitions** - 2026-10-30 14:41 (new) → proposed (announced): novox/mesh-sdk#134's head announced - 2026-10-30 14:41 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-30 14:42 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`.
jschoubben merged commit 0c99e847a2 into main 2026-10-30 14:42:05 +00:00
jschoubben deleted branch fix/memberships-shape 2026-10-30 14:42:05 +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-sdk#134