Mark the build modules moved, so a machine assigned them composes before the forge serves their entry (issue 1537)
mesh/merge-gate head c7e892ca63b3 merged into trunk 82649bc770d1 — pass: builds mesh-build-go, mesh-build-node, sent nowhere; no bus step; every machine co…
mesh/repo-check head c7e892ca63b3 merged into trunk 82649bc770d1 — pass: its merge-check.sh passed, each part in its toolchain: merge-check.sh (go), merge-…
mesh/delivery delivered

This commit is contained in:
2026-10-20 22:59:36 +00:00
parent 82649bc770
commit c7e892ca63
6 changed files with 31 additions and 1 deletions
@@ -23,6 +23,7 @@ const (
)
type forgeManifest struct {
Moved bool `json:"moved"`
Requires []any `json:"requires"`
State []any `json:"state"`
Resources []map[string]any `json:"resources"`
@@ -44,6 +45,16 @@ func readForgeManifest(t *testing.T) forgeManifest {
return m
}
// The forge files are filled on the node by the provisioner's client, never by the controller (ADR 0466 §4, ADR 0400
// §5, issue 1537): the forge serves a module's entry only after the module has run and reported its key (ADR 0400
// §2), so a controller filling them would refuse the machine until then, and the module could never run.
func TestTheForgeFilesAreFilledOnTheNodeSoTheModuleCanRunBeforeItsEntry(t *testing.T) {
if !readForgeManifest(t).Moved {
t.Errorf("%s's manifest does not say \"moved\": true, so the controller fills its forge files and refuses "+
"every machine it is assigned to until the forge serves an entry it makes only after the module ran", forgeModule)
}
}
func forgeTemplate(t *testing.T, r map[string]any) string {
t.Helper()
name, _ := r["template"].(string)