Name the _meta key the tool runner hands a bundle the id of the tool call in flight under (issue 1966 S4)
MetaCall, mesh/call: the id ApplyRequest.Call names, so the runner stamps the caller it proved as the operation's author (ADR 0597 §7; the lead's ruling on issue 1966 B1).
This commit is contained in:
@@ -13,6 +13,11 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// MetaCall is where in a `tools/call`'s `_meta` the tool runner hands a bundle the id of the tool call in flight: the id
|
||||
// ApplyRequest.Call names, so the runner stamps the caller it proved for that call as the operation's author (novox/hq
|
||||
// ADR 0597 §7). The runner writes `_meta`; a caller writes only `arguments`, so no caller can name another call.
|
||||
const MetaCall = "mesh/call"
|
||||
|
||||
// The methods a bundle asks the tool runner, one per call.
|
||||
const (
|
||||
ObjectsPut = "mesh/objects.put"
|
||||
@@ -188,8 +193,9 @@ type WorkQueueDeadLetters struct {
|
||||
// --- the ledger (ADR 0597)
|
||||
|
||||
// ApplyRequest applies one operation to one instance of a ledger. Call is the id of the tool call the operation
|
||||
// serves, whose caller the tool runner proved and stamps as the author (ADR 0597 §7); empty, the operation carries the
|
||||
// owning module's account alone. An author the bundle writes into Body is never taken as the author.
|
||||
// serves, as the tool runner handed it under MetaCall, whose caller the tool runner proved and stamps as the author
|
||||
// (ADR 0597 §7); empty, the operation carries the owning module's account alone. An author the bundle writes into Body
|
||||
// is never taken as the author.
|
||||
type ApplyRequest struct {
|
||||
Ledger string `json:"ledger"`
|
||||
Instance string `json:"instance"`
|
||||
|
||||
@@ -106,6 +106,10 @@ func TestMeshSDKHoldsOnlyWhatEveryModuleShares(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// 1966/AC5: the call an apply names is the id the tool runner hands under `_meta`'s mesh/call.
|
||||
if buscalls.MetaCall != "mesh/call" {
|
||||
t.Errorf("the tool call's id is handed under %q, not mesh/call", buscalls.MetaCall)
|
||||
}
|
||||
// 1966/AC5: an apply naming the tool call it serves, and its answer with the state behind, round-trip.
|
||||
for _, c := range []struct {
|
||||
name string
|
||||
|
||||
Reference in New Issue
Block a user