SD5, BG11, BLD10: the build modules' shared code moves into the delivery SDK

All of mesh-build-go's buildstep Go module leaves mesh-catalog for
modules/mesh-delivery-sdk: the step run, fetch and release and the
regenerate-and-compare step as the package steprun, the CPU share as
steprun/buildcpu, the conformance kit as steprun/conformance, the seat
generator as seatgen with cmd/seatgen, and cmd/mesh-pack. The three
build modules and the builder's and checker's tests import the SDK and
keep no copy; the SDK requires nothing of mesh-catalog. Code the build
modules share is the delivery domain's SDK, not one module's package.
It carries the build-module round's two new files of that package
(dropdetected.go 247c422f, storedbuilds.go 904b8aed).

Builds: design 47 G §464, §680, §327, §420, §495

Claude-Session: https://claude.ai/code/session_01NcbgfGKaxw984XyAPfLm4h
This commit is contained in:
2026-11-12 05:18:34 +01:00
parent e4ef67adcd
commit ff6a8928d6
218 changed files with 452 additions and 14467 deletions
@@ -10,8 +10,8 @@ import (
"testing"
"time"
"git.novox.be/novox/mesh-catalog/modules/mesh-build-go/buildstep"
sdkstep "git.novox.be/novox/mesh-delivery/modules/mesh-delivery-sdk/buildstep"
"git.novox.be/novox/mesh-delivery/modules/mesh-delivery-sdk/steprun"
stdio "git.novox.be/novox/mesh-sdk/go"
)
@@ -50,7 +50,7 @@ func TestAPulledNodeAskRunsItsJob(t *testing.T) {
m := moduleWith(states, "v26.10.0")
m.Capacity = func() int { return 1 }
var calls []string
src := buildstep.NewFakeAsks()
src := steprun.NewFakeAsks()
build, check := nodeAsk(sdkstep.AskDelivery), nodeAsk(sdkstep.AskCheck)
_ = src.PublishAsk(check)
_ = src.PublishAsk(build)
@@ -92,27 +92,27 @@ func TestManifestTakesTheBuildCapacity(t *testing.T) {
}
_ = json.Unmarshal(raw, &doc)
// Issue 1806's follow-up: the cores a step needs is a setting of its own, in the settings file, with the SDK's default.
if cores := string(doc.Config[buildstep.CoresPerStepSetting].Default); cores != fmt.Sprint(buildstep.DefaultCoresPerStep[sdkstep.AskNode]) {
t.Errorf("the cores-per-step default = %s, want %g", cores, buildstep.DefaultCoresPerStep[sdkstep.AskNode])
if cores := string(doc.Config[steprun.CoresPerStepSetting].Default); cores != fmt.Sprint(steprun.DefaultCoresPerStep[sdkstep.AskNode]) {
t.Errorf("the cores-per-step default = %s, want %g", cores, steprun.DefaultCoresPerStep[sdkstep.AskNode])
}
if got := buildstep.NodeCoresPerStep(moduleDir+"/files/settings.json", 0, nil)(); got != buildstep.DefaultCoresPerStep[sdkstep.AskNode] {
if got := steprun.NodeCoresPerStep(moduleDir+"/files/settings.json", 0, nil)(); got != steprun.DefaultCoresPerStep[sdkstep.AskNode] {
t.Errorf("the settings template holds cores-per-step %g", got)
}
// And the build hours (the operator, 2026-10-26): a setting of their own, empty by default (any hour), in the template.
if hours := string(doc.Config[buildstep.BuildHoursSetting].Default); hours != `""` {
if hours := string(doc.Config[steprun.BuildHoursSetting].Default); hours != `""` {
t.Errorf("the build-hours default = %s, want empty", hours)
}
if w, fault := buildstep.NodeBuildHours(moduleDir+"/files/settings.json", "g14", t.Errorf)(); w != nil || fault != "" {
if w, fault := steprun.NodeBuildHours(moduleDir+"/files/settings.json", "g14", t.Errorf)(); w != nil || fault != "" {
t.Errorf("the settings template holds build hours %v (%s)", w, fault)
}
// ADR 0567 §15: build-hours names no node (one window, or empty for any hour) and capacity defaults to 0.
window := regexp.MustCompile("^(?:" + doc.Config[buildstep.BuildHoursSetting].Pattern + ")$")
window := regexp.MustCompile("^(?:" + doc.Config[steprun.BuildHoursSetting].Pattern + ")$")
for value, ok := range map[string]bool{"": true, "18:00-06:00": true, "g14=18:00-06:00": false, "18:00": false} {
if window.MatchString(value) != ok {
t.Errorf("build-hours pattern on %q: accepted %v, want %v", value, !ok, ok)
}
}
if strings.Contains(doc.Config[buildstep.BuildHoursSetting].Description, "=") {
if strings.Contains(doc.Config[steprun.BuildHoursSetting].Description, "=") {
t.Errorf("the build-hours description names a node pair")
}
var capacity float64
@@ -125,7 +125,7 @@ func TestManifestTakesTheBuildCapacity(t *testing.T) {
}
m0 := &Module{Node: "ace", Capacity: func() int { return 0 }}
served := map[string]stdio.Tool{}
for _, tool := range m0.SeatTools(m0.Puller(nil, buildstep.NewFakeAsks())) {
for _, tool := range m0.SeatTools(m0.Puller(nil, steprun.NewFakeAsks())) {
served[tool.Name] = tool
}
for _, verb := range []string{"current", "pause", "resume", "kept-artifact"} {