The wait-for-the-composer test settles the want again without a real sleep (issue 1966)

Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
2026-11-09 09:05:30 +01:00
parent 3dc4307aec
commit 3ea81943f5
+14 -2
View File
@@ -1604,8 +1604,20 @@ func TestTheNodesOwnCompositionIsAppliedWhenItDiffersAndARecordMoveWaitsForAYes(
}
eventually(t, "the wait for the composer was not said", func() bool { return saidCount() == 1 })
// Settled again by another want's change, it is neither said nor told again.
want("web", fp, "")
b.wants.put(gk, graw)
other, oraw, _ := unsigned("ghost", fpOf("8"), file("ghost", "x", "1"))
settledGhost := func() (n int) {
b.mu.Lock()
defer b.mu.Unlock()
for _, m := range b.settled {
if m == "ghost" {
n++
}
}
return n
}
settledBefore := settledGhost()
b.comps.put(other, oraw)
eventually(t, "ghost was not settled again", func() bool { return settledGhost() > settledBefore })
eventually(t, "the composer was not told", func() bool { toldMu.Lock(); defer toldMu.Unlock(); return len(told) == 1 })
if _, err := b.ag.Composition(context.Background(), "ghost", "", false); err == nil || !strings.Contains(err.Error(), "waits for the composer: no manifest in the composer's picture") {
t.Errorf("the composition read of ghost says %v, want why the composer made none", err)