package buscompose import ( "slices" "testing" ) // A-399: the holder of a seat pulled by kind says the seat's own events on its machine (a build seat's step-ended and // toolchain-reported, `.`); on 2026-11-14 they were granted to nobody, so the builder never heard a toolchain. func TestAPulledSeatsHolderSaysItsEvents(t *testing.T) { held := Seat{Name: "node-build-go", Scope: "node", Accepts: []string{"delivery"}, PulledByKind: true, Emits: []string{"step-ended", "toolchain-reported"}, EventSubjects: map[string]string{"step-ended": "step-ended.", "toolchain-reported": "toolchain-reported."}} perms, err := PermissionsFor(Principal{Kind: KindModule, Node: "shanks", Module: "mesh-build-go", Holds: []Seat{held}}) if err != nil { t.Fatal(err) } for _, want := range []string{"mesh.seat.node-build-go.event.step-ended.shanks", "mesh.seat.node-build-go.event.toolchain-reported.shanks"} { if !slices.Contains(perms.Publish, want) { t.Errorf("the holder's account is not granted %s", want) } } tr := SeatTrafficOf("mesh-build-go", []Seat{held}, nil, nil) if !slices.Contains(tr.Publish, "mesh.seat.node-build-go.event.toolchain-reported.*") { t.Errorf("the membership does not list toolchain-reported: %v", tr.Publish) } }