Skip to content

Retain Harness interpretation after transport failures - #462

Merged
JacobStephens2 merged 1 commit into
mainfrom
issue-461
Oct 6, 2026
Merged

JacobStephens2 merged 1 commit into
mainfrom
issue-461

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Summary

Failed Harness sessions keep recoverable usage and warnings while preserving the original transport error.

Session → Harness process streaming(state, consume)
            run child and concurrent I/O
            complete or clean up; join every worker
            return Streamed { execution, state }
        → state.finish(execution)
            report once; propagate the original transport failure

The process module now owns recovery after every normal consumer return. Session uses the returned interpretation directly; interruption suppresses recovery and completion reporting.

Closes #461

Evidence

  • Before: completed_stdout_is_reported_after_a_broken_prompt failed with left: 0, right: 1 for the missing-skill warning. Successful stdout consumption followed by BrokenPipe lost retained export, usage and completion reporting.
    After: the regression passes with the original BrokenPipe cause, the exact child PID reaped, one retained export, one warning, one usage summary and one session-ended line.
  • Additional fixtures cover partial consumption and log failure with a blocked prompt, error precedence during cleanup, consumer panic, startup failure and interruption. Existing byte-preservation, EOF/exit ordering, captured-stderr, detached-descendant and Resume regressions pass.
  • Validation: cargo check --all-targets, cargo fmt --check, cargo clippy --all-targets -- -D warnings, and cargo test (1,240 tests passed).

Seams under test:

  • Harness process streaming: recovered state, execution errors, owned cleanup and worker completion.
  • Session execution (Sessions::within / run_to_final_message) with local shell CLI fixtures: retained reads, reporting, interruption and Resume eligibility.

Merge Danger

Door: two-way

The internal interface change can be reverted without a data migration.

Blast Radius: Sessions

Harness session execution and completion reporting across all six Harnesses.

Unaddressed findings

Standards

None. Review against main reported no findings.

Spec

None. Review against #461 reported no findings.

Built with codex · gpt-6.1-sol · xhigh

@JacobStephens2
JacobStephens2 merged commit 0944f68 into main Oct 6, 2026
13 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-461 branch October 6, 2026 23:16
This was referenced Oct 7, 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 completion to retain interpretation after transport failures

1 participant