mesh-build-go: build_go_step names both key forms; the test uses the asker's real form
Builds: design 47 G §481; H-A-765; issue 1984 note 52
This commit is contained in:
@@ -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 <node>.<id>. Read-only.",
|
||||
"(a fetch's workspace id is there). id is the step id a step tool answered, or the whole key: <node>.<id>, or <asker>.<node>.<id> " +
|
||||
"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 <node>.<id>"}}},
|
||||
"id": map[string]any{"type": "string", "description": "the step id, or the key <node>.<id> or <asker>.<node>.<id>"}}},
|
||||
Run: func(args map[string]any) (any, error) {
|
||||
id, _ := args["id"].(string)
|
||||
return m.ReadStep(id)
|
||||
|
||||
@@ -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} {
|
||||
|
||||
Reference in New Issue
Block a user