From a1814c6571dac39f0458e8d7203b7b47a3aa7ed0 Mon Sep 17 00:00:00 2001 From: jochen Date: Tue, 3 Nov 2026 17:19:05 +0100 Subject: [PATCH] =?UTF-8?q?Assigner=20row:=20the=20newest=20source=20revis?= =?UTF-8?q?ion's=20provider=20edge=20replaces=20the=20older=20one,=20and?= =?UTF-8?q?=20only=20it=20is=20waited=20on=20(ADR=200603=20=C2=A79)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../internal/assign/wants_test.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/modules/mesh-delivery-assigner/internal/assign/wants_test.go b/modules/mesh-delivery-assigner/internal/assign/wants_test.go index 95d4eee3..ba188a94 100644 --- a/modules/mesh-delivery-assigner/internal/assign/wants_test.go +++ b/modules/mesh-delivery-assigner/internal/assign/wants_test.go @@ -104,6 +104,24 @@ func TestEachRuleHoldsTheWantBack(t *testing.T) { t.Errorf("provided provisions held g14's want: %+v (%s)", out.Wants["g14"], out.Rules["g14"].Words) } } + // ADR 0603 ยง9: the newest source revision governs. The module now at fNew no longer requires the database an older revision + // asked for and requires oidc instead; the seat's keys follow the newest manifest, so the older edge is no wait: a provided + // oidc moves the want, an asked one holds it and names oidc and never database. + for _, c := range []struct { + name string + state string + moves bool + }{{"the replaced edge provided", provisions.Provided, true}, {"the replaced edge asked", provisions.Asked, false}} { + m, n := ready() + m.Manifest.Requires = []string{"oidc"} + m.Provisions = func(node string) map[string]provisions.Provision { + return map[string]provisions.Provision{node + ".mail.oidc": {Provision: "oidc", State: c.state}} + } + out := Wants(m, n, wantedOld(), nil) + if got := out.Wants["g14"].FP == fNew; got != c.moves || (!c.moves && (!strings.Contains(out.Rules["g14"].Words, "oidc") || strings.Contains(out.Rules["g14"].Words, "database"))) { + t.Errorf("%s: want %+v, held by %q", c.name, out.Wants["g14"], out.Rules["g14"].Words) + } + } // 1954/D1 (the lead, 2026-10-29): a required provision with no key yet holds the want, named; and only one the // composition keys (catalogue.Awaited, issue 774), replaying 2026-10-30: grafana (not handed) waited on ace for // oidc-client, which the controller still makes, and mesh-build-go (handed) for go-toolchain on its own machine.