test(remote): two tests on main can fail on a correct code — they read a merged stream - #886
Open
fujibee wants to merge 1 commit into
Open
test(remote): two tests on main can fail on a correct code — they read a merged stream#886fujibee wants to merge 1 commit into
fujibee wants to merge 1 commit into
Conversation
…tream Two tests on main can fail on a correct code. They compare bats's $output against "200" or "000", and $output is stdout AND stderr merged. The helper's stderr is not reliably empty. On a loaded macOS runner: remote.sh: line 318: .../agmsg-header-pipe.JVbrl7/header: Interrupted system call 000 The fifo open was interrupted and bash reported it, so an exact comparison against a two-line string failed while the code itself was right. Observed, not hypothesised: two cases went red in one CI run at a head that was green locally. not ok 351 an untranslated POSIX path reaching native curl is the reported 000 not ok 352 a Windows path reaching a POSIX curl is equally a 000 Same OS, same code, different load. The window is the fifo open, so every case that drives the non-marker arm is exposed -- four more of them in the header sink file, which has not failed yet and can. Both harnesses now send the helper's stderr to a file, leaving the http code alone on stdout. Nothing else changes: same cases, same assertions. 14 ok / 0 not ok across the two files. This is a flake in a required check, so it is a landing blocker for every branch and not only for the one that noticed it.
This was referenced Aug 19, 2026
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.
Describes head
628e58dc1b528115e089bddf7ef7340427e7a4a2.A flake in a required check, on
mainright now. Two tests can fail on a correct result, so this blocks landing for every branch, not only the one that hit it.What happens
tests/test_remote_curl_config_paths.batsandtests/test_remote_header_sink.batscompare bats's$outputagainst"200"or"000".$outputis stdout and stderr merged, and the helper's stderr is not reliably empty. On a loaded macOS runner:The fifo open was interrupted and bash reported it. The http code was right; the comparison was against a two-line string.
Observed, not reasoned about — two cases in one CI run, at a head that was green on the author's machine:
Same OS, same code, different load.
Scope
The window is the fifo open, so every case that drives the non-marker arm is exposed — including four in the header-sink file that have not failed yet. Fixing only the two that were seen would leave the same defect waiting in the other file.
Derived rather than assumed:
grep -c 'output" = "'over the four#850test files, then checked which of them separate the streams. The two stderr files (test_remote_curl_stderr*.bats) already do, and their remaining unseparatedrunsites assert$statusonly — nothing there compares a merged stream.The change
Both harnesses send the helper's stderr to a file; the http code is alone on stdout. Same cases, same assertions, no production change.
Boundary
This makes an exact comparison mean what it says. It does not stop the interruption itself — the fifo open can still be interrupted, and if that ever matters to behaviour rather than to a test's string comparison, it is a separate question. Related: the header copier is not reaped on an early exit (#864).
Declared reviewers: 1