Skip to content

Fix macOS stdout-holder interruption test timing - #560

Merged
JacobStephens2 merged 2 commits into
issue-427from
issue-559
Oct 8, 2026
Merged

JacobStephens2 merged 2 commits into
issue-427from
issue-559

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 8, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fix the false macOS failure by timing the stdout holder's stop before Failed run preservation and cleanup.

 on(interruption after the Harness CLI exits)
-  wait for the whole Run to finish
-  require whole-Run completion within two seconds
+  require the stdout holder to stop within two seconds
+  wait for the Run to finish preservation and cleanup
+  verify interrupted work reaches origin through a slow receive hook

Closes #559

Evidence

  • Before: A three-second receive hook reproduced the reported assertion failure with cargo test --test process_tree interrupting_a_live_session_after_cli_exit_stops_the_command_holding_stdout -- --exact --nocapture (exit 101; 4.31 seconds).
    After: The same command passed while retaining the two-second holder-stop bound and verifying preserved work on origin.
  • Temporarily disabling process-group signals made that exact test fail at the holder-stop assertion (exit 101; 9.22 seconds). Production stopping was restored; no production code is changed.
  • All 19 tests in cargo test --test process_tree passed. cargo check --all-targets, cargo fmt --check, and cargo clippy --all-targets -- -D warnings passed.
  • Full-suite result: cargo test passed: 1503 tests passed, zero failed, 1 existing ignored test.

Test seams

  • The thirdshift CLI Run: interrupt after its Harness CLI exits while an owned process still holds stdout; observe that exact PID stopping within two seconds, and verify Failed run preservation reaches origin even when its push is slow.

Review

Fixed point: GitHub's issue-427 at bdeac1e, pinned from origin/issue-427; the older local branch checked out in another worktree was left untouched.

Standards: one P3 Duplicated Code judgement call, addressed by reusing Scenario::repo_has_hook. Spec: no findings.

Changed files left unread: Standards — none; Spec — none. Both reviewers read tests/process_tree.rs, the only changed file.

Unaddressed findings

Standards

None.

Spec

None.

Merge Danger

Door: two-way

Test-only change, reversible by reverting the commits.

Blast Radius: tests

The receive hook belongs to the test's temporary origin. CI jobs and production interruption behavior are unchanged.

Built with codex · gpt-6.1-sol · xhigh

@JacobStephens2
JacobStephens2 merged commit b532e6d into issue-427 Oct 8, 2026
13 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-559 branch October 8, 2026 07:41
This was referenced Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant