A-2 the first call: a marked call is asked on operator-channel under its module's name and not run

The gate digests a marked call's act (address, node, module and tool or seat and verb,
build, each argument as itself or its canonical JSON), refuses at once and asks nothing
for a secret's shape or more than 16 KiB of arguments, and otherwise asks through
operator-channel's client under the marked module's name, its ask kept in the runner's
state approvals under the machine's keys with the act and the whole arguments, the act's
key naming it. The ask shows each argument whole only where it may leave the mesh, and the
first call answers Not run, with the router's record or without it within 5 seconds.

Builds: design 46 7-approval-mark §8, §9, §10, §11, §12, §13 (keys)

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
2026-11-12 05:09:20 +01:00
parent 827628164a
commit 9a8636a8ed
5 changed files with 811 additions and 0 deletions
+12
View File
@@ -9,6 +9,7 @@ import (
"time"
condseat "git.novox.be/novox/mesh-contracts/health-and-repair/go/seats/meshconditions"
stdio "git.novox.be/novox/mesh-sdk/go"
"git.novox.be/novox/mesh-sdk/go/keys"
)
@@ -38,6 +39,14 @@ type Deps struct {
Findings FindingWriter
Logf func(string, ...any)
Now func() time.Time
// After is the clock's pause; nil is time.After.
After func(time.Duration) <-chan time.Time
// State is the runner's state approvals; nil when its membership binds none, so every marked call is refused (§13).
State Store
// Publish says an accept on a seat under the module's name, on the runner's own account (§7).
Publish func(module, subject string, body any, id string) error
// Record reads the router's record of an ask, `<module>.<id>` in the seat's state asks, on the runner's own account (§14).
Record func(module, id string) (*stdio.StateEntry, error)
}
// Gate is the runner's approval gate: every call of a module it serves goes through it before the bundle (§20).
@@ -58,6 +67,9 @@ func New(d Deps) *Gate {
if d.Now == nil {
d.Now = time.Now
}
if d.After == nil {
d.After = time.After
}
return &Gate{d: d, registered: map[string]map[string]bool{}, unserved: map[string][]string{}}
}