G-catalog-B 7: a transfer dropped by hand is recorded through mesh-hand-acts first
registry_incoming, npm_incoming and go_incoming dropped a transfer by hand with only a log line. Each drop now records its hand act through the seat mesh-hand-acts before anything goes, as nats_requests does; an act not recorded leaves the transfer open. distribution's manifest invokes the seat. Claude-Session: https://claude.ai/code/session_01JG73KJNrH5EgFXMKKYSrig
This commit is contained in:
@@ -6,7 +6,6 @@ package main
|
||||
// when its idle key ends (the bus's marker), never on a timer.
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
@@ -36,10 +35,7 @@ func incomingTool(typ, seat string, holder func() (*packageseats.Holder, error))
|
||||
return nil, err
|
||||
}
|
||||
if id := str(args, "drop"); id != "" {
|
||||
if str(args, "why") == "" {
|
||||
return nil, errors.New("a drop is a hand act: say why")
|
||||
}
|
||||
t, err := h.Drop(seat, id)
|
||||
t, err := h.DropByHand(seat, id, stdio.CallerOf(args), str(args, "why"))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ import (
|
||||
npmreg "git.novox.be/novox/mesh-contracts/go/seats/npmpackageregistry"
|
||||
stdio "git.novox.be/novox/mesh-sdk/go"
|
||||
"git.novox.be/novox/mesh-sdk/go/delivery"
|
||||
"git.novox.be/novox/mesh-sdk/go/handacts"
|
||||
"git.novox.be/novox/mesh-sdk/go/health"
|
||||
"git.novox.be/novox/mesh-sdk/go/parts"
|
||||
|
||||
@@ -263,6 +264,12 @@ func finding(kind, subject, words string, raised bool) {
|
||||
}
|
||||
}
|
||||
|
||||
// recordAct records a hand act through the seat mesh-hand-acts alone.
|
||||
func recordAct(q handacts.Request) error {
|
||||
_, err := handacts.Recorder{Ask: stdio.Ask}.Record(q)
|
||||
return err
|
||||
}
|
||||
|
||||
// boundCap is incoming's cap from its binding, read once per bundle.
|
||||
var boundCap = parts.BusCap(packageseats.IncomingObjects)
|
||||
|
||||
@@ -275,7 +282,7 @@ func busHolder(forge func() (*Forge, error)) (*packageseats.Holder, error) {
|
||||
return &packageseats.Holder{Callers: callers, Objects: parts.BusObjects(packageseats.IncomingObjects),
|
||||
Transfers: parts.BusTransfers[packageseats.Opening](packageseats.TransfersState),
|
||||
Builder: delivery.BuilderVersions{Ask: stdio.Ask}, Store: seatStore{forge}, Say: say, Finding: finding,
|
||||
Cap: boundCap, Idle: parts.BusArm(packageseats.IdleState)}, nil
|
||||
Cap: boundCap, Record: recordAct, Idle: parts.BusArm(packageseats.IdleState)}, nil
|
||||
}
|
||||
|
||||
// SeatTools are both seats' verbs as tools <seat>.<verb>.
|
||||
|
||||
Reference in New Issue
Block a user