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) } }) }