test: bound SSH fish helper pipe draining

Merged
TE
2mo ago
+157-47

The SSH/fish integration test waits for its child before reading stdout/stderr. A child that fills either pipe can block before exiting; an inherited writer can also keep EOF open after the direct child exits. This PR drains both pipes concurrently and bounds the post-exit drain at two seconds, retaining stderr for failure diagnosis.

The integration test and new WorkspaceSSHFishProcessDrainTests share SSHFishProcessRunner. The new Swift Testing regressions do not require fish or SSH:

  • 512 KiB output on stdout and stderr must complete without a child timeout; stderr remains complete.
  • A background child retaining the pipe writers for 15 seconds must not delay the direct child's result until EOF. The fixture cleans up that child afterward.

This PR does not add a separate workflow gate or change shard packing, retries, runner size, or production app behavior. Earlier descriptions of a dedicated SSH/fish tail gate do not describe the current diff.

Validation: test target wiring check passes (1,037 test files), Swift file-length budgets pass, and git diff --check passes. The existing process implementation was moved without behavior changes when adding the regressions. This Linux host has no Swift compiler; compiling and executing the new Swift tests remains required through ordinary PR CI. No extra native run was dispatched.

Related: #12180, #7471, #6134.

Summary by CodeRabbit

  • Tests
    • Expanded automated coverage for SSH-fish subprocesses that produce large amounts of output or leave background processes running. These checks verify that output is handled and processes return without waiting indefinitely.