Files
mesh-delivery/modules/mesh-grants/internal/grants/named_asks_test.go
T
jschoubben 6b43adafca G1 (in progress): the grants part reads no callers and no verdicts
Every account may call every verb: the grants part reads no definition's
callers (callerOf, the verb and accept callers, admits) and grants every
module's account every verb of every seat (mesh.seat.*.tool.> and its
caller-named form), a sent store to every module invoking a verb of its
claimant's seat, and every queue's named ask to every asker. grants_callers
goes; grants_why_refused answers the bus's own verdict. The indexer keeps
no verdicts: their first view, events, invoke and the engine's read go, and
a want names its build alone (no newest). internal/... and cmd/... tests are
green; the root package's grants_test.go still reads the verdicts (rows at
grants_test.go:303-307, 741, 1184, 3700-3870, 4560-4615) and does not compile.

Builds: design 47 H §745, §750, §752, §764 (every seat contract: the callers lists); lead answers H-A-37, H-A-66, H-A-79, H-A-113 (hq f599b761)

Claude-Session: https://claude.ai/code/session_01JG73KHUnBze48rdua8u2sy
2026-11-20 04:28:04 +01:00

21 lines
982 B
Go

package grants
import (
"slices"
"testing"
"git.novox.be/novox/mesh-sdk/go/catalogue"
"git.novox.be/novox/mesh-sdk/go/seatdef"
)
// A build seat's queues (A-170, A-184): every account may ask each one (design 47 H §752), so no callers list names askers.
func TestAcceptCallersOf(t *testing.T) {
msg := func(name, stream string) seatdef.Message { return seatdef.Message{Name: name, Stream: stream} }
// A-170, A-184: the seat's workers are per queue, never per kind: step and run ride check or delivery.
build := catalogue.SeatFromDefinition(seatdef.Definition{Seat: "node-build-go", PulledByKind: true, Accepts: []seatdef.Message{
msg("delivery", ""), msg("check", ""), msg("step", "check"), msg("step", "delivery"), msg("recheck", ""), msg("run", "check")}})
if got := queuesOf(build); !slices.Equal(got, []string{"delivery", "check", "recheck"}) {
t.Errorf("the queues of %v on %v: %v, want delivery, check and recheck", build.Accepts, build.AcceptedOn, got)
}
}