Skip to content

Unify Harness process lifetimes and preserve interruption - #449

Merged
JacobStephens2 merged 2 commits into
mainfrom
issue-448
Oct 6, 2026
Merged

JacobStephens2 merged 2 commits into
mainfrom
issue-448

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Summary

Live Sessions remain interruptible after CLI exit, and unread prompts cannot block supervision. Sessions, Muse/OpenCode checks and OpenCode export share one Harness process owner.

spawn child + stdout + optional stdin/stderr workers
supervise until child exits AND every worker finishes
on interruption or transport failure:
  adapter.stop → reap child → join all started workers
return exit status + consumed output

Session logging preserves raw bytes and live progress. Consumer failures retain the partial stream for after-exit recovery, warnings and elapsed/usage reporting before returning the original error. The old captured-execution module is removed.

Evidence

  • Before: interrupting_a_live_session_after_cli_exit_stops_the_command_holding_stdout failed on main: interruption waited for the finite stdout holder's natural expiry.
    After: passes with the under-two-second SIGINT bound and owned-command termination assertion. The equivalent captured regression uses the same bound.
  • Before: the review regression a_log_failure_still_recovers_and_reports_warnings_and_usage failed because a logging error skipped the warning and recovered usage summary.
    After: passes, preserving the original BrokenPipe error, once-only warning and exported usage summary.
  • Validation: cargo fmt --check, cargo check --all-targets, cargo clippy --all-targets -- -D warnings, and full cargo test passed on Linux: 1,184 tests passed, 0 failed, across 39 test binaries.
  • Seams under test: Harness process output and streaming; the thirdshift CLI in process-isolated Scenario regressions. Coverage includes exact captured bytes/status, raw streamed bytes, stdin transport/closure, EOF before exit, retained stdout/stderr after exit, unread/broken prompts, consumer failure/panic, escaped-group cleanup and normal background-work survival.
  • Review against main: Standards had no findings; Spec finding P1 was addressed and both reviewers rechecked the final diff.

Merge Danger

Door: two-way

The implementation can be reverted without a configuration or data migration.

Blast Radius: Harness

Changes session/check/export process lifetimes across all six Harnesses. Adapter stop signals and ten-second grace periods are retained.

Unaddressed findings

Standards

None. No Standards findings were raised.

Spec

None. P1 was addressed; no Spec findings were skipped.

Closes #448

Built with codex · gpt-6.1-sol · xhigh

@JacobStephens2
JacobStephens2 merged commit 92897b1 into main Oct 6, 2026
13 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-448 branch October 6, 2026 19:22
This was referenced Oct 6, 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.

Deepen Harness process execution around one owned lifetime

1 participant