Send an approved settings layer by a walk at once, so the operator's Approve takes effect (issue 641, ADR 0344) #305

Merged
mesh-admin merged 4 commits from fix/641-an-approved-setting-is-sent into main 2026-10-13 17:22:20 +00:00
Showing only changes of commit e32ca00aed - Show all commits
+12
View File
@@ -413,6 +413,18 @@ func TestASettingsWalkSendsTheLayerAloneEveryBuildKept(t *testing.T) {
if kept, _ := recordedKept(ctx, w.open, "anchor"); kept["app"] != "" {
t.Fatalf("an ordinary send keeps a rolled-out build: %v", kept)
}
// And so the ungated build waiting on anchor is no move of the settings send's: nothing for a gate to see.
f, err := readMoveFacts(ctx, inv)
if err != nil {
t.Fatal(err)
}
waiting, _ := machineMoves(ctx, w.open, f, "anchor", false)
if len(waiting) != 1 || waiting[0].Module != "app" {
t.Fatalf("anchor waits for %+v, want app's c2", waiting)
}
if moved, err := withoutKept(keepingBuildsForSettings(ctx, "anchor"), w.open, "anchor", waiting); err != nil || len(moved) != 0 {
t.Fatalf("a settings send to anchor would move %+v (%v)", moved, err)
}
}
// A machine whose send would move a running module's data stops the walk there, failed and said with the push that