From 839bc4a6e5cbfe3866badcc090f559d3a7cec645 Mon Sep 17 00:00:00 2001 From: jochen Date: Wed, 11 Nov 2026 11:44:42 +0100 Subject: [PATCH] TL0: the teller's test follows the contracts, the settle ask gone with the verb settle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Builds: design 47 G §431 (the settle ask goes with the verb settle) Claude-Session: https://claude.ai/code/session_01JG73KEq4zoDfM9WtYpcQgZ --- .../cmd/mesh-delivery-teller/teller.go | 4 ++-- .../cmd/mesh-delivery-teller/teller_test.go | 9 ++++----- 2 files changed, 6 insertions(+), 7 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 83506c23..4426cb51 100644 --- a/modules/mesh-delivery-teller/cmd/mesh-delivery-teller/teller.go +++ b/modules/mesh-delivery-teller/cmd/mesh-delivery-teller/teller.go @@ -324,8 +324,8 @@ func (t *Teller) catchUp(id string) { t.said(h, *w, err) } -// mergeAct is what the approve option of the gate's ask binds: the ask's verb (meshdeliveryclient.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. +// mergeAct is what the approve option of the gate's ask binds: the ask's verb (meshdeliveryclient.AskVerb: mesh-delivery.merge; the settle ask +// went with the verb settle, design 47 G §431), 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(verb, ask, option string, heads map[string]string) occ.Act { diff --git a/modules/mesh-delivery-teller/cmd/mesh-delivery-teller/teller_test.go b/modules/mesh-delivery-teller/cmd/mesh-delivery-teller/teller_test.go index 34758645..dac5305b 100644 --- a/modules/mesh-delivery-teller/cmd/mesh-delivery-teller/teller_test.go +++ b/modules/mesh-delivery-teller/cmd/mesh-delivery-teller/teller_test.go @@ -412,16 +412,15 @@ func TestAWarrantThatHoldsWritesOneAnswerAndASecondWritesNone(t *testing.T) { // if len(b.conds) != 0 { t.Errorf("conditions said: %+v", b.conds) } - // 1280 (ADR 0556 clause 5): a settle ask holds when its options bind mesh-delivery.settle, and not when they bind a merge. - for verb, holds := range map[string]bool{"mesh-delivery.settle": true, "mesh-delivery.merge": false} { + // design 47 G §431: the settle ask went with the verb settle, so an ask whose options bind it holds no more. + for verb, holds := range map[string]bool{"mesh-delivery.settle": false, "mesh-delivery.merge": true} { b := newBed(t) - group := meshdeliveryclient.SettleGroup([]string{"novox/mesh-delivery@" + headA[:12]}) - key, value, ga := gateAskOf(t, group, verb, twoHeads(), twoHeads(), 1) + key, value, ga := gateAskOf(t, "g", verb, twoHeads(), twoHeads(), 1) b.gate[key] = value b.t.OnAsk(key, 1, value) b.deliver(t, warrantFor(ga.Ask, "approve")) if _, written := b.answers.written[answerKey(key)]; written != holds { - t.Errorf("a settle ask binding %s: answer written %v, want %v", verb, written, holds) + t.Errorf("an ask binding %s: answer written %v, want %v", verb, written, holds) } } }