From 6cde12bf2fc8404797f46bac84e58a4a6d04d0fd Mon Sep 17 00:00:00 2001 From: jochen Date: Fri, 20 Nov 2026 03:19:16 +0100 Subject: [PATCH] BUILD-1: the build modules wire no asker judgement of the step runner MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The three build modules no longer give the step runner a callers reader of the seat list (steprun.SeatListCallers and Puller.Callers go): no seat definition names callers and every account may call every verb. Builds: design 47 H §752, §764 (every seat contract: the callers lists); H-A-41, H-A-66, H-A-71 (3) Claude-Session: https://claude.ai/code/session_01JG73KHUnBze48rdua8u2sy --- modules/mesh-build-go/cmd/mesh-build-go/asks.go | 5 +---- modules/mesh-build-go/cmd/mesh-build-go/asks_say_test.go | 4 ---- modules/mesh-build-go/cmd/mesh-build-go/module.go | 3 --- modules/mesh-build-image/cmd/mesh-build-image/asks.go | 5 +---- .../mesh-build-image/cmd/mesh-build-image/asks_say_test.go | 4 ---- modules/mesh-build-image/cmd/mesh-build-image/module.go | 3 --- modules/mesh-build-node/cmd/mesh-build-node/asks.go | 5 +---- modules/mesh-build-node/cmd/mesh-build-node/asks_say_test.go | 4 ---- modules/mesh-build-node/cmd/mesh-build-node/module.go | 3 --- 9 files changed, 3 insertions(+), 33 deletions(-) diff --git a/modules/mesh-build-go/cmd/mesh-build-go/asks.go b/modules/mesh-build-go/cmd/mesh-build-go/asks.go index 6b9093461..7d8315498 100644 --- a/modules/mesh-build-go/cmd/mesh-build-go/asks.go +++ b/modules/mesh-build-go/cmd/mesh-build-go/asks.go @@ -57,9 +57,6 @@ func (m *Module) askSteps(steps []StepTool) steprun.AskSteps { func (m *Module) Puller(steps []StepTool, source steprun.AskSource) *steprun.Puller { if source == nil { source = &steprun.SeatAsks{Language: sdkstep.AskGo, Logf: m.Say} - if m.Callers == nil { - m.Callers = steprun.SeatListCallers(sdkstep.AskGo, m.Say) - } } capacity := m.Capacity // The capacity's own change wakes the puller (issue 1887): the runtime's watch of the config value as mesh-config @@ -91,7 +88,7 @@ func (m *Module) Puller(steps []StepTool, source steprun.AskSource) *steprun.Pul if m.SayEvent != nil { say = steprun.SayOn(sdkstep.AskGo, m.Node, m.SayEvent) } - return &steprun.Puller{KeepOutput: steprun.KeepOutputIn(m.Outputs), Source: source, Language: sdkstep.AskGo, Say: say, Callers: m.Callers, Prior: steprun.PriorRuns(m.ReadSteps.Get), Node: m.Node, Put: m.Steps, PausePut: m.Pauses, Load: load, ForgetPause: m.ForgetPause, WatchPauses: m.WatchPauses, PauseKeys: m.ReadPauses.Keys, + return &steprun.Puller{KeepOutput: steprun.KeepOutputIn(m.Outputs), Source: source, Language: sdkstep.AskGo, Say: say, Prior: steprun.PriorRuns(m.ReadSteps.Get), Node: m.Node, Put: m.Steps, PausePut: m.Pauses, Load: load, ForgetPause: m.ForgetPause, WatchPauses: m.WatchPauses, PauseKeys: m.ReadPauses.Keys, Capacity: capacity, SettingsFile: settings, WatchConfig: watch, CoresPerStep: cores, BuildHours: hours, Logf: m.Say, Has: m.Has, Run: func(ctx context.Context, a sdkstep.StepAsk) (any, error) { if err := m.Check(ctx); err != nil { diff --git a/modules/mesh-build-go/cmd/mesh-build-go/asks_say_test.go b/modules/mesh-build-go/cmd/mesh-build-go/asks_say_test.go index f10e55ab4..2c8f1ccdd 100644 --- a/modules/mesh-build-go/cmd/mesh-build-go/asks_say_test.go +++ b/modules/mesh-build-go/cmd/mesh-build-go/asks_say_test.go @@ -11,15 +11,11 @@ import ( func TestPullerSaysTheSeatsEventsOnItsNodesSubject(t *testing.T) { var subjects []string m := &Module{Node: "ace", Capacity: func() int { return 0 }, - Callers: func(kind string) ([]string, bool) { return []string{"mesh-pipeline-runner"}, kind == "step" }, SayEvent: func(subject string, _ any, _ string) error { subjects = append(subjects, subject); return nil }} p := m.Puller(nil, steprun.NewFakeAsks()) if p.Say == nil { t.Fatal("the puller says no event") } - if got, ok := p.Callers("step"); !ok || len(got) != 1 { - t.Fatalf("the puller checks the callers of %v, %v, not the module's", got, ok) - } seat, _ := sdkstep.BuildSeat(sdkstep.AskGo) for _, event := range []string{"ask-taken", "step-progress", "step-ended"} { if err := p.Say(event, nil, "id"); err != nil { diff --git a/modules/mesh-build-go/cmd/mesh-build-go/module.go b/modules/mesh-build-go/cmd/mesh-build-go/module.go index 38329cb9a..439bb08bf 100644 --- a/modules/mesh-build-go/cmd/mesh-build-go/module.go +++ b/modules/mesh-build-go/cmd/mesh-build-go/module.go @@ -25,9 +25,6 @@ const CheckRound = 10 * time.Minute // Module is the Go build module's one running state: the node it runs on, its recipe, the toolchain guard and the // states it writes (toolchains, steps). type Module struct { - // Callers says which seats the build seat's definition lists as callers of an accepted kind (steprun.SeatListCallers when - // the module pulls through its runtime; nil in a test checks no named asker): design 47 G §543, A-163. - Callers func(kind string) ([]string, bool) // SayEvent publishes an event of the go build seat on a seat subject (stdio.SeatPublish; nil says none, a test's): the // puller's ask-taken, step-progress and step-ended (design 47 G §496, §602). SayEvent func(subject string, body any, id string) error diff --git a/modules/mesh-build-image/cmd/mesh-build-image/asks.go b/modules/mesh-build-image/cmd/mesh-build-image/asks.go index 761209beb..30ade441c 100644 --- a/modules/mesh-build-image/cmd/mesh-build-image/asks.go +++ b/modules/mesh-build-image/cmd/mesh-build-image/asks.go @@ -49,9 +49,6 @@ func (m *Module) sayStep() func(sdkstep.StepEnded) error { func (m *Module) Puller(steps []StepTool, source steprun.AskSource) *steprun.Puller { if source == nil { source = &steprun.SeatAsks{Language: sdkstep.AskImage, Logf: m.Say} - if m.Callers == nil { - m.Callers = steprun.SeatListCallers(sdkstep.AskImage, m.Say) - } } capacity := m.Capacity // The capacity's own change wakes the puller (issue 1887): the runtime's watch of the config value as mesh-config @@ -80,7 +77,7 @@ func (m *Module) Puller(steps []StepTool, source steprun.AskSource) *steprun.Pul if m.SayEvent != nil { say = steprun.SayOn(sdkstep.AskImage, m.Node, m.SayEvent) } - return &steprun.Puller{KeepOutput: steprun.KeepOutputIn(m.Outputs), Source: source, Language: sdkstep.AskImage, Say: say, Callers: m.Callers, Prior: steprun.PriorRuns(m.ReadSteps.Get), Node: m.Node, Put: m.Steps, PausePut: m.Pauses, Load: load, ForgetPause: m.ForgetPause, WatchPauses: m.WatchPauses, PauseKeys: m.ReadPauses.Keys, + return &steprun.Puller{KeepOutput: steprun.KeepOutputIn(m.Outputs), Source: source, Language: sdkstep.AskImage, Say: say, Prior: steprun.PriorRuns(m.ReadSteps.Get), Node: m.Node, Put: m.Steps, PausePut: m.Pauses, Load: load, ForgetPause: m.ForgetPause, WatchPauses: m.WatchPauses, PauseKeys: m.ReadPauses.Keys, Capacity: capacity, SettingsFile: settings, WatchConfig: watch, CoresPerStep: cores, BuildHours: hours, Eligible: m.Eligible, Logf: m.Say, Run: func(ctx context.Context, a sdkstep.StepAsk) (any, error) { if err := m.Check(ctx); err != nil { diff --git a/modules/mesh-build-image/cmd/mesh-build-image/asks_say_test.go b/modules/mesh-build-image/cmd/mesh-build-image/asks_say_test.go index dd42d4a9a..afe9e94e5 100644 --- a/modules/mesh-build-image/cmd/mesh-build-image/asks_say_test.go +++ b/modules/mesh-build-image/cmd/mesh-build-image/asks_say_test.go @@ -11,15 +11,11 @@ import ( func TestPullerSaysTheSeatsEventsOnItsNodesSubject(t *testing.T) { var subjects []string m := &Module{Node: "ace", Capacity: func() int { return 0 }, - Callers: func(kind string) ([]string, bool) { return []string{"mesh-pipeline-runner"}, kind == "step" }, SayEvent: func(subject string, _ any, _ string) error { subjects = append(subjects, subject); return nil }} p := m.Puller(nil, steprun.NewFakeAsks()) if p.Say == nil { t.Fatal("the puller says no event") } - if got, ok := p.Callers("step"); !ok || len(got) != 1 { - t.Fatalf("the puller checks the callers of %v, %v, not the module's", got, ok) - } seat, _ := sdkstep.BuildSeat(sdkstep.AskImage) for _, event := range []string{"ask-taken", "step-progress", "step-ended"} { if err := p.Say(event, nil, "id"); err != nil { diff --git a/modules/mesh-build-image/cmd/mesh-build-image/module.go b/modules/mesh-build-image/cmd/mesh-build-image/module.go index 87b2eca49..a5679adca 100644 --- a/modules/mesh-build-image/cmd/mesh-build-image/module.go +++ b/modules/mesh-build-image/cmd/mesh-build-image/module.go @@ -20,9 +20,6 @@ const CheckRound = 10 * time.Minute // Module is the image build module's one running state. type Module struct { - // Callers says which seats the build seat's definition lists as callers of an accepted kind (steprun.SeatListCallers when - // the module pulls through its runtime; nil in a test checks no named asker): design 47 G §543, A-163. - Callers func(kind string) ([]string, bool) // Outputs is the object store of a run's answers over what step-ended carries inline (steprun.OutputsStore); nil keeps none. Outputs steprun.OutputObjects // SayEvent publishes an event of the image build seat on a seat subject (stdio.SeatPublish; nil says none, a test's): the diff --git a/modules/mesh-build-node/cmd/mesh-build-node/asks.go b/modules/mesh-build-node/cmd/mesh-build-node/asks.go index 34a1d46c7..dc864e5e6 100644 --- a/modules/mesh-build-node/cmd/mesh-build-node/asks.go +++ b/modules/mesh-build-node/cmd/mesh-build-node/asks.go @@ -61,9 +61,6 @@ func (m *Module) sayStep() func(sdkstep.StepEnded) error { func (m *Module) Puller(steps []StepTool, source steprun.AskSource) *steprun.Puller { if source == nil { source = &steprun.SeatAsks{Language: sdkstep.AskNode, Logf: m.Say} - if m.Callers == nil { - m.Callers = steprun.SeatListCallers(sdkstep.AskNode, m.Say) - } } capacity := m.Capacity // The capacity's own change wakes the puller (issue 1887): the runtime's watch of the config value as mesh-config @@ -92,7 +89,7 @@ func (m *Module) Puller(steps []StepTool, source steprun.AskSource) *steprun.Pul if m.SayEvent != nil { say = steprun.SayOn(sdkstep.AskNode, m.Node, m.SayEvent) } - return &steprun.Puller{KeepOutput: steprun.KeepOutputIn(m.Outputs), Source: source, Language: sdkstep.AskNode, Say: say, Callers: m.Callers, Prior: steprun.PriorRuns(m.ReadSteps.Get), Node: m.Node, Put: m.Steps, PausePut: m.Pauses, Load: load, ForgetPause: m.ForgetPause, WatchPauses: m.WatchPauses, PauseKeys: m.ReadPauses.Keys, + return &steprun.Puller{KeepOutput: steprun.KeepOutputIn(m.Outputs), Source: source, Language: sdkstep.AskNode, Say: say, Prior: steprun.PriorRuns(m.ReadSteps.Get), Node: m.Node, Put: m.Steps, PausePut: m.Pauses, Load: load, ForgetPause: m.ForgetPause, WatchPauses: m.WatchPauses, PauseKeys: m.ReadPauses.Keys, Capacity: capacity, SettingsFile: settings, WatchConfig: watch, CoresPerStep: cores, BuildHours: hours, Logf: m.Say, Run: func(ctx context.Context, a sdkstep.StepAsk) (any, error) { if err := m.Prepare(ctx); err != nil { diff --git a/modules/mesh-build-node/cmd/mesh-build-node/asks_say_test.go b/modules/mesh-build-node/cmd/mesh-build-node/asks_say_test.go index 3ab0b2618..5869cb558 100644 --- a/modules/mesh-build-node/cmd/mesh-build-node/asks_say_test.go +++ b/modules/mesh-build-node/cmd/mesh-build-node/asks_say_test.go @@ -11,15 +11,11 @@ import ( func TestPullerSaysTheSeatsEventsOnItsNodesSubject(t *testing.T) { var subjects []string m := &Module{Node: "ace", Capacity: func() int { return 0 }, - Callers: func(kind string) ([]string, bool) { return []string{"mesh-pipeline-runner"}, kind == "step" }, SayEvent: func(subject string, _ any, _ string) error { subjects = append(subjects, subject); return nil }} p := m.Puller(nil, steprun.NewFakeAsks()) if p.Say == nil { t.Fatal("the puller says no event") } - if got, ok := p.Callers("step"); !ok || len(got) != 1 { - t.Fatalf("the puller checks the callers of %v, %v, not the module's", got, ok) - } seat, _ := sdkstep.BuildSeat(sdkstep.AskNode) for _, event := range []string{"ask-taken", "step-progress", "step-ended"} { if err := p.Say(event, nil, "id"); err != nil { diff --git a/modules/mesh-build-node/cmd/mesh-build-node/module.go b/modules/mesh-build-node/cmd/mesh-build-node/module.go index 4b83bc294..ac30b5810 100644 --- a/modules/mesh-build-node/cmd/mesh-build-node/module.go +++ b/modules/mesh-build-node/cmd/mesh-build-node/module.go @@ -25,9 +25,6 @@ const CheckRound = 10 * time.Minute // Module is the Node build module's one running state: the node it runs on, its recipe, the toolchain guard, the // toolchain directory and the states it writes (toolchains, steps). type Module struct { - // Callers says which seats the build seat's definition lists as callers of an accepted kind (steprun.SeatListCallers when - // the module pulls through its runtime; nil in a test checks no named asker): design 47 G §543, A-163. - Callers func(kind string) ([]string, bool) // Outputs is the object store of a run's answers over what step-ended carries inline (steprun.OutputsStore); nil keeps none. Outputs steprun.OutputObjects // SayEvent publishes an event of the node build seat on a seat subject (stdio.SeatPublish; nil says none, a test's): the