test(cli): restore the run-command process-boundary contracts - #3710
Open
UncertaintyDeterminesYou4ndMe wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
The failing check is |
Restores the six contracts apache#2476 kept on a real subprocess and 802855c dropped with the process fixture: piped non-TTY stdin (run -, implicit stdin prompt, positional plus stdin context), SIGINT delivery observed as exit 130 with empty stdout, and the fail-closed sandbox boundary reaching a non-interactive run. The injected MakaRunDeps seam covers these semantics in process but not the boundary itself. The new fixture is a minimal subprocess entry over runMakaTextCliCore with default environment deps and four scripted scenarios — none of the in-process duplication the removal targeted. Generated-by: Claude Code
UncertaintyDeterminesYou4ndMe
force-pushed
the
test/2476-process-boundary-contracts
branch
from
August 24, 2026 11:55
a7aab6a to
f5fff10
Compare
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.
Summary
Restores the six process-boundary contracts that were retained on a real subprocess in #2476 and lost when 802855c removed the process fixture — as invited in the closing review of #2476 (Refs #2476, refs #2387).
The injected
MakaRunDepsseam covers the semantics ofstdinIsTTY/readStdin, but not the boundary itself: a real pipe feeding the prompt, a SIGINT delivered by the operating system observed as exit 130 with nothing on stdout, and the fail-closed sandbox path traversing a real child process. Currentmainasserts none of these (stdinIsTTY/readStdinare exercised in process only; no test anywhere asserts SIGINT → 130; the remaining spawn incli.test.tscovers profile/identity files, not the run path).run-command-fixture.ts(new) — a subprocess entry over today'srunMakaTextCliCorewith default environment deps (real stdin, real SIGINT handler, real exit code) and a minimal scripted adapter: four scenarios (echo,sandbox-boundary,slow,graph-wait), no env-var assertion matrix, none of the in-process duplication that 802855c removed.fixture-readyis written only from inside the run (after the core has installed its SIGINT handler), so the test's signal cannot race the default disposition.run-command.test.ts— onedescribe('maka run process contract')block with the six tests, assertions unchanged from the pre-deletion suite:run -, implicit stdin prompt, positional + stdin context)Both signal tests carry bounded SIGKILL guards (never-ready, never-exiting) so a regression fails the suite instead of hanging it.
No production changes.
Verification
packages/cli:node --test dist/__tests__/run-command.test.js— 11/11, three consecutive rounds (the six subprocess tests add ~0.8s total); full CLI suite 442/442.dist/, reverted): disablingif (interrupted) return 130fails exactly the two SIGINT tests; disabling the implicit stdin read fails exactly the two non-run -stdin tests.tscclean.AI use
Select exactly one:
Tool(s) and scope: Claude Code authored the fixture and tests (ported from the pre-deletion suite) and ran the verification; commits carry
Generated-by: Claude Codetrailers. Reviewed and submitted by a human.Checklist
Does this PR entail a change in behavior?