Read tier 1's build and the note once the plan has reached them in the silent middle tier test (issue 1160)
mesh/merge-gate head 1ec27e6ba18f merged into trunk 461fa9c7b4ed — pass: builds mesh-controller → novox; no bus step; every machine composes with the chang…
mesh/repo-check head 1ec27e6ba18f merged into trunk 461fa9c7b4ed — pass: its merge-check.sh passed
mesh/delivery covered after its stop: a later merge that contains it was delivered: novox/mesh-controller@75a27ec1a4bc (merged as b1cfb85f into main, wal…

This commit is contained in:
2026-10-18 21:24:07 +02:00
parent 425134784a
commit 1ec27e6ba1
@@ -185,10 +185,20 @@ func TestAPlanPassesATierWhoseMachineNeverReportsAfterTheBoundAndSendsTheNextToT
if got := plan().Tier; got != 0 { 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) 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 }) // The note of the move to tier 1 is read in the step that sees it: later steps of the tier say their own.
if note := plan().Note; !strings.Contains(note, "laptop") || strings.Contains(note, "anchor") { var moved string
t.Errorf("1160/AC5: the plan says %q; want laptop named silent and not anchor", note) 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"] b := plan().Modules["b"]
askedAt, _ := link.BuildAskedAt(b.Build) askedAt, _ := link.BuildAskedAt(b.Build)
record(b.Build, "b", "c2", askedAt) record(b.Build, "b", "c2", askedAt)