A delivery plan passes a machine silent past its bound at a middle tier, as at the last (issue 1160) #384

Merged
mesh-tools merged 2 commits from fix/1160-silent-mid-tier into main 2026-10-18 20:15:32 +00:00
Showing only changes of commit 1ec27e6ba1 - Show all commits
@@ -185,10 +185,20 @@ func TestAPlanPassesATierWhoseMachineNeverReportsAfterTheBoundAndSendsTheNextToT
if got := plan().Tier; got != 0 {
t.Fatalf("1160/AC5: the plan went on to tier %d before the bound, with laptop not heard from", got)
}
eventually(t, "tier 1 asked once laptop's key expired", func() bool { return plan().Tier == 1 })
if note := plan().Note; !strings.Contains(note, "laptop") || strings.Contains(note, "anchor") {
t.Errorf("1160/AC5: the plan says %q; want laptop named silent and not anchor", note)
// The note of the move to tier 1 is read in the step that sees it: later steps of the tier say their own.
var moved string
eventually(t, "tier 1 passed once laptop's key expired", func() bool {
if q := plan(); q.Tier == 1 {
moved = q.Note
return true
}
return false
})
if !strings.Contains(moved, "laptop") || strings.Contains(moved, "anchor") {
t.Errorf("1160/AC5: the plan says %q; want laptop named silent and not anchor", moved)
}
// The ask for tier 1's build is the next step, and records its build id on the module.
eventually(t, "tier 1 asked", func() bool { m := plan().Modules["b"]; return m != nil && m.Build != "" })
b := plan().Modules["b"]
askedAt, _ := link.BuildAskedAt(b.Build)
record(b.Build, "b", "c2", askedAt)