From 38559d71ecd85a67b9971d3d17f716f83b682fe3 Mon Sep 17 00:00:00 2001 From: jochen Date: Wed, 25 Nov 2026 23:09:16 +0100 Subject: [PATCH] mesh-build-go: build_go_step names both key forms; the test uses the asker's real form MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Builds: design 47 G §481; H-A-765; issue 1984 note 52 --- modules/mesh-build-go/cmd/mesh-build-go/read.go | 5 +++-- modules/mesh-build-go/cmd/mesh-build-go/read_test.go | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/mesh-build-go/cmd/mesh-build-go/read.go b/modules/mesh-build-go/cmd/mesh-build-go/read.go index 22f44e252..3949dfb72 100644 --- a/modules/mesh-build-go/cmd/mesh-build-go/read.go +++ b/modules/mesh-build-go/cmd/mesh-build-go/read.go @@ -254,9 +254,10 @@ func (m *Module) ReadTools() []stdio.Tool { {Name: StepReadTool, Description: "What one step of this machine ended with, as stored in the module's steps state: its tool, state " + "(running, passed, failed, refused), when it started and ended, why it failed or was refused, and its result " + - "(a fetch's workspace id is there). id is the step id a step tool answered, or the whole key .. Read-only.", + "(a fetch's workspace id is there). id is the step id a step tool answered, or the whole key: ., or .. " + + "for an ask's step, the asker the asking seat's name. Read-only.", Input: map[string]any{"type": "object", "required": []string{"id"}, "properties": map[string]any{ - "id": map[string]any{"type": "string", "description": "the step id, or the key ."}}}, + "id": map[string]any{"type": "string", "description": "the step id, or the key . or .."}}}, Run: func(args map[string]any) (any, error) { id, _ := args["id"].(string) return m.ReadStep(id) diff --git a/modules/mesh-build-go/cmd/mesh-build-go/read_test.go b/modules/mesh-build-go/cmd/mesh-build-go/read_test.go index e4ea8115d..673694c30 100644 --- a/modules/mesh-build-go/cmd/mesh-build-go/read_test.go +++ b/modules/mesh-build-go/cmd/mesh-build-go/read_test.go @@ -75,7 +75,7 @@ func TestStepToolAnswersTheStoredStep(t *testing.T) { } } // An ask's step is stored under its asker (design 47 G §481, issue 1984 note 52): found by its id, or by its whole key. - asked, _ := sdkstep.AskStepKey("pipeline", "ace", "mwwmppk5788534") + asked, _ := sdkstep.AskStepKey("mesh-wants", "ace", "mwwmppk5788534") b, _ := sdkstep.EncodeStep(sdkstep.Step{ID: "mwwmppk5788534", Tool: "build_go_test", Node: "ace", State: sdkstep.StepPassed, Started: t0, Ended: t0.Add(time.Second)}) steps[asked] = b for _, id := range []string{"mwwmppk5788534", "ace.mwwmppk5788534", asked} {