From a523a8cbb0c8b1a83fcccd1790224e1d94380785 Mon Sep 17 00:00:00 2001 From: jochen Date: Sat, 24 Oct 2026 18:15:32 +0200 Subject: [PATCH] Say beside a composition that it changes only the bus's user list (issue 1943; the review's A2, for issue 1906) A revision that changes only the user list is written into the bus node's want at once, outside the record hold (ADR 0539 clause 7), so the assigner must tell it apart from a move that recreates or moves data. --- go/delivery/composed.go | 21 +++++++++++++-------- go/delivery/composed_keys_test.go | 1 + 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/go/delivery/composed.go b/go/delivery/composed.go index a77b6ee..d22151a 100644 --- a/go/delivery/composed.go +++ b/go/delivery/composed.go @@ -141,14 +141,19 @@ func checkDigest(digest, of string) error { // own choice (`upgrade` with policy) included. Rewritten when the policy changes. Empty on a composition made by hand // (mesh-compose), whose want the operator writes. type ComposedDigest struct { - V int `json:"v"` - Digest string `json:"digest"` - Judgement Judgement `json:"judgement"` - Against string `json:"against,omitempty"` - Words string `json:"words,omitempty"` - Policy string `json:"policy,omitempty"` - PolicyFrom string `json:"policy-from,omitempty"` - PolicyWhy string `json:"policy-why,omitempty"` + V int `json:"v"` + Digest string `json:"digest"` + Judgement Judgement `json:"judgement"` + Against string `json:"against,omitempty"` + Words string `json:"words,omitempty"` + // UserListOnly says the composition differs from the one the node's have names only in the bus's user list (the + // bus module's file `.bus-users`), whatever the judgement says of its mount: the assigner writes such a + // revision into the bus node's want at once, outside the record hold, at the fingerprint the node runs (ADR 0539 + // clause 7). + UserListOnly bool `json:"user-list-only,omitempty"` + Policy string `json:"policy,omitempty"` + PolicyFrom string `json:"policy-from,omitempty"` + PolicyWhy string `json:"policy-why,omitempty"` } // The upgrade policies and their sources a composition's value names: catalogue.PolicyRoll, PolicyTogether and diff --git a/go/delivery/composed_keys_test.go b/go/delivery/composed_keys_test.go index bd3630e..fc03a5e 100644 --- a/go/delivery/composed_keys_test.go +++ b/go/delivery/composed_keys_test.go @@ -82,6 +82,7 @@ func TestComposedDigestValue(t *testing.T) { {Digest: digest, Judgement: JudgedCannot, Words: "the composition the node runs is gone"}, {Digest: digest, Judgement: JudgedNeither, Policy: "record", PolicyFrom: "person", PolicyWhy: "the operator: its data"}, {Digest: digest, Judgement: JudgedNeither, Policy: "roll", PolicyFrom: "default"}, + {Digest: digest, Judgement: JudgedNeither, Against: against, UserListOnly: true, Words: "only the bus's user list changes"}, } { raw, err := EncodeComposedDigest(v) if err != nil {