test(daemon): isolate attachment render batches
- commit
- 17c28afaa20aafe45c7c47ca332446f0a47ef545
- author
- brice · · 2026-07-12 05:18 UTC
- parent
- 146cf2e
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
1 file · +2 -2
M internal/usecase/daemon/render_test.go +2 -2
| @@ -288,7 +288,7 @@ func TestPTYReaderRepublishesSynchronizedCompletionAfterAttachmentLifecycle(t *t | |||
| 288 | 288 | fireCoordinatorTimer(t, rc, drainCoordinatorTimers(clock), urgentRenderDeadline) | |
| 289 | 289 | wake := <-previews | |
| 290 | 290 | require.True(t, wake.urgent) | |
| 291 | - | require.Equal(t, 2, wake.coalesced, "completion retains coordinator coalescing across the cleared attachment work") | |
| 291 | + | require.Equal(t, 1, wake.coalesced, "completion starts a fresh headless preview batch after detach") | |
| 292 | 292 | select { | |
| 293 | 293 | case duplicate := <-previews: | |
| 294 | 294 | t.Fatalf("sync completion must publish exactly one preview wake: %#v", duplicate) | |
| @@ -331,7 +331,7 @@ func TestPTYReaderRepublishesSynchronizedCompletionAfterAttachmentLifecycle(t *t | |||
| 331 | 331 | wake := <-wakes | |
| 332 | 332 | require.True(t, wake.urgent) | |
| 333 | 333 | require.True(t, wake.reset, "the replacement's cleared batch must repaint a complete frame") | |
| 334 | - | require.Equal(t, 3, wake.coalesced, "completion must retain the replacement reset and coordinator coalescing") | |
| 334 | + | require.Equal(t, 2, wake.coalesced, "completion coalesces only with the replacement's fresh reset batch") | |
| 335 | 335 | require.Same(t, replacement, wake.attachment) | |
| 336 | 336 | select { | |
| 337 | 337 | case duplicate := <-wakes: | |
| @@ -288,7 +288,7 @@ func TestPTYReaderRepublishesSynchronizedCompletionAfterAttachmentLifecycle(t *t | |||||
| 288 | fireCoordinatorTimer(t, rc, drainCoordinatorTimers(clock), urgentRenderDeadline) | 288 | fireCoordinatorTimer(t, rc, drainCoordinatorTimers(clock), urgentRenderDeadline) | ||
| 289 | wake := <-previews | 289 | wake := <-previews | ||
| 290 | require.True(t, wake.urgent) | 290 | require.True(t, wake.urgent) | ||
| 291 | - | require.Equal(t, 2, wake.coalesced, "completion retains coordinator coalescing across the cleared attachment work") | 291 | + | require.Equal(t, 1, wake.coalesced, "completion starts a fresh headless preview batch after detach") |
| 292 | select { | 292 | select { | ||
| 293 | case duplicate := <-previews: | 293 | case duplicate := <-previews: | ||
| 294 | t.Fatalf("sync completion must publish exactly one preview wake: %#v", duplicate) | 294 | t.Fatalf("sync completion must publish exactly one preview wake: %#v", duplicate) | ||
| @@ -331,7 +331,7 @@ func TestPTYReaderRepublishesSynchronizedCompletionAfterAttachmentLifecycle(t *t | |||||
| 331 | wake := <-wakes | 331 | wake := <-wakes | ||
| 332 | require.True(t, wake.urgent) | 332 | require.True(t, wake.urgent) | ||
| 333 | require.True(t, wake.reset, "the replacement's cleared batch must repaint a complete frame") | 333 | require.True(t, wake.reset, "the replacement's cleared batch must repaint a complete frame") | ||
| 334 | - | require.Equal(t, 3, wake.coalesced, "completion must retain the replacement reset and coordinator coalescing") | 334 | + | require.Equal(t, 2, wake.coalesced, "completion coalesces only with the replacement's fresh reset batch") |
| 335 | require.Same(t, replacement, wake.attachment) | 335 | require.Same(t, replacement, wake.attachment) | ||
| 336 | select { | 336 | select { | ||
| 337 | case duplicate := <-wakes: | 337 | case duplicate := <-wakes: | ||