diff --git a/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/seat_tools_test.go b/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/seat_tools_test.go index 0e202c95..046dceb8 100644 --- a/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/seat_tools_test.go +++ b/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/seat_tools_test.go @@ -385,7 +385,7 @@ func wantsVerbs(t *testing.T) { } manifest("web", "") manifest("photos", `,"upgrade":{"policy":"record","why":"a person checks the albums"}`) - manifest("nats", `,"provides":[{"name":"mesh-bus","scope":"mesh"}]`) + manifest("nats", `,"provides":[{"name":"mesh-bus","scope":"mesh"}],"upgrade":{"policy":"record","why":"its streams"}`) for node, fp := range map[string]string{"anchor": fpOld, "laptop": fpNew} { st[haveState].values[node+".nats"], _ = delivery.EncodeHave(delivery.Have{FP: fp, Phase: delivery.PhaseRunning, Health: delivery.HealthOK}) } @@ -406,7 +406,7 @@ func wantsVerbs(t *testing.T) { if p := policyOf("photos"); p.Policy != catalogue.PolicyRecord || p.From != catalogue.FromModule { t.Errorf("photos = %+v", p) } - if p := policyOf("nats"); p.Policy != catalogue.PolicyRecord || p.From != catalogue.FromBus { + if p := policyOf("nats"); p.Policy != catalogue.PolicyRecord || p.From != catalogue.FromModule { // the policy its manifest says (issue 774) t.Errorf("nats = %+v", p) } // compare: each node's own composition is the digest its have names, and the assigner's findings; nothing splits, the diff --git a/modules/mesh-delivery-indexer/judge/rules_test.go b/modules/mesh-delivery-indexer/judge/rules_test.go index a036e926..d0727909 100644 --- a/modules/mesh-delivery-indexer/judge/rules_test.go +++ b/modules/mesh-delivery-indexer/judge/rules_test.go @@ -5171,22 +5171,20 @@ func TestWhereAModulesUpgradePolicyComesFrom(t *testing.T) { catalogue.PolicyRoll, catalogue.FromDefault}, {"irreplaceable but says roll", catalogue.Manifest{Module: "photos", Upgrade: &catalogue.UpgradePolicy{Policy: catalogue.PolicyRoll}, Data: &catalogue.Data{Own: []catalogue.DataItem{{ID: "originals", Class: catalogue.ClassIrreplaceable}}}}, catalogue.PolicyRoll, catalogue.FromModule}, - {"the bus, whatever it says", catalogue.Manifest{Module: "nats", Provides: []catalogue.Offer{{Name: "mesh-bus"}}, - Upgrade: &catalogue.UpgradePolicy{Policy: catalogue.PolicyRoll}}, catalogue.PolicyRecord, catalogue.FromBus}, + // Issue 774 (the operator, 2026-11-03): the bus has the policy its manifest says, as any module. + {"the bus says record", catalogue.Manifest{Module: "nats", Provides: []catalogue.Offer{{Name: "mesh-bus"}}, + Upgrade: &catalogue.UpgradePolicy{Policy: catalogue.PolicyRecord, Why: "its streams"}}, catalogue.PolicyRecord, catalogue.FromModule}, } for _, c := range cases { policy, from, _ := catalogue.DerivedUpgrade(c.m) if policy != c.policy || from != c.from { t.Errorf("%s: %s from %s, want %s from %s", c.name, policy, from, c.policy, c.from) } - // ADR 0565 clause 7 (issue 1953 L5-S3): a person's choice wins over each source but the bus; none leaves the - // derivation as it was. + // ADR 0565 clause 7 (issue 1953 L5-S3): a person's choice wins over each source; none leaves the derivation as it + // was. The assigner's upgrade verb refuses a choice for the bus (wants_tools.go setPolicy). person := &catalogue.PersonPolicy{V: catalogue.PersonPolicyVersion, Module: c.m.Module, Policy: catalogue.PolicyTogether, Why: "one zone", By: "person.jochen"} policy, from, _, by := catalogue.Upgrade(c.m, person) wantPolicy, wantFrom, wantBy := catalogue.PolicyTogether, catalogue.FromPerson, "person.jochen" - if c.from == catalogue.FromBus { - wantPolicy, wantFrom, wantBy = c.policy, catalogue.FromBus, "" - } if policy != wantPolicy || from != wantFrom || by != wantBy { t.Errorf("%s with a person's choice: %s from %s by %q", c.name, policy, from, by) }