Repository navigation
test(ssh): wait for a real zombie before the unreaped-server launch test - #597
Merged
Merged
Conversation
The "replaces a managed server that exited but was not reaped" test
spawned `sh -c "sleep 600 & echo $!; exec sleep 600"`, killed the
background child as soon as its PID arrived, and read `ps -o stat=` once.
The PID arrives while dash is still finishing the `echo` builtin, and
dash reaps exited children after every builtin. When the SIGKILL landed
in that window, the shell reaped the child before exec'ing `sleep`, so
`ps` found no process and printed nothing ("expected '' to include 'Z'").
The test now waits until the parent has exec'd `sleep`, which never
reaps, before killing the child, then polls with a bounded deadline
until `ps` reports the zombie, since SIGKILL also takes effect
asynchronously. The test came from upstream T3 (#19432), which still
has the race; the change sits in a SCIENT-FORK region.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
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. |
yaacovcorcos
pushed a commit
that referenced
this pull request
Oct 19, 2026
yaacovcorcos
pushed a commit
to nattikahana/scient-desktop
that referenced
this pull request
Oct 20, 2026
A queue entry ran the full matrix even when its PR's CI had just passed on the same content. Now a merge_group run reuses that PR run when it tested the same tree against the same base and the PR head already holds that tree: the PR contained the latest main when its CI ran, nothing landed since, and nothing is queued ahead. Then the merge changes nothing, so the PR's changed-file list equals the queue's diff for every change gate, and Compute recipe sealing's path-limited history read follows the PR head, never the merge commit, whose timestamp differs between the two merges. - Same-repository PR runs record a qualification receipt (schema 2: event, tested merge commit, base, tree). Fork PRs never do. - The queue probe checks the queue commit merges exactly that PR head onto the group base, and that the PR run's tested merge has the same tree and parents, then republishes its seven reports. - A matrix job skipped as a whole reports one unexpanded name, so reusing queue runs add small jobs that report the required Test Web N and Test Server N names. - A main push that lands several queue entries now reuses when each entry qualified from its first parent back to the previous main, up to the queue's four-entry merge limit. Before, ScientFactory#597 and ScientFactory#598 landing together made ScientFactory#598's push run full CI ("Qualification receipt differs"). Any missing, expired or mismatched evidence still runs normal CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Changed
packages/ssh/src/tunnel.test.ts, "replaces a managed server that exited but was not reaped": instead of reading the background child's process state once, the test now waits (polling every 0.1 s, at most ~10 s) untilsleep, and only then kills the child, andpsreports the child as a zombie (Z).Test-only, inside a
SCIENT-FORKregion (the test comes from upstream T3 #19432; upstream main still has the same code). No timeouts raised, product code unchanged.Why
The test is a recurring flake in the required "Test Workspaces" job:
expected '' to include 'Z'(main runs 39170121279 and 39155611850, 18 October). A flake there throws PRs out of the merge queue.The parent is
sh -c "sleep 600 & echo $!; exec sleep 600". On Ubuntushis dash, which reaps exited children after every builtin, including thatecho(dash 0.5.12trap.c:90-91installs the SIGCHLD handler;eval.c:922reaps after builtins). The PID reaches the test while dash is still finishing theecho; a kill in that window is reaped before theexec, so no zombie exists andpsprints nothing, which is exactly the''in the failing runs (a merely late kill would show a live state such asS).Verification
vp fmt --check,vp lint,tsc-rs --noEmitforpackages/ssh,git diff --check: clean.Documentation Impact
None — test-only change.
🤖 Generated with Claude Code