Repository navigation
session host: a signal between the child's reap and its record is treated as one after - #517
Merged
Merged
Conversation
… of it is treated as one after (TestASignalAfterTheReapIsRefused's flake, 9 static reruns). The kernel's refusal of a child already gone (ESRCH; on macOS a zombie's group, EPERM) reads as gone: a writer's signal is answered 'no running child', the host's own SIGTERM relay waits only for the reap's record, not the grace. The three after-the-reap tests run with the reap recorded and held unrecorded by a test seam (afterReap), so both paths are deterministic; a kernel test pins the refusals childGone reads. Prebuilds rebuilt (3 of 3 match); the tech-debt row closes. Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
…x CI, 42391503459): dash without a tty leaves a descendant in the child's group, as an engine's tool processes are, and a group signal between the reap and its record reached it. signalChild probes the child first and reads the kernel's refusals; the fixture leaves its descendant in the group on both platforms, the recorded cases assert no signal is tried, and the unrecorded writer case that no exit follows (the descendant took nothing). The PID 1 credentials case is gone (a container's init may share the test's uid). Prebuilds rebuilt (3 of 3 match). Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
SSFSKIM
added a commit
that referenced
this pull request
Nov 7, 2026
…eek runs on M7b, M6a and #517; the render readings over DAEMON_IDLE_BOUND attributed, the fix in flight Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
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.
Fixes the
TestASignalAfterTheReapIsRefusedflake: 9 reruns of the static job on trees whosenative/session-hostmatched master. The latest was static run 42389297575.The cause, and why the fix is in the host
wait()records the reap undermuright aftercmd.Wait()returns. A signal sent between those two steps passedsignallable()and reached the kernel, which no longer knows the pid, so the reply wassignal: no such process. A real client can hit this whenever its signal lands as the engine exits; it is the same microsecond that D66(3) accepts for pid reuse. So the host is fixed (option b), not the test's wait.Two more cases came up along the way.
signal: operation not permitted.The change
signalChild(host/signals.go) is the one way the host signals its child. It treats a child that is already gone as gone, not as an error:kill(pid, 0).no running child, the same answer as after the record.reapedis now a channel, so the relay can wait on it.afterReapis a test seam, likebeforeSpawn.Tests
The three after-the-reap tests now each run twice: once with the reap recorded, and once with the record held open by the seam. Both paths are deterministic. Other changes:
exitfollows, which shows the descendant received nothing.TestASignalToAnExitedChildFindsItGonepins the kernel replies thatsignalChildrelies on, using a real zombie and then the reaped child.Each regression fails at least one test:
Local runs (macOS, Go 1.25.3):
-count=300gives 300/300 for both subtests;-race -count=100passes all four tests 100/100;go vetis clean;go test -race ./...passes.The prebuilds are rebuilt, and 3 of 3 match their source. The tech-debt row for this flake is removed.
Gate:
--gates static,unit,probes, run 42393161302 on bbf6bc8, green; the Linux Go tests pass. The earlier run, 42391503459 on bd755d7, is the one that found the Linux group case. Its unit 2/4 failure was the known desk-hubaudience-readsflake.Still open
The pid-reuse microsecond that D66(3) accepts is still there. Closing it would mean reaping under
mu, for examplewait4(WNOHANG)driven by SIGCHLD in place ofcmd.Wait(). That is a reaper redesign, which this PR does not do.Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)