fix(e2e): demultiplex act container stream for reliable CI output parsing - #164
Merged
Merged
Conversation
…sing Raw io.Copy left Docker multiplexed-stream headers in captured act logs on CI Linux (no TTY allocated), corrupting conclusion, job-failure, infra-saturation, and crash parsing. Demultiplex via stdcopy.StdCopy with a raw-stream fallback. Adds a synthetic multiplexed-stream unit test. Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
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.
Problem
The harness captured the act container's hijacked-attach stream with raw
io.Copy. On CI Linux (no TTY), Docker returns a multiplexed stream with 8-byte stream headers per chunk, which were left interspersed in the captured logs. This corrupted conclusion / job-failure / infra-saturation / crash parsing on CI (surfaced asTestActRunner_RunWorkflowgettingfailureinstead ofsuccess). It did not reproduce on Mac/Docker Desktop, where the stream is demuxed - which is why prior local runs and reviews missed it. #162's narrowed classifier turned this previously-masked corruption into a deterministic failure.Fix
Demultiplex the container stream with
stdcopy.StdCopy(readDemuxedStreamin act.go), with a fallback that passes a non-multiplexed stream through unchanged. Makes act-output parsing reliable in all environments.Verification
TestReadDemuxedStream_MultiplexedFramesAreCleaned(load-bearing; fails pre-fix) plus raw-passthrough and nil-reader cases.TestActRunner_RunWorkflowpasses locally; harness suite green; build/vet/lint clean.