Repository navigation
Commit 4637c60
fix(desktop): stabilize flaky DM expansion E2E ordering assertions (#2004)
## Summary
Fixes 4 flaky DM expansion E2E tests in Desktop Smoke shard 1 that were
failing non-deterministically on CI (also reproducing on `main` at run
`29526844596`).
**Failing tests:**
- `channels.spec.ts:652` — creates the DM before preparing a persona
mention
- `channels.spec.ts:760` — routes an agent mention from an existing DM
to the expanded conversation
- `channels.spec.ts:815` — routes a relay-agent mention from an existing
DM to the expanded conversation
- `channels.spec.ts:940` — drops an expanded DM after the first message
fails
## Root Cause
Race condition: under fast CI execution, mock command completions
(create_managed_agent, open_dm) can resolve in non-deterministic order,
causing assertions to observe stale or mid-transition state.
## Fix
- **:652** — Move the `new-message-recipient-popover` hidden assertion
after `chat-title` settles (both names present), so it runs
post-transition rather than mid-transition.
- **:760, :940** — Add `createManagedAgentDelayMs: 100` to ensure
persona provisioning doesn't collapse into the same tick as the
expanded-DM open/start sequence.
- **:815** — Add `openDmDelayMs: 100` so the two open_dm calls resolve
in deterministic order.
## Validation
All 4 tests pass with `--repeat-each=3` (12/12 green) locally. Biome
lint clean.
## Scope
Test-only change: 12 insertions, 1 deletion in
`desktop/tests/e2e/channels.spec.ts`.
---
Investigated by Ferret, reviewed by Grumplestiltzkin.
Signed-off-by: Cameron Hotchkies <[email protected]>
Co-authored-by: Goose <[email protected]>1 parent 122e060 commit 4637c60
1 file changed
Lines changed: 12 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
712 | 712 | | |
713 | 713 | | |
714 | 714 | | |
715 | | - | |
716 | 715 | | |
717 | 716 | | |
718 | 717 | | |
719 | 718 | | |
720 | 719 | | |
721 | 720 | | |
722 | 721 | | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
723 | 725 | | |
724 | 726 | | |
725 | 727 | | |
| |||
782 | 784 | | |
783 | 785 | | |
784 | 786 | | |
| 787 | + | |
| 788 | + | |
785 | 789 | | |
786 | 790 | | |
| 791 | + | |
787 | 792 | | |
788 | 793 | | |
789 | 794 | | |
| |||
837 | 842 | | |
838 | 843 | | |
839 | 844 | | |
| 845 | + | |
| 846 | + | |
840 | 847 | | |
| 848 | + | |
841 | 849 | | |
842 | 850 | | |
843 | 851 | | |
| |||
967 | 975 | | |
968 | 976 | | |
969 | 977 | | |
| 978 | + | |
| 979 | + | |
970 | 980 | | |
971 | 981 | | |
| 982 | + | |
972 | 983 | | |
973 | 984 | | |
974 | 985 | | |
| |||
0 commit comments