carlos / platform Public

host: the held-pass test starts the converge loop inside the pass

Astra round 2 (accept with fixes): the loop was started before the tick
entered its full pass, so a cycle could be recorded before the pass and
the test would not prove the overlap it names.

Declined from the same finding: an end-to-end test with a real activator
pausing a replacement mid-wake across a config sync. The mechanism it
would exercise is the held bounce, which
TestBounceDuringAWakeIsAppliedWhenTheWakeFinishes covers directly and
fails without.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev a4991a0e2a792aab5a774e58abc64496b5616262 parent b43d05d
1 file changed, +4 −4
  • internal/host/converge_adopted_test.go +4 −4

CI passed — run details

diff --git a/internal/host/converge_adopted_test.go b/internal/host/converge_adopted_test.go
index 01630515a..ea527cd27 100644
--- a/internal/host/converge_adopted_test.go
+++ b/internal/host/converge_adopted_test.go
@@ -471,10 +471,6 @@ func TestConvergeLoopActsWhileTheFullPassIsBusy(t *testing.T) {
},
adoptedCyclesPerTick)
}
- stop := make(chan struct{})
- defer close(stop)
- go runConvergeLoop(leg, 5*time.Millisecond, stop)
-
ctx := context.Background()
now := time.Unix(1754640000, 0)
fastTick(ctx, d, now) // seeds the serial
@@ -484,6 +480,10 @@ func TestConvergeLoopActsWhileTheFullPassIsBusy(t *testing.T) {
tickDone := make(chan struct{})
go func() { fastTick(ctx, d, now.Add(10*time.Second)); close(tickDone) }()
<-inPass // the tick is now stuck in its full pass
+ // Started only now, so anything it cycles was cycled DURING the pass.
+ stop := make(chan struct{})
+ defer close(stop)
+ go runConvergeLoop(leg, 5*time.Millisecond, stop)
select {
case got := <-cycled: