fix(test-runner): strip GHA ::group:: wrappers before file attribution

On GitHub Actions bun wraps each file's log section in ::group::. The
un-stripped header failed FILE_HEADER_RE, failures attributed to the
PREVIOUS file, and the terminal recap's re-printed (fail) lines landed
under a phantom second file — the first Linux run reported 5 real
failures as 10 across 2 files (one of them innocent). Strip the prefix
before matching; the existing file+test dedupe then absorbs the recap.
This commit is contained in:
Garry Tan
2026-08-15 17:40:54 -07:00
parent 4466af6a50
commit dedcd3f4f0
2 changed files with 29 additions and 1 deletions
+6 -1
View File
@@ -638,7 +638,12 @@ export class FreeRunReporter {
}
private handleLine(rawLine: string, origin: StreamOrigin): void {
const line = stripAnsiLine(rawLine);
// GitHub Actions: bun wraps each file's section in ::group::<header>.
// Without stripping, the real header fails FILE_HEADER_RE, failures get
// attributed to the PREVIOUS file, and the terminal recap's re-printed
// (fail) lines land under a second phantom file (observed on the first
// Linux run: 5 real failures reported as 10 across 2 files).
const line = stripAnsiLine(rawLine).replace(/^::group::/, '');
let visible = false;
const header = FILE_HEADER_RE.exec(line);