Skip to content

fix(e2e): demultiplex act container stream for reliable CI output parsing - #164

Merged
joshua-temple merged 1 commit into
mainfrom
fix/act-output-demultiplex
Jun 15, 2026
Merged

joshua-temple merged 1 commit into
mainfrom
fix/act-output-demultiplex

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

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 as TestActRunner_RunWorkflow getting failure instead of success). 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 (readDemuxedStream in act.go), with a fallback that passes a non-multiplexed stream through unchanged. Makes act-output parsing reliable in all environments.

Verification

  • New synthetic test TestReadDemuxedStream_MultiplexedFramesAreCleaned (load-bearing; fails pre-fix) plus raw-passthrough and nil-reader cases.
  • TestActRunner_RunWorkflow passes locally; harness suite green; build/vet/lint clean.

…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>
@joshua-temple
joshua-temple merged commit cb74153 into main Jun 15, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant