The node-engine reads each assignment by the build its node keeps and says a seat pass in its answer (issue 1966, ADR 0660)
mesh/delivery merged: source.main moved to novox/mesh-host@6dd8e08a84ed
mesh/delivery-group group fix/1966-seat-pass-shared merged: every member is merged
mesh/check checking 60f413f9bc6a on 6dd8e08a84ed | novox/mesh-host#212 in group fix/1966-seat-pass-shared

Claude-Session: https://claude.ai/code/session_01NcbgfFfQ4Z9UE5jK32PmE5
This commit is contained in:
2026-11-08 15:44:00 +01:00
parent 5108c28e22
commit 60f413f9bc
3 changed files with 54 additions and 14 deletions
+15 -1
View File
@@ -183,7 +183,7 @@ func TestNoSeatIsPassedForTwoClaimantsAnAssignedHolderOrNoClaimant(t *testing.T)
// seat_pass_test.go TestAHolderAssignedButNotOnTheShelfIsNotTakenForGone.
func TestAHolderAssignedButNotOnTheShelfIsNotTakenForGone(t *testing.T) {
withSeat(t)
as := assignmentsOf(map[string]catalogue.Manifest{"gate": aBrokerClaiming("gate")},
as := (&composer{}).assignmentsOf(map[string]catalogue.Manifest{"gate": aBrokerClaiming("gate")},
map[string][]string{"novox": {"gate", "old-broker"}})
passes, _ := catalogue.SeatsToPassOn(
[]catalogue.Held{{Claim: "mesh-broker", Scope: catalogue.ScopeMesh, Node: "novox", Module: "old-broker"}}, as)
@@ -264,4 +264,18 @@ func TestAHolderWhoseManifestDroppedTheSeatGoesToItsOnlyClaimant(t *testing.T) {
!strings.Contains(said, "seat mesh-broker --to <node>/<module>") {
t.Fatalf("two claimants: %v %+v", err, passes)
}
// The build the holder's node runs still claims the seat, though the trunk dropped it: the holder keeps it (ADR 0660 §2).
running := mk("gate")
running.Nodes[0].Kept = map[string]catalogue.Manifest{"old-broker": aBrokerClaiming("old-broker")}
_, passes, _, err = TheRestOfTheMesh(running, "")
if err != nil || len(passes.Passes) != 0 || len(passes.Said) != 0 {
t.Fatalf("a holder whose running build claims the seat lost it: %v %+v", err, passes)
}
// And a pass is said in the composition's answer, not recorded.
var d Declared
d, _, err = Compose(mk("gate"), "novox")
said = strings.Join(d.Said, "\n")
if err != nil || !strings.Contains(said, "mesh-broker: old-broker on novox") || !strings.Contains(said, "held by gate on novox, not recorded") {
t.Fatalf("the answer does not say the pass: %v %q", err, said)
}
}