From 351ca7c290c411746ff333b2bdaa953a361157ce Mon Sep 17 00:00:00 2001 From: jochen Date: Mon, 26 Oct 2026 20:58:20 +0100 Subject: [PATCH] The teller checks a settle ask's warrant against mesh-delivery.settle, the act its options bind (issue 1280, ADR 0556 clause 5) --- .../cmd/mesh-delivery-teller/teller.go | 11 +++++---- .../cmd/mesh-delivery-teller/teller_test.go | 24 ++++++++++++++++--- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/modules/mesh-delivery-teller/cmd/mesh-delivery-teller/teller.go b/modules/mesh-delivery-teller/cmd/mesh-delivery-teller/teller.go index 40f1f20..a900626 100644 --- a/modules/mesh-delivery-teller/cmd/mesh-delivery-teller/teller.go +++ b/modules/mesh-delivery-teller/cmd/mesh-delivery-teller/teller.go @@ -286,16 +286,17 @@ func (t *Teller) catchUp(id string) { t.said(h, *w, err) } -// mergeAct is what the approve option of the gate's ask binds: this ask, the answer, and the heads it covers. It is -// spelled as the gate composes it (mesh-catalog modules/mesh-delivery-gate approval.go mergeAct, from +// mergeAct is what the approve option of the gate's ask binds: the ask's verb (delivery.AskVerb: mesh-delivery.merge, or +// mesh-delivery.settle for a person's settle ask, novox/hq ADR 0556 clause 5), this ask, the answer, and the heads it covers. +// It is spelled as the gate composes it (mesh-catalog modules/mesh-delivery-gate approval.go mergeAct, from // modules/mesh-delivery approval.go:63-65) and as mesh-controller verifies it (cmd/mesh-controller/moved.go:98-106). -func mergeAct(ask, option string, heads map[string]string) asks.Act { +func mergeAct(verb, ask, option string, heads map[string]string) asks.Act { var out []string for id, sha := range heads { out = append(out, id+"="+sha) } sort.Strings(out) - return asks.Act{"verb": "mesh-delivery.merge", "ask": ask, "option": option, "heads": strings.Join(out, ",")} + return asks.Act{"verb": verb, "ask": ask, "option": option, "heads": strings.Join(out, ",")} } // headsOf is the heads an ask covers as an act names them: a delivery's id, `owner/repository@