diff --git a/CHANGELOG.md b/CHANGELOG.md index f5810d5308..213b33cd04 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,16 @@ this file. The format follows Keep a Changelog, and versioned releases follow Semantic Versioning where the repository publishes a release. ## [Unreleased] +- Fix a flaky SIGPIPE (exit 141) in + `test_scheduler_wake_reuses_trusted_receipt_predicate`: the fixture's fake + `gh` never read stdin on its `repos/ContextualWisdomLab/.github/dispatches` + branch, racing the real production pipe (`jq -cn ... | gh api -X POST + .../dispatches --input -`) — an early-exiting non-stdin-reading downstream + reader can SIGPIPE the upstream writer depending on process-scheduling + timing. Reproduced locally (~1/20 runs) and confirmed test-harness-only, + not a production bug (the real `gh api --input -` does read stdin). Fixed + by draining stdin (`cat >/dev/null`) before that branch proceeds; 60/60 + clean runs after the fix. - Avoid redundant merge-scheduler wakes when the trusted receipt predicate already finds a substantive exact-head OpenCode verdict. Missing, stale, or fallback-only evidence still dispatches review work, while receipt lookup or diff --git a/tests/test_opencode_required_verdict_regression.py b/tests/test_opencode_required_verdict_regression.py index 8f8047ff10..0e5d30805b 100644 --- a/tests/test_opencode_required_verdict_regression.py +++ b/tests/test_opencode_required_verdict_regression.py @@ -173,6 +173,7 @@ def test_scheduler_wake_reuses_trusted_receipt_predicate( elif [[ "$*" == *"/pulls/7/reviews"* ]]; then printf '[%s]' "$FAKE_REVIEWS" elif [[ "$*" == *"repos/ContextualWisdomLab/.github/dispatches"* ]]; then + cat >/dev/null printf 'dispatch\n' >>"$DISPATCH_CALLS" fi """,