Skip to content

Commit 1179ccf

Browse files
antonisclaude
andcommitted
fix(ci): Dump Maestro output on flow failure for debugging
With stdio: 'pipe', failed flow output was swallowed. Now the full Maestro stdout/stderr is printed when a flow fails, making it easier to diagnose flaky tests in CI logs. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 880f122 commit 1179ccf

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

dev-packages/e2e-tests/cli.mjs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,10 +351,15 @@ if (actions.includes('test')) {
351351
} catch (error) {
352352
const elapsed = Math.round((Date.now() - startTime) / 1000);
353353
const name = flow.replace('.yml', '');
354-
const stderr = error.stderr?.toString().trim();
355-
const detail = stderr?.split('\n').find(l => l.includes('App crashed') || l.includes('Element not found')) || '';
354+
const output = (error.stdout?.toString() || '') + (error.stderr?.toString() || '');
355+
const detail = output.split('\n').find(l =>
356+
l.includes('App crashed') || l.includes('Element not found') || l.includes('FAILED')) || '';
356357
results.push({ name, passed: false, elapsed, detail });
357-
console.log(`[Failed] ${name} (${elapsed}s)${detail ? ` (${detail})` : ''}`);
358+
console.log(`[Failed] ${name} (${elapsed}s)${detail ? ` (${detail.trim()})` : ''}`);
359+
// Dump Maestro output for failed flows to aid debugging
360+
if (output) {
361+
console.log(`\n--- ${name} output ---\n${output.trim()}\n--- end ${name} output ---\n`);
362+
}
358363
}
359364
}
360365

0 commit comments

Comments
 (0)