Skip to content

Commit bd1091b

Browse files
committed
fix(#2682): let the runner-log note reach a CI log
A reporter prints the stack, whose first line is the original error's message, so wrapping a failure in an Error that copies that stack buries the note about where the runner log went. Verified locally against a forced failure: the note now prints as the message with the original chained as `cause`.
1 parent a00162a commit bd1091b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎test/integration/smoke-ios-target-activation.test.ts‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ async function withRunnerLogEvidence(context: LiveContext, error: unknown): Prom
130130
// The artifact is the point; a missing log is reported and the original failure still stands.
131131
}
132132
const message = error instanceof Error ? error.message : String(error);
133-
const enriched = new Error(`${message}\n${note}`);
134-
enriched.stack = error instanceof Error ? error.stack : enriched.stack;
135-
return enriched;
133+
// A test reporter prints the stack, whose first line is the original error's own message, so a note
134+
// carried only on a copied stack never reaches a CI log. Both halves belong in the new message.
135+
return new Error(`${message}\n${note}`, { cause: error });
136136
}
137137

138138
/** Poll `snapshot -i` until the runner reports the repair, or fail with the last response. */

0 commit comments

Comments
 (0)