diff --git a/modules/mesh-conditions/cmd/mesh-conditions/keeper_test.go b/modules/mesh-conditions/cmd/mesh-conditions/keeper_test.go index c36bfb218..c2d6b3bb2 100644 --- a/modules/mesh-conditions/cmd/mesh-conditions/keeper_test.go +++ b/modules/mesh-conditions/cmd/mesh-conditions/keeper_test.go @@ -240,14 +240,6 @@ func TestTheKeeperCarriesNoControllerConditionAndClearsWhatItCarriedOnce(t *test if err := r.k.Finding(watchman, key, raw, false); err != nil { t.Fatal(err) } - // take-in-waits (issue 1585) is an observer's kind with no row in Homes: its finding is raised and EndCarried leaves it (T26). - takeKey, takeRaw := finding(t, watchman, health.ScopeMachine, "g14", "take-in-waits", "take-in", health.Warning, r.now) - if err := r.k.Finding(watchman, takeKey, takeRaw, false); err != nil { - t.Fatal(err) - } - if _, open := r.open(takeKey); !open { - t.Fatal("a take-in-waits finding raised no condition") - } r.said = nil // Carried while the controller ran: two of kinds that ended with it, still open in conditions. for _, c := range []health.Condition{ @@ -265,9 +257,6 @@ func TestTheKeeperCarriesNoControllerConditionAndClearsWhatItCarriedOnce(t *test if _, open := r.open(key); !open { t.Error("a condition a finding holds was cleared") } - if _, open := r.open(takeKey); !open { - t.Error("EndCarried cleared a take-in-waits condition") - } if n, err := r.k.EndCarried(); err != nil || n != 0 || r.changes() != "" { t.Errorf("a second EndCarried cleared %d (%v)", n, err) } diff --git a/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/holder_test.go b/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/holder_test.go index 7bea50f41..3de163f4d 100644 --- a/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/holder_test.go +++ b/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/holder_test.go @@ -256,6 +256,12 @@ func TestAMergedGroupEndsMergedWithSourceMainMoved(t *testing.T) { if len(w.h.refusals) != 0 { t.Errorf("the gate refused a group's end: %v", w.h.refusals) } + // The repository forge/group's merged message ends the same way: it is decoded as a forge message, and this one, + // which is none, is refused. + w.h.Forged("mesh-delivery-forge-bridge.forge.forge.group.merged", []byte(`{"v":1,"group":"feat/y"}`)) + if len(w.h.refusals) != 1 { + t.Errorf("forge/group's merged message was passed by as a group's end: refusals %v", w.h.refusals) + } } // ADR 0419 ยง2, issue 978: a description's `after:` line is not read, and says so once on its pull request. The diff --git a/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/merges.go b/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/merges.go index aa5c17af0..a5212a7bf 100644 --- a/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/merges.go +++ b/modules/mesh-delivery-gate/cmd/mesh-delivery-gate/merges.go @@ -313,16 +313,16 @@ func (h *Holder) mergeValue(name, key string, approved map[string]string, target return m, len(m.Pulls) > 0 && state == sdk.MergeMerged } -// forgeGroupEnd ends the subject of a group end on FORGE, the forge bridge's event name: the four-part form of a pull -// request's message has no such tail. -const forgeGroupEnd = "." + forgemsg.ForgeGroupEndEvent +// forgeGroupEnd is the whole event of a group's end on FORGE, the forge bridge's event name under its module: compared +// exactly, so the merged message of a repository named forge/group, which ends the same way, is read as one. +const forgeGroupEnd = sdk.ForgeBridgeModule + "." + forgemsg.ForgeGroupEndEvent // Forged takes a message of the forge bridge on FORGE: the gate follows a merge and the refusal of a merge, and nothing else. // // The end of a group's merges (`forge.group.merged`, a body this gate has no use for: the gate wrote the merges itself) is // the indexer's, and is ignored before it is decoded, so no refusal is said for it (issue 1585, ADR 0633 clause 4). func (h *Holder) Forged(event string, body []byte) { - if strings.HasSuffix(event, forgeGroupEnd) { + if event == forgeGroupEnd { return } f, err := forgemsg.DecodeForge(body) diff --git a/modules/mesh-delivery-gate/go.mod b/modules/mesh-delivery-gate/go.mod index 1f467a4f1..ee2320886 100644 --- a/modules/mesh-delivery-gate/go.mod +++ b/modules/mesh-delivery-gate/go.mod @@ -3,7 +3,7 @@ module mesh-delivery-gate go 1.26.0 require ( - git.novox.be/novox/mesh-delivery/modules/mesh-delivery-forge-bridge/forgemsg v0.0.0-20261104230501-4e4601a1eb90 + git.novox.be/novox/mesh-delivery/modules/mesh-delivery-forge-bridge/forgemsg v0.0.0-20261104232856-7b7096f37ea7 git.novox.be/novox/mesh-sdk/go v0.1.14-0.20261104002338-5a38a1221659 github.com/nats-io/nats-server/v2 v2.11.17 github.com/nats-io/nats.go v1.54.0 diff --git a/modules/mesh-delivery-gate/go.sum b/modules/mesh-delivery-gate/go.sum index 6120abbd2..eaea0383d 100644 --- a/modules/mesh-delivery-gate/go.sum +++ b/modules/mesh-delivery-gate/go.sum @@ -1,5 +1,5 @@ -git.novox.be/novox/mesh-delivery/modules/mesh-delivery-forge-bridge/forgemsg v0.0.0-20261104230501-4e4601a1eb90 h1:8akSVoPjgngMbC1JIstcUzfKyYs13gDaboDRKC4NQ/A= -git.novox.be/novox/mesh-delivery/modules/mesh-delivery-forge-bridge/forgemsg v0.0.0-20261104230501-4e4601a1eb90/go.mod h1:Xxg9VI4y755tznAS2PygQFe2V3/aIzjRn3/06+Br9nQ= +git.novox.be/novox/mesh-delivery/modules/mesh-delivery-forge-bridge/forgemsg v0.0.0-20261104232856-7b7096f37ea7 h1:VWgmpV8KOOjq+KFqq0ofyZ52HUHoBfCqP5Z0/vUq++k= +git.novox.be/novox/mesh-delivery/modules/mesh-delivery-forge-bridge/forgemsg v0.0.0-20261104232856-7b7096f37ea7/go.mod h1:Xxg9VI4y755tznAS2PygQFe2V3/aIzjRn3/06+Br9nQ= git.novox.be/novox/mesh-sdk/go v0.1.14-0.20261104002338-5a38a1221659 h1:tK7MzxVm/ECNg1Yblhh1ynVEthbZCg2mSPW0wQZC0b0= git.novox.be/novox/mesh-sdk/go v0.1.14-0.20261104002338-5a38a1221659/go.mod h1:ouERNpZizzwZ0HLEtAypsY9FR20FyUgUYRni6J7kVCY= github.com/antithesishq/antithesis-sdk-go v0.7.0-default-no-op h1:Z/MZK75wC/NSrkgqeNIa7jexam9uWzhLmFTSCPI/kn0=