Skip to content
Source
Sign inSign up
pingdotgg/t3code

test(ssh): unreaped-server test no longer loses its zombie fixture #22427

Mergedjuliusmarmingemerged 1 commit intomain fromrefs/pull/22427/headmerged by juliusmarminge View on GitHub

juliusmarmingecommented

tunnel.test.ts › "replaces a managed server that exited but was not reaped" flaked on main (run) with expected 1 to equal +0 and an empty message.

The fixture builds a zombie with sh -c "sleep 600 & echo $!; exec sleep 600" and kills the child as soon as it reads its pid. If the kill lands before the shell has exec'd into sleep, dash reaps the dead child itself, so no zombie forms and ps -p exits 1 with no output. Running that setup 1,600 times with eight copies in parallel lost the zombie 4 times.

Fix

Before killing the child, wait until ps -o comm= reports the parent as sleep (matched as *sleep for macOS, which prints the full path). With that wait, the same 1,600-run harness produced a zombie every time. The test passed 10 of 10 local runs.

🤖 Generated with Claude Code

    1. Approvability

      Verdict: Approved at 01a59b8

      Macroscope's review found this PR approvable — This is a small, localized SSH test-fixture reliability change confined to ignored test paths. It does not modify production behavior, product defaults, or static-analysis configuration.

      Notes:

      • No code objects were reviewed. Approvability was decided on eligibility alone.
      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    2. juliusmarminge merged this2893437

    3. juliusmarminge closed this

    4. Thread transfer impact

      ✅ Thread transfer remains within every enforced ceiling.

      ℹ️ The exact PR base did not have a successful artifact. Baseline uses the latest successful main measurement shown below.

      ProviderMetricMain baselineThis PRImpactPR ceiling
      CodexTotal thread wire5.0 KiB5.0 KiB0 B (0.0%)6.8 KiB✅
      CodexThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiB✅
      CodexLive turn WebSocket wire1.2 KiB1.2 KiB0 B (0.0%)2.0 KiB✅
      CodexLive turn WebSocket decoded20.9 KiB20.9 KiB0 B (0.0%)29.3 KiB✅
      CodexLive turn messages220 (0.0%)8✅
      ClaudeTotal thread wire5.0 KiB5.0 KiB+7 B (+0.1%)6.8 KiB✅
      ClaudeThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiB✅
      ClaudeLive turn WebSocket wire1.2 KiB1.2 KiB+7 B (+0.6%)2.0 KiB✅
      ClaudeLive turn WebSocket decoded21.2 KiB21.2 KiB0 B (0.0%)29.3 KiB✅
      ClaudeLive turn messages220 (0.0%)8✅

      Baseline: 758d773 · PR result: 01a59b8 · Source CI: success

      Scenario and decoded snapshot size

      10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

      • Codex decoded thread snapshot: 108.5 KiB
      • Claude decoded thread snapshot: 108.8 KiB

      Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

Sign in to join this conversation.