Fix workflow initial-write exit arbitration - #1079
Merged
dennisonbertram merged 1 commit intoJul 31, 2026
Merged
Conversation
dennisonbertram
force-pushed
the
codex/issue-1076-workflow-initial-write-exit
branch
from
July 31, 2026 20:42
5ec49fd to
8e6bffa
Compare
dennisonbertram
force-pushed
the
codex/issue-1076-workflow-initial-write-exit
branch
from
July 31, 2026 22:13
8e6bffa to
fa2f7c8
Compare
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
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.
Closes #1076
Summary
Preserves the truthful source-workflow failure when a child exits before the
parent can write the initial protocol message. Initial-write failures now enter
one bounded cleanup, stdin-close, process-wait, and outcome-resolution path
instead of returning raw EPIPE before the child is reaped.
Outcome precedence is explicit:
Wait, the original initial-writeerror remains primary;
Failure and strict red-green evidence
Hosted PR #1070
test-racerun30660042116failedTestSourceManagerRunWorkflowIncludesBoundedStderrOnProcessExit: expectedchild stderr diagnostic, receivedwrite |1: broken pipe.Two deterministic lifecycle reds then proved:
old implementation returns EPIPE without waiting;
SIGKILL could mask the original transport error.
The final tests use FIFO/flock ordering rather than sleeps, assert the exact
error precedence, and prove both child PIDs are reaped.
Verification
Exact head:
fa2f7c8ed6e576006d14ec6ec989ac2d6f1a5e91, rebased ontoorigin/main34c0d8627558b13851ef81ec0d25c930c045b883.-count=100— PASS.-count=100— PASS.internal/workflownormal and race suites — PASS.make test-race— PASS../scripts/test-regression.shwith Command Line Tools and isolated writable caches — PASS: normal, full race, coverage 85.6%, minimum 80.0%, zero uncovered functions.git diff --check— PASS.-count=20.Scope and rollout
This is a narrow source-workflow lifecycle/error-arbitration repair plus its
deterministic tests and required plan/impact/log documentation. No schema,
protocol, API, cron/callback, TUI, or macOS code changes. No migration or data
repair.
Roll back if deadline or semantic protocol errors lose precedence, a child is
not reaped, stderr becomes unbounded, successful workflows regress, or
standalone transport errors are hidden. After merge, PR #1070 will be rebased
onto the repaired main and its complete local and hosted gates rerun.
Checklist
test-fastandtest-racegreen on this PR