From 3ea81943f5dcb3db3249270bd05c2bdec219ef66 Mon Sep 17 00:00:00 2001 From: jochen Date: Mon, 9 Nov 2026 09:05:30 +0100 Subject: [PATCH] The wait-for-the-composer test settles the want again without a real sleep (issue 1966) Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i --- internal/agent/agent_test.go | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/internal/agent/agent_test.go b/internal/agent/agent_test.go index 74c5d69..87a4a2b 100644 --- a/internal/agent/agent_test.go +++ b/internal/agent/agent_test.go @@ -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)