Keep the spacedock launcher resident — spawn the host instead of exec'ing away#442
Merged
Merged
Conversation
execHost.Launch now spawns the host as a child (exec.Command+Wait), inherits the terminal, and propagates the host's exit code, so spacedock stays the host's parent in the process tree (legible session managers; future sidecar supervision) instead of replacing itself via syscall.Exec. Shared-foreground-group model (no Setpgid): the host owns the controlling TTY and the kernel delivers terminal signals to it directly. The launcher absorbs SIGINT/SIGQUIT (stays resident; the host got its own copy from the foreground group), forwards pid-targeted SIGTERM/SIGHUP, and leaves SIGTSTP/SIGCONT/SIGWINCH at default. Exit code is ProcessState.ExitCode() refined to 128+signum on unix signal death. hostOps/piRuntimeOps Launch changes error -> (int, error) at every implementor and call site (including the fakePiRuntimeOps test fake). The signal model + exit mapping live in a //go:build unix helper with a //go:build !unix no-op so GOOS=windows still builds (unix launch lane only; no Windows claim). AC tests (re-exec helper-process harness): AC-1 resident parent vs the syscall.Exec baseline, AC-2 exit-code propagation incl. genuine signal death, and AC-3 PTY-backed terminal-signal delivery via github.com/creack/pty (test-only). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
clkao
added a commit
that referenced
this pull request
Jun 30, 2026
The SIGWINCH resize subtest timed out on the Linux CI runner while passing on macOS: it grepped the stub log for "SIGNAL window size changes", but syscall.Signal.String() renders SIGWINCH as "window changed" on Linux (and "window size changes" only on darwin/BSD). The signal WAS delivered — the matcher was platform-specific, not a timing race. Stop matching on syscall.Signal.String(): the stub now logs a fixed token per signal (SIGNAL SIGINT/SIGTERM/SIGHUP/SIGWINCH), and SIGWINCH re-reads and logs the new window size so the assertion pins the resize-triggered signal (40x120), not an incidental one. All three PTY subtests hardened consistently. waitForLog budget raised to 10s (well under the stub's 30s self-exit) for loaded-CI headroom. The launcher signal model is untouched. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
gcko
added a commit
that referenced
this pull request
Jun 30, 2026
Brings the seam PR up to latest main (0.23.0): the skill<->binary contract bump 1->2 (#443), the resident launcher (#442), the signal-forward pump fix (#444), and the entity end-value gate (#441). Conflict: .claude-plugin/plugin.json — kept this branch's `hooks` key and adopted main's `version: 0.23.0` + `requires-contract: >=2,<3` (CONTRACT_VERSION is now 2). shared-core.md auto-merged (disjoint regions). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Jared Scott <jared.scott@infuseai.io>
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.
The launcher now stays resident as the host's parent instead of exec'ing away — keeping
spacedock <host>legible in process listings and enabling future sidecars.What changed
syscall.Execwith a resident-parent spawn-wait sharing the terminal's foreground process group.(int, error)Launchsignature, threaded through all three hosts.Evidence
vv