From 8a534ba4361f72cd93a8b3b3e3cf441c880c82a2 Mon Sep 17 00:00:00 2001 From: jochen Date: Fri, 20 Nov 2026 02:47:04 +0100 Subject: [PATCH] T2b first-view tool by name form: the gate env test names no MESH_VIEW_CALLERS word MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The runner sets no MESH_VIEW_CALLERS env; the gate knows a first-view tool by its name forms (mesh-sdk 77a7b187). Builds: design 47 H ยง752, H-A-69 Claude-Session: https://claude.ai/code/session_01JG73KHUnBze48rdua8u2sy --- node-tools/internal/runtime/gate_env_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/node-tools/internal/runtime/gate_env_test.go b/node-tools/internal/runtime/gate_env_test.go index abf3bc9..90c99ac 100644 --- a/node-tools/internal/runtime/gate_env_test.go +++ b/node-tools/internal/runtime/gate_env_test.go @@ -6,16 +6,16 @@ import ( mt "github.com/novox/mesh-tools/node-tools/internal/meshtest" ) -// Design 47 G lead answers A-377: the call a module's tool reaches the gate by carries the module's composed -// environment, so the gate tells a first-view tool (the one whose MESH_VIEW_CALLERS_ the bundle holds) from an -// ordinary one while its catalog half is unread. +// The call a module's tool reaches the gate by carries the module's composed environment. The gate no longer tells a first-view tool +// by an environment word: it knows one by its name forms _first_views and _first_view_again (H-A-69), and the runner +// sets no view-callers word. func TestAModuleToolsCallCarriesItsBundlesComposedEnvironment(t *testing.T) { for name, tc := range map[string]struct { envs map[string]map[string]string want bool }{ - "a first-view tool": {map[string]map[string]string{"ledger": {"MESH_VIEW_CALLERS_WHO": "grants"}}, true}, - "an ordinary tool": {nil, false}, + "a module with an environment": {map[string]map[string]string{"ledger": {"LEDGER_WORD": "x"}}, true}, + "a module with none": {nil, false}, } { t.Run(name, func(t *testing.T) { mesh := mt.New(t) @@ -32,11 +32,11 @@ func TestAModuleToolsCallCarriesItsBundlesComposedEnvironment(t *testing.T) { var found bool for _, c := range gate.calls { if c.Seat == "" && c.Name == "who" { - _, found = c.Env["MESH_VIEW_CALLERS_WHO"] + _, found = c.Env["LEDGER_WORD"] } } if found != tc.want { - t.Errorf("the gate saw the first-view word: %v, want %v (calls %+v)", found, tc.want, gate.calls) + t.Errorf("the gate saw the composed word: %v, want %v (calls %+v)", found, tc.want, gate.calls) } }) }