Skip to content

fix(runner): preserve failures when tests skip - #741

Merged
okwasniewski merged 2 commits into
e2e-inc:mainfrom
Marve10s:fix/688-skipped-failures
Oct 3, 2026
Merged

okwasniewski merged 2 commits into
e2e-inc:mainfrom
Marve10s:fix/688-skipped-failures

Conversation

@Marve10s

@Marve10s Marve10s commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor
  • expect.soft(1).toBe(2); test.skip('feature disabled') drops the assertion failure and exits 0. A failed attempt followed by a skip on retry also disappears from the CLI summary. Related to runner: skip() after a failed expect.soft reports SKIPPED and hides the failure #688.
  • Keep soft failures in the skipped attempt's secondaryErrors and show the original failure under Skipped After Failure, including retries and serial members. Exclude engine cleanup diagnostics that arrived after the skip.
  • Add failOnSkippedFailure: true to make these runs exit 1. The default stays false to preserve the documented skip behavior under the stability policy. Tests retain their skipped status and reason; clean skips and successful retries are unaffected.
export default {
  targets,
  failOnSkippedFailure: true,
};

Verified

Ran it locally: yes

  • Ran the real CLI with a lifecycle-only engine in a standalone project, first with published e2e@0.15.1, then with this branch's packed npm package: E2E_TELEMETRY_DISABLED=1 node node_modules/e2e/dist/cli/bin.js run. No browser, app server, or model credentials.
  • The regression cases also failed against main at 28b09f3 before the fix.
Scenario main this branch
Soft failure, then skip Failure absent; exit 0 Failure retained and printed; exit 0 by default, 1 with the option
Failed attempt, then skipped retry Original error hidden in the CLI Original error printed; exit 1 with the option
Clean skip with an engine cleanup error Skipped; exit 0 Skipped; exit 0, including with the option

The packed fix prints:

Skipped After Failure 1
SKIP  |headless| tests/skip.e2e.ts > soft failure followed by skip
ASSERTION_FAILED: 1 soft assertion failed
1. known regression: expected 1 to be 2
Warnings  1 skipped after failure

With the option enabled, report.json records run status failed, exit code 1, test status skipped, and reason feature disabled.

The app-backed testbed and benchmark suites were not run; verification stayed headless and service-free.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 15 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread packages/e2e/src/report/build.ts Resolved
Comment thread packages/e2e/src/report/list.ts Resolved
@okwasniewski
okwasniewski force-pushed the fix/688-skipped-failures branch from 641a836 to de47f66 Compare October 1, 2026 19:52
Marve10s and others added 2 commits October 3, 2026 10:01
…ling attempt

- failureBeforeSkip returns failing attempt's error, evidence, artifacts; list reporter prints those instead of skipped attempt's
- someSkippedAfterFailure indexes serial groups once, shared by exit code and run status
- collapse skip branch in execute, place failOnSkippedFailure next to retries with JSDoc
@okwasniewski
okwasniewski force-pushed the fix/688-skipped-failures branch from de47f66 to 6a390c3 Compare October 3, 2026 08:13
@okwasniewski okwasniewski added the Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer. label Oct 3, 2026

@okwasniewski okwasniewski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On 6a390c3:

A serial member that skipped cleanly can show up under Skipped After Failure with an INTERRUPTED error that came after its skip. If member A skips in attempt 0 and another member fails, the group retries. If that retry is then interrupted while A is running, cutRetry keeps A's skipped verdict from attempt 0, but the interrupted attempt stays in group.attempts. failureBeforeSkip walks every group attempt in reverse, so it picks up attempt 1's interrupt error as the failure before the skip. The user then sees a misleading entry and an extra count under Warnings, and someSkippedAfterFailure returns true for that member. The smallest fix is to stop the walk at the attempt whose explicit skip decided the result, or to ignore interrupted retries the same way cutRetry does (attemptIndex > 0 && attempt.status === 'interrupted'). Details inline.

reviewed 6a390c3 by Hermes on behalf of @okwasniewski

attempt.members
.filter((member) => member.testId === result.test.id)
.map((member) => ({ ...member, artifacts: attempt.artifacts })),
);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For a serial member this walks every group attempt, including an interrupted retry that ran after the attempt that decided the skip. An INTERRUPTED error recorded there gets reported as the failure before the skip. Could the walk stop at the last member record that is skipped with an explicit cause, or skip interrupted retries like cutRetry does?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready for Human Review Green, conflict-free, every thread handled. Waiting on a maintainer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants