From ddaff38e758c1b8424c65a4945a4c478423111e8 Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 5 Nov 2026 18:45:50 +0100 Subject: [PATCH] RemovedDeliveryVerbs leaves mesh-sdk for the seat mesh-delivery's client (ADR 0634 section 2, issue 1966) Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i --- .../clients/meshdeliveryclient/client_test.go | 38 +++++++++++++++++++ .../go/clients/meshdeliveryclient/removed.go | 18 +++++++++ 2 files changed, 56 insertions(+) create mode 100644 contracts/go/clients/meshdeliveryclient/removed.go diff --git a/contracts/go/clients/meshdeliveryclient/client_test.go b/contracts/go/clients/meshdeliveryclient/client_test.go index 71cf9ad1..08718e85 100644 --- a/contracts/go/clients/meshdeliveryclient/client_test.go +++ b/contracts/go/clients/meshdeliveryclient/client_test.go @@ -1,6 +1,8 @@ package meshdeliveryclient import ( + "encoding/json" + "os" "strings" "testing" @@ -89,3 +91,39 @@ func TestTheAsksAndOwedActsKeepTheirFormsAndRules(t *testing.T) { } } } + +// The removed verbs are the optional rows of the seat's definition that say they were removed, each with the replacement +// the definition gives: the list and the definition cannot drift apart. +func TestTheRemovedVerbsAreTheDefinitionsRemovedRows(t *testing.T) { + raw, err := os.ReadFile("../../../seats/mesh-delivery/seat.json") + if err != nil { + t.Fatal(err) + } + var def struct { + Verbs []struct { + Name string `json:"name"` + Description string `json:"description"` + Optional bool `json:"optional"` + } `json:"verbs"` + } + if err := json.Unmarshal(raw, &def); err != nil { + t.Fatal(err) + } + removed := RemovedVerbs() + rows := 0 + for _, v := range def.Verbs { + if !strings.HasPrefix(v.Description, RemovedPrefix) { + if _, in := removed[v.Name]; in { + t.Errorf("%s is in the removed list, the definition keeps it", v.Name) + } + continue + } + rows++ + if want, in := removed[v.Name]; !in || !v.Optional || v.Description != RemovedPrefix+want { + t.Errorf("%s: in the list %v, optional %v, described %q, want %q", v.Name, in, v.Optional, v.Description, RemovedPrefix+want) + } + } + if rows != len(removed) || rows == 0 { + t.Errorf("the definition removes %d verbs, the list names %d", rows, len(removed)) + } +} diff --git a/contracts/go/clients/meshdeliveryclient/removed.go b/contracts/go/clients/meshdeliveryclient/removed.go new file mode 100644 index 00000000..8b390133 --- /dev/null +++ b/contracts/go/clients/meshdeliveryclient/removed.go @@ -0,0 +1,18 @@ +package meshdeliveryclient + +// RemovedPrefix opens the description of a verb release 6 removed from the seat mesh-delivery (novox/hq ADR 0539 clause 17): +// the definition keeps it as an optional row with no input, so the holder of before and the holder of release 6 both hold +// the seat, and a caller is answered by name with its replacement. +const RemovedPrefix = "Removed in R6 (ADR 0539): refused by name, naming its replacement: " + +// RemovedVerbs are the seat's verbs release 6 removed, each with its replacement in words: with no plan the gate keeps the +// merge's states and derives nothing after the merge. A new map each call. +func RemovedVerbs() map[string]string { + return map[string]string{ + "times": "the delivery view (nox-delivery): each machine's want and have, and since when", + "what-if": "the merge check's composition, which composes every machine a change touches", + "release": "the assigner's asks (hold, restore, backup, record), answered on the phone or in the delivery view", + "stop": "a bad fingerprint is held and its canary set back by the assigner (ADR 0429 ยง6, ADR 0539 clause 18)", + "retire-history": "nothing to retire: the gate keeps no delivery after its merge", + } +}