From 25c08d09ec690b58455d47b5655bd44722b092c7 Mon Sep 17 00:00:00 2001 From: jochen Date: Tue, 3 Nov 2026 13:26:46 +0100 Subject: [PATCH] Name the _meta key the tool runner hands a bundle the id of the tool call in flight under (issue 1966 S4) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). --- go/buscalls/buscalls.go | 10 ++++++++-- go/packages_list_test.go | 4 ++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/go/buscalls/buscalls.go b/go/buscalls/buscalls.go index cac6428..45a818b 100644 --- a/go/buscalls/buscalls.go +++ b/go/buscalls/buscalls.go @@ -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"` diff --git a/go/packages_list_test.go b/go/packages_list_test.go index 5ea0910..4912c0a 100644 --- a/go/packages_list_test.go +++ b/go/packages_list_test.go @@ -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