Repository navigation
test(ssh): establish the zombie fixture before checking replacement - #591
Conversation
|
What: Independent review found no supported blocking findings on Independent reviewer: gpt-6.1-sol through Codex, delegated review round
Author verification has since completed: 50/50 candidate repetitions and all 30 tests in the full file passed; targeted lint, format, and SSH-package typecheck passed. The reviewer did not rerun tests. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 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.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
f78bfe3 to
3340818
Compare
|
What: Independent review passed on Independent gpt-6.1-sol / Codex reviewer, round
Author reran |
What: Make the unreaped managed-server test establish its zombie fixture before checking replacement.
Why: Publishing the PID before shell
execlets the shell reap the killed child, andSIGKILLalone does not establish process exit.So what: The test retains real zombie and replacement coverage; maintainers review this PR for main without changing the launch script.
Problem
The fixture printed a background child's PID before its shell became a non-reaping parent, then killed that child and immediately asserted
psreportedZ. Those operations could race either shell reaping or process exit, producing the intermittentexpected '' to include 'Z'failure in #589. Reliable CI supports the current Objective across Chromeria changes.Change
Have the shell execute a Node parent before killing the inherited child. Register
SIGCHLDbefore sendingSIGKILL, and publish the PID only from that signal handler. The existing stdout read becomes an exit notification. The parent does not own a Node child-process handle, so it does not reap this child; its keepalive timer only preserves the parent's lifetime and performs no polling or synchronization.Retain the independent
pszombie assertion, stale PID/runtime records, and checks that the launcher starts a different live managed server. Register the carried test edit inscripts/fork-upstream-edits.txtwith exactly one primary owner,fork-maintenance, indocs/fork-features.md. No launch-script change, version bump, or website impact.Adapted from the same-fixture fix in pingdotgg/t3code#20052, inspected at
b3d651a5999b6de57e5c919d51a458263f5eff5e. Upstream main still polls; merged #22252 fixes a separate handover test and does not repair this fixture.Verification
Linux 7.2.5-3-omarchy, Node v26.8.2. Original starting base:
9378189f41e8cfa3e8e4ffe8a30f92e17b22bbc1. Rebased without conflicts onto currentorigin/mainat14bd851ff977049acce4cd2746b65cb9c442555b. Current candidate:3340818a4375b20d6a9e4f3a19365d8a0da7301c.node_modules/.bin/vp test run packages/ssh/src/tunnel.test.ts -t 'replaces a managed server that exited but was not reaped'passed. The intermittent CI failure was not reproduced locally; this is not a demonstrated red/green cycle.node_modules/.bin/vp test run packages/ssh/src/tunnel.test.ts: all 30 tests passed, including a fresh run on the rebased candidate.bash scripts/fork-check.sh --upstream upstream: reproduced the missing-allowlist failure before registration; passed on the current candidate (fork-features: OK (58 features),fork-check: OK).node_modules/.bin/vp lint packages/ssh/src/tunnel.test.ts: passed.node_modules/.bin/vp fmt --check packages/ssh/src/tunnel.test.ts: passed.node_modules/.bin/tsc-rs --noEmit -p packages/ssh/tsconfig.json: passed.git diff --check: passed. No repo-wide checks or browser verification run. CI results are tracked by this PR.Elon record
Requirements and who asked: The user and #589 require deterministic zombie setup without sleeps or polling, preserving exited-but-unreaped managed-server replacement coverage.
Deleted: Retrying/skipping the test, polling, production changes, a Spec, version bumps, and unrelated upstream handover changes.
Bottleneck: Observe child exit only after the parent can no longer reap it; a
SIGCHLDnotification supplies that event.Checked myself: Read #589 and both complete upstream PR diffs, inspected the fixture and unchanged assertions, ran 50 baseline and 50 candidate repetitions plus the full test file, and passed scoped static checks.
Closes #589
Model: gpt-6.1-sol. Harness: Codex.