Skip to content

Share Command execution ownership for capture and streaming - #469

Merged
JacobStephens2 merged 2 commits into
issue-465from
issue-466
Oct 7, 2026
Merged

JacobStephens2 merged 2 commits into
issue-465from
issue-466

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Summary

One Command execution owner now supervises captured output and streaming. The Harness adapter still prepares its environment and chooses its stop action and signals.

prepared command + optional stdin + Control(name, interruption, stop)
  shared execution owner
    output     → raw exit status + stdout/stderr bytes
    streaming  → execution result + retained consumer state
    cleanup    → stop process tree, reap child, join workers

Ordinary execution observes interruption throughout its lifetime; completion execution finishes independently and leaves the recorded flag intact. Worker completion and unwind wake supervision. Git and GitHub production call sites retain their current behavior for the following Tickets.

Closes #466

Evidence

  • Before: completion_ignores_recorded_signals_without_permitting_ordinary_work failed with interrupted during completion execution.
    After: passes for SIGINT, SIGTERM and SIGHUP; completion returns raw bytes/status and ordinary execution still refuses to spawn.
  • Before: startup_failure_returns_no_state_even_when_the_consumer_has_returned returned recovered state after the injected startup fault.
    After: returns an error without retained state after stopping, reaping and joining.
  • Before: local true and short Bash captures averaged about 101 ms each.
    After: 25 captures each averaged about 1.7 ms and 3.5 ms respectively. The local probe is ignored in CI and has no timing assertion.
  • Validation: cargo check --all-targets, cargo fmt --check, cargo clippy --all-targets -- -D warnings, shared-owner and session recovery checks, and existing Harness/process-tree checks. Full cargo test: 1264 passed, 0 failed, 1 ignored (the local latency probe).

Test seams

  • Shared Command execution: captured bytes/status and streaming retained state, lifetime cleanup, and explicit ordinary/completion interruption policy exercised with local subprocess fixtures.
  • Harness adapter: environment overrides, Harness stop signals, and session transport recovery through existing Harness/process-tree and session checks.

Unaddressed findings

Standards

None. The one finding, possible Data Clumps in the execution settings, was addressed by the immutable Control value and confirmed resolved in the follow-up review.

Spec

None. The Spec review reported no findings.

Merge Danger

Door: two-way

The extraction can be reverted; it changes no persisted data.

Blast Radius: Execution

Harness checks and sessions share this owner. Cancellation, transport recovery and descendant cleanup are the sensitive paths covered by the lifecycle and existing integration checks.

Built with codex · gpt-6.1-sol · xhigh

@JacobStephens2
JacobStephens2 merged commit d953722 into issue-465 Oct 7, 2026
13 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-466 branch October 7, 2026 00:30
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