Repository navigation
Commit 8817578
authored
test(ssh): synchronize protocol stop fixtures with process exit (#666)
Protocol-stop success cases race the remote script's real two-second grace period on busy runners. Make their fixture termination explicit: a socket controller waits for readiness, sends real SIGTERM to the captured fixture PID, releases its exit barrier, and waits for process-exit EOF. The production stop script, ownership probes, and timeout defaults are unchanged.
Keep all 20 existing cases and add one manager-level failure/recovery case. Without the controller, the process acknowledges SIGTERM but remains alive across the real deadline; the test asserts the exact timeout message and intact ownership files, then releases and verifies cleanup. Unrelated PID, external/busy/unknown runtime, disconnect/shutdown, and old-entry Node/shim assertions remain.
Closes #651. Refs #487.
Validation:
- Baseline `f045007ed`: focused protocol-stop file, 20/20 passed.
- Deterministic RED: disable only the signal controller while keeping the exit barrier; the existing disconnect/runtime-command case fails with `did not stop within 2 seconds`. Repeated with the same result.
- GREEN before the dev refresh: 21/21 passed. Package typecheck and lint passed (existing unrelated lint warnings).
- Merged current dev `2e5707d82` (#658); current head `127792f87546f6b5d982206f2858e0783c3cefa3`: focused file **21/21 passed**, 251.52 s, exit 0; package typecheck **exit 0**; package lint **exit 0**, five existing warnings outside changed files. Commands: from `packages/ssh`, `vp test run --config vite.config.ts --testTimeout 180000 src/tunnel.protocol-stop.test.ts` and `vp run typecheck`; from root, `vp lint --report-unused-disable-directives packages/ssh`.
- #658 compared before editing: it does not change these protocol fixture files. No runnerProcess or replacement-lock changes in this lane.
Residual / NOT RUN: #487's EADDRINUSE handoff remains: `reserveLoopbackPort()` closes its probe/claim sockets before the runtime binds. No Net.ts redesign, whole-package/repo-wide local tests, real SSH host/hardware, client UI, or merge. Native subprocess/socket proof only; Effect TestClock cannot control these shell/process waits. Hosted CI remains pending, not certified.
Hosted CI on the exact head: [goat-ci run 39568217741](https://github.com/goat-si/goat/actions/runs/39568217741), event `pull_request`, attempt **1**. `goat-scope` job **119115614611** and `goat-screenshot-gate` **119115614840** succeeded. Queued: `goat-typecheck` **119116632677**, `goat-test-ssh` **119116632877**, `goat-check` **119116632909**, `goat-build` **119116632971**, `goat-test-desktop` **119116633408**. GOAT will watch pending checks; no merge authority.
Model: gpt-6-astra (high). Harness: Codex through GOAT.1 parent 58a29e2 commit 8817578
3 files changed
Lines changed: 171 additions & 3 deletions
File tree
- packages/ssh/src
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| 45 | + | |
44 | 46 | | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| 50 | + | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
| |||
67 | 70 | | |
68 | 71 | | |
69 | 72 | | |
70 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
71 | 77 | | |
72 | 78 | | |
73 | 79 | | |
| |||
243 | 249 | | |
244 | 250 | | |
245 | 251 | | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
246 | 301 | | |
247 | 302 | | |
248 | 303 | | |
| |||
262 | 317 | | |
263 | 318 | | |
264 | 319 | | |
| 320 | + | |
265 | 321 | | |
| 322 | + | |
266 | 323 | | |
267 | 324 | | |
268 | 325 | | |
| |||
322 | 379 | | |
323 | 380 | | |
324 | 381 | | |
| 382 | + | |
325 | 383 | | |
326 | 384 | | |
327 | 385 | | |
| |||
351 | 409 | | |
352 | 410 | | |
353 | 411 | | |
| 412 | + | |
354 | 413 | | |
355 | 414 | | |
356 | 415 | | |
| |||
362 | 421 | | |
363 | 422 | | |
364 | 423 | | |
| 424 | + | |
365 | 425 | | |
366 | 426 | | |
367 | 427 | | |
| |||
439 | 499 | | |
440 | 500 | | |
441 | 501 | | |
| 502 | + | |
442 | 503 | | |
443 | 504 | | |
444 | 505 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
254 | 256 | | |
255 | 257 | | |
256 | 258 | | |
257 | | - | |
258 | | - | |
| 259 | + | |
259 | 260 | | |
260 | 261 | | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
261 | 294 | | |
262 | 295 | | |
263 | 296 | | |
| |||
290 | 323 | | |
291 | 324 | | |
292 | 325 | | |
| 326 | + | |
293 | 327 | | |
294 | 328 | | |
295 | 329 | | |
| |||
443 | 477 | | |
444 | 478 | | |
445 | 479 | | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
446 | 486 | | |
447 | 487 | | |
448 | 488 | | |
| |||
0 commit comments