Repository navigation
Keep setup PTY test children within fixture lifetime - #1062
Merged
Merged
Conversation
Merged
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
Keep Linux setup PTY test children from outliving their fixture, even when an inherited master remains open.
The isolated supervisor covers successful completion, assertion unwinding, timeout, SIGKILL, and SIGKILL with a retained PTY master. It adopts/reaps recorded children and owns its temporary subtree. Setup's production terminal and interruption code is unchanged.
macOS retains Drop cleanup and last-master hangup. The stronger retained-master guarantee is Linux-only; the macOS lifecycle supervisor test is explicitly skipped with that limit named.
Closes #736
Evidence
cargo test --test setup_lifetime setup_ends_after_sigkill_even_with_an_inherited_pty_master -- --nocapturefailed:owned setup child ... survived its fixtureafter five seconds. The test cleaned up its owned setup/keeper processes. The plain SIGKILL test already passed before the fix and is retained as a guard; the historical incident's original cause remains unknown.After:
cargo test --test setup_lifetimepasses all five lifecycle cases; one ignored test is the subprocess entry point. The retained-master regression remains in the suite.cargo test --test setup: 30 passed, including existing interruption and terminal-restoration assertions.cargo check --tests,cargo clippy --all-targets -- -D warnings, andcargo fmt --check: passed./usr/bin/time -p scripts/affected-tests mainselectedcargo nextest run: 2,228 passed, 3 skipped. Total wall time 1,111.07s, including 59.87s compilation; test execution 1,050.139s. This run started before the final duplicate-code extraction; the five lifecycle cases, targeted clippy, and formatting were rerun successfully on the final head (452afd1).452afd1: Linux Rust suite, macOS gate, Console, and site checks.Test seams
Scenario::run_terminal/run_terminal_bounded: real setup PTY child lifetime after fixture completion, assertion unwinding, bounded timeout, and SIGKILL of a separate fixture process; observe and reap exact owned PIDs.Review coverage
Reviewed against
main(cd7119f6ee1ea4570de24f2dd79cba319095c0ed) with independent Standards and Spec reviewers. Both read all four changed files:docs/testing.md,tests/setup_lifetime.rs,tests/support/child_lifetime.rs, andtests/support/mod.rs. Unread changed files: none. Generated-output exclusions: none.Standards raised one nonbehavioral Duplicated Code finding; addressed by
Fixture::kill_harness, confirmed by the reviewer. Spec raised no findings. Final reports, including each axis's files-read list, are saved in.thirdshift-review-GjlQmn/standards.mdand.thirdshift-review-GjlQmn/spec.mdin the worktree.Unaddressed findings
Standards
None.
Spec
None.
Security
None.
Security review outcome
No unaddressed introduced findings.
Merge Danger
Door: two-way
Blast Radius: Tests
Linux terminal-fixture child lifetime and its regression supervisor; no production behavior or dependencies change.
Built with codex · gpt-6.1-sol · xhigh