Commit 939935b
committed
feat(h12): WS drop+reconnect mid-train recovery e2e
Closes V5-G08 honesty gap: V5 only added the bottom-strip
'bottom-strip-reconnecting' testid; nobody had asserted the actual
recovery path. The new scenario:
1. Patches window.WebSocket with an init script that records every
instance on `window.__vbgui_sockets`.
2. Starts an N=32 Train.
3. Calls page.evaluate to force-close every open socket → useRpc's
onclose handler fires → backend.status="disconnected"; the 2s
reconnect timer schedules a fresh attempt.
4. Polls backend-status until it shows "Reconnecting/Disconnected".
5. Polls until "Backend connected" returns (real backend stayed up;
the reconnect succeeds on the next attempt).
6. Asserts the pipeline.run HTTP request still completed — Train
row in the result modal shows status "ok".
Tests:
- vbgui e2e 66_ws_reconnect.spec.ts: 1/1 passing (~3.4s).
- vbgui e2e V6 suite (55–66): 13/13 passing — no regression.
Backend WS 1Hz heartbeat (H12.7) was already in place
(cppmega_v4/jsonrpc/server.py:117), so no backend changes needed.1 parent 9b30206 commit 939935b
1 file changed
Lines changed: 76 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
0 commit comments