Skip to content

Fail E2E tasks when the test regex selects no tests - #2374

Open
gtrrz-victor wants to merge 3 commits into
mainfrom
fix/e2e-empty-test-runs
Open

Fail E2E tasks when the test regex selects no tests#2374
gtrrz-victor wants to merge 3 commits into
mainfrom
fix/e2e-empty-test-runs

Conversation

@gtrrz-victor

@gtrrz-victor gtrrz-victor commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

https://entire.io/gh/entireio/cli/trails/1307

Summary

An E2E regex matching no tests made gotestsum exit successfully and the reporter print ALL 0 TESTS PASSED. The existing E2E mise tasks now fail that selection after writing their reports. Truncated event streams with no completed parent tests also fail instead of reporting success.

What Changed

  • Add an opt-in -fail-on-empty reporter flag. Only terminal parent pass, fail, or skip events satisfy it. Skipped tests still count, and a retry needs its own terminal event.
  • Show NO TESTS RAN for empty input and an incomplete count and INCOMPLETE banner for unfinished tests. Mixed completed and incomplete results never claim all tests passed; the strict flag only rejects zero completed parents.
  • Enable the flag in the existing default, roger-roger, and canary tasks. Preserve an existing test failure code, print the artifact path even when the version file is absent, and run both canary agents before returning failure.
  • Add command-level regression tests for empty, malformed, package-only, and incomplete input, completed and skipped tests, retries, mixed results, and both report files.
  • Preserve the nightly workflow's existing empty-report check because it checks out the installed release tag, whose tasks may predate this fix.

A regex that matches a top-level parent but no subtests is outside this change.

Verification

  • Reproduced both false successes before fixing them: an unmatched regex through the free roger-roger task and a run-only JSON stream through the reporter.
  • Reporter regression tests failed before the fix and pass afterward.
  • Verified the nonexistent-regex selection through all three mise task paths; each fails and writes reports. Both canary agents run and report the empty selection.
  • Stubbed external commands verified preservation of the original test exit code, both canary agents running after a reporter failure, and reporting without a version file.
  • Formatting and full mise run lint passed with the pinned golangci-lint 2.13.2.
  • Full mise run test:ci passed after the review fix, including unit and integration tests with the race detector and both deterministic canary agents. No paid agent calls were made.

Entire-Checkpoint: 01M27ZME7MXVQZ6QZDJ4VA0ZFB
Copilot AI lite review requested due to automatic review settings September 11, 2026 10:19

Copilot AI 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.

馃煛 Changes recommended

The critical reporter issue remains unresolved for incomplete non-terminal test events.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Fixes false-green E2E runs when a test regex selects no tests.

Changes:

  • Adds opt-in -fail-on-empty reporting with NO TESTS RAN.
  • Updates E2E tasks to preserve failures and generate reports.
  • Adds regression tests and documentation.
File summaries
File Summary
mise-tasks/test/e2e/roger-roger Handles empty selections while preserving test failures.
mise-tasks/test/e2e/canary Runs and reports both canary agents.
mise-tasks/test/e2e/_default Handles reporter status and missing version metadata.
e2e/README.md Documents empty-selection behavior.
e2e/cmd/testreport/main.go Implements strict reporting; incomplete non-terminal events may still be counted as passed.
e2e/cmd/testreport/main_test.go Adds reporter regression coverage.
Review details
  • Files reviewed: 6/6 changed files
  • Comments generated: 1
  • Review effort level: Lite

馃挕 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread e2e/cmd/testreport/main.go Outdated
Entire-Checkpoint: 01M282N7JK011V94EH9YPR22ND
@gtrrz-victor
gtrrz-victor marked this pull request as ready for review September 11, 2026 11:23
@gtrrz-victor
gtrrz-victor requested a review from a team as a code owner September 11, 2026 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants