Commit a6dc5f1
authored
test(daemon): fix steering-timestamp flake in message-delivery-mode-queue (#2554)
The "immediate steering while busy" test slept a fixed 2s after busy and
then asserted steeredTimestamp < resultTimestamp. Under CI scheduling the
sleep can outlast the whole dev-proxy mock turn (~1.6s): the steer job is
then claimed milliseconds after the turn settles, takes the promote path
into a fresh turn, and its consumption-aligned timestamp lands after the
original turn's final result (both CI failures showed the steer claimed
1-2ms after settle, timestamp 6-7ms after the result).
Waiting for assistant content does not fix it — the mock response is
non-streaming, so the assistant message and the final result persist
within the same millisecond (verified locally: content-triggered steers
still landed 8-12ms after the result). Instead, steer as soon as the
turn's kickoff flips to consumed (the SDK generator's admission signal,
the earliest point a steer can be inserted), with busyness re-checked as
the last signal before sending and a skip guard when the turn ends first.
Local dev-proxy validation: steer consumed ~980ms after admission and
9.7-11.8s before the result, 8 consecutive passes.1 parent 105f40d commit a6dc5f1
1 file changed
Lines changed: 46 additions & 2 deletions
Lines changed: 46 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
90 | 127 | | |
91 | 128 | | |
92 | 129 | | |
| |||
201 | 238 | | |
202 | 239 | | |
203 | 240 | | |
204 | | - | |
205 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
206 | 250 | | |
207 | 251 | | |
208 | 252 | | |
| |||
0 commit comments