From 1f70c4c0aa88cb24769519dc5c64ef9d1b313ad6 Mon Sep 17 00:00:00 2001 From: jochen Date: Mon, 26 Oct 2026 21:12:24 +0100 Subject: [PATCH] A settle ask's group begins with a colon, which no branch name holds, so a branch named settle/... still merges on its Approve (review of issue 1280) --- go/delivery/gate.go | 5 +++-- go/delivery/gate_test.go | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/go/delivery/gate.go b/go/delivery/gate.go index 6a3db12..450fa5b 100644 --- a/go/delivery/gate.go +++ b/go/delivery/gate.go @@ -90,8 +90,9 @@ func MergeAskKey(group string, heads []Head) (string, error) { // SettleGroupPrefix begins the group of a settle ask (novox/hq ADR 0556 clause 5): a person's ask to settle deliveries held // because their merge reached the trunk without a passing check. It is kept in the gate's asks under MergeAskKey like a merge -// ask, so the teller carries it unchanged; its options bind the act AskVerb names for it. -const SettleGroupPrefix = "settle/" +// ask, so the teller carries it unchanged; its options bind the act AskVerb names for it. Git forbids a colon in a branch +// name, so no pull request's group (its branch) ever begins with it. +const SettleGroupPrefix = "settle:" // SettleGroup is the group of the settle ask of these delivery ids: the prefix and twelve hex digits of the sha256 over the // ids, sorted and joined by a newline, so the same deliveries asked again keep one key. diff --git a/go/delivery/gate_test.go b/go/delivery/gate_test.go index 1378d48..bd4e7bc 100644 --- a/go/delivery/gate_test.go +++ b/go/delivery/gate_test.go @@ -86,8 +86,11 @@ func TestAskID(t *testing.T) { // 1201/AC2 if k, err := MergeAskKey(g, gateHeads()); err != nil || !asks.UsableID(AskID(k)) { t.Errorf("the settle ask's key %q: %v", k, err) } - if AskVerb(g) != "mesh-delivery.settle" || AskVerb("feat/x") != "mesh-delivery.merge" { - t.Errorf("AskVerb = %q, %q", AskVerb(g), AskVerb("feat/x")) + for group, want := range map[string]string{g: "mesh-delivery.settle", "feat/x": "mesh-delivery.merge", + "settle/foo": "mesh-delivery.merge", "settle": "mesh-delivery.merge"} { // a branch named settle/... is a merge's group + if got := AskVerb(group); got != want { + t.Errorf("AskVerb(%q) = %q, want %q", group, got, want) + } } }