The console passes a seat verb's arguments on when it holds no definition of the seat (issue 1966)
mesh/delivery merged: source.main moved to novox/mesh-tools@f4b4fb908f37
mesh/delivery-group group fix/1966-seat-reads-bootstrap merged: every member is merged
mesh/check failed (2): mesh-delivery-checker: no published of the tagged version of go-sdk of mesh-delivery…; and 1 more | 7572627affde on f4b4fb908f37

A seat verb whose holder announced an empty schema was judged as taking
nothing: shanks' tool runner refused "mesh-module-assigner.propose takes no
argument changes, why — it takes nothing". The console now judges such a
call by the verb's input in the seat's definition this runner holds; where
it holds none (it waits for the seat list, holding only the bootstrapped
definitions), the arguments go to the holder, which judges its own input,
and mesh_describe says the definition is not held instead of showing an
empty schema.

Claude-Session: https://claude.ai/code/session_01NcbgfFfQ4Z9UE5jK32PmE5
This commit is contained in:
2026-11-08 02:45:30 +01:00
parent d184862b1a
commit 7572627aff
2 changed files with 63 additions and 0 deletions
@@ -44,6 +44,27 @@ func TestAMeshSeatsNodeIsItsOwnArgument(t *testing.T) {
t.Fatalf("another machine in the arguments than in the address was dropped: %v", err)
}
// Issue 1966: a seat verb its holder announced with an empty schema is judged by the definition this runner holds;
// where it holds none (it waits for the seat list, holding the bootstrapped ones), the arguments go to the holder,
// which judges them, and mesh_describe says the definition is not held.
empty := json.RawMessage(`{"type":"object","properties":{}}`)
propose := target{Address: "mesh-module-assigner.propose", Seat: true,
Tool: Tool{Module: "mesh-module-assigner", Name: "propose", Seat: true, Scope: "mesh", Input: empty}}
if sent, err := argumentsAsSent(propose, map[string]any{"changes": []any{}, "why": "w"}); err != nil || sent["why"] != "w" {
t.Fatalf("a held definition's arguments were refused: %v %v", sent, err)
}
if _, err := argumentsAsSent(propose, map[string]any{"chnages": 1}); err == nil || !strings.Contains(err.Error(), "chnages") {
t.Fatalf("an argument the held definition does not declare was sent: %v", err)
}
unheld := target{Address: "mesh-not-yet-read.act", Seat: true,
Tool: Tool{Module: "mesh-not-yet-read", Name: "act", Seat: true, Scope: "mesh", Input: empty}}
if sent, err := argumentsAsSent(unheld, map[string]any{"changes": 1}); err != nil || sent["changes"] != 1 {
t.Fatalf("a seat whose definition is not held refused its arguments: %v %v", sent, err)
}
if _, held := seatDefinitionHeld(unheld); held || !strings.Contains(notHeld("mesh-not-yet-read"), "no definition of mesh-not-yet-read") {
t.Fatal("a definition not held is said to be held")
}
// A module's tool is its own: what it takes beyond node is the module's to judge.
beta := target{Address: "desk/beta.three", Node: "desk", Tool: Tool{Module: "beta", Name: "three"}}
if sent, err := argumentsAsSent(beta, map[string]any{"node": "desk", "verbose": true}); err != nil || sent["verbose"] != true || sent["node"] != nil {