Repository navigation
Commit 4e8e22f
authored
test(gateway): assert settled run ownership by fact, not label (#129033)
The chat.run.settled assertion matched sessions.changed on its `reason`
label. That label is best-effort by design: emitSessionsChanged coalesces
per session key and keeps only the newest payload, so any same-key emit
inside the 100ms/500ms window replaces an earlier reason while the row
itself (activeRunIds/hasActiveRun/lastRunId) is still rebuilt at
broadcast time. On a contended runner the test could therefore wait out
its full 8s budget even though ownership settlement was published
correctly.
Match the published ownership fact instead - the same fields the TUI and
Control UI actually consume - which is a stricter contract than the
label and immune to coalescing. Producer left untouched: the settle emit
sits in the dispatch tail's unconditional finally and its trailing
broadcast is bounded and always rebuilt, so no settlement fact can be
lost or reordered.1 parent eca3660 commit 4e8e22f
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2572 | 2572 | | |
2573 | 2573 | | |
2574 | 2574 | | |
| 2575 | + | |
| 2576 | + | |
| 2577 | + | |
| 2578 | + | |
2575 | 2579 | | |
2576 | 2580 | | |
2577 | 2581 | | |
2578 | 2582 | | |
2579 | 2583 | | |
2580 | | - | |
2581 | 2584 | | |
| 2585 | + | |
| 2586 | + | |
| 2587 | + | |
2582 | 2588 | | |
2583 | 2589 | | |
2584 | 2590 | | |
| |||
0 commit comments