diff --git a/node-tools/internal/runtime/caller_test.go b/node-tools/internal/runtime/caller_test.go index d44a0d2..611e7fe 100644 --- a/node-tools/internal/runtime/caller_test.go +++ b/node-tools/internal/runtime/caller_test.go @@ -102,9 +102,10 @@ func TestTheSubjectThatNamesNoCallerStillWorksAndNamesNone(t *testing.T) { } return err }) + // Every caller is admitted, an unproven one too (the operator, 2026-11-15 23:25 CET). if strings.HasPrefix(subject, "mesh.seat.") { - if !strings.Contains(reply.Error, "node-desk.who takes no unproven caller") || reply.Result.Call != "" { - t.Errorf("%s: an unproven caller of a seat's verb was answered %+v (error %q), want refused before the bundle", subject, reply.Result, reply.Error) + if reply.Error != "" { + t.Errorf("%s: an unproven caller of a seat's verb was refused: %q, want answered", subject, reply.Error) } continue } @@ -116,9 +117,9 @@ func TestTheSubjectThatNamesNoCallerStillWorksAndNamesNone(t *testing.T) { defs map[string]seatdef.Definition says string }{ - {nil, "is not yet read"}, - {map[string]seatdef.Definition{"node-desk": {Seat: "node-desk"}}, "names no verb who"}, - {map[string]seatdef.Definition{"node-desk": {Seat: "node-desk", Verbs: []seatdef.Verb{{Name: "who", Callers: &seatdef.Callers{List: []string{}}}}}}, "open to no caller"}, + {nil, ""}, + {map[string]seatdef.Definition{"node-desk": {Seat: "node-desk"}}, ""}, + {map[string]seatdef.Definition{"node-desk": {Seat: "node-desk", Verbs: []seatdef.Verb{{Name: "who", Callers: &seatdef.Callers{List: []string{}}}}}}, ""}, {map[string]seatdef.Definition{"node-desk": {Seat: "node-desk", Verbs: []seatdef.Verb{{Name: "who", Class: seatdef.ClassAct}}}}, ""}, } { defs := c.defs @@ -134,12 +135,12 @@ func TestTheSubjectThatNamesNoCallerStillWorksAndNamesNone(t *testing.T) { return map[string]seatdef.Definition{"mesh-catalog": {Verbs: []seatdef.Verb{{Name: "input", Chunks: true}, {Name: "entry"}}}} }} for key, want := range map[string]bool{ - "seat:mesh-catalog.input": true, - "seat:mesh-catalog.entry": false, - "seat:mesh-catalog.input@home-server": true, - "seat:mesh-catalog.entry@home-server": false, - "seat:mesh-unread.input": false, - "mesh-delivery-indexer.indexer": false, + "seat:mesh-catalog.input": true, + "seat:mesh-catalog.entry": false, + "seat:mesh-catalog.input@home-server": true, + "seat:mesh-catalog.entry@home-server": false, + "seat:mesh-unread.input": false, + "mesh-delivery-indexer.indexer": false, } { if got := c.chunked(key); got != want { t.Errorf("chunked(%s) = %v, want %v", key, got, want) diff --git a/node-tools/internal/runtime/gate.go b/node-tools/internal/runtime/gate.go index a29d84d..70e2feb 100644 --- a/node-tools/internal/runtime/gate.go +++ b/node-tools/internal/runtime/gate.go @@ -1,7 +1,6 @@ package runtime import ( - "fmt" "strings" "git.novox.be/novox/mesh-sdk/go/approval" @@ -55,32 +54,10 @@ func WithSeatDefinitions(defs func() map[string]seatdef.Definition) Option { return func(c *consumers) { c.definitions = defs } } -// admitted says why a seat's verb is refused to a caller, nil when it is answered: an unproven caller is refused, and so is -// every caller while the seat's definition is not read, names no such verb, or the verb's effective callers are empty; a -// proven caller is among them, since the grants part composes a verb's call subject only for its effective callers (A-179). -func (c *consumers) admitted(seat, verb, caller string) error { - if c.definitions == nil { - return nil - } - if caller == "" { - return fmt.Errorf("Not run: %s.%s takes no unproven caller: call it on its subject that names its caller, "+ - "mesh.seat.%s.call.%s.", seat, verb, seat, verb) - } - def, ok := c.definitions()[seat] - if !ok { - return fmt.Errorf("Not run: the definition of the seat %s is not yet read by this tool runner's seat list, so no caller "+ - "of %s.%s is admitted", seat, seat, verb) - } - for _, v := range def.Verbs { - if v.Name == verb { - if len(v.EffectiveCallers()) == 0 { - return fmt.Errorf("Not run: %s.%s is open to no caller", seat, verb) - } - return nil - } - } - return fmt.Errorf("Not run: the seat %s's definition names no verb %s, so no caller is admitted", seat, verb) -} +// admitted says why a seat's verb is refused to a caller: never. Every caller is admitted, whether or not the seat's definition +// is read and whatever callers it names (the operator, 2026-11-15 23:25 CET: every module, agent and operator may call anything; +// approval stays as the mark on a verb, held by the gate). +func (c *consumers) admitted(seat, verb, caller string) error { return nil } // unservedMarks is, of the module's marked tools, those its bundle's registrations under its own name do not register. func (r *runner) unservedMarks(module string, regs []launch.Registration) []string {