ci(vitest): annotate failing tests on the GitHub check

Merged
TH
15h ago
+4-0

Summary

#4247 reads Coverage failures as silent kills. They aren't. All 34 failed Coverage attempts from 2026-11-05 to 2026-11-07 end with exit code 1 and name the cause: 33 name a failing test (Failed Tests block plus Test Files summary), and 1 is the changed-line gate. The name sits after one very long line of dots. The check annotation shows only Process completed with exit code 1.

  • Breakdown:
    • 13 are the launch-confirmation flake (#4225).
    • 14 are failures from the PR's own diff (eager-closure budgets, lock policy, capability matrix, and others).
    • 7 are timing flakes in 3 untracked tests:
      • artifact-tracking.test.ts (tar settle);
      • snapshot-source/lifecycle.test.ts (unread exit deadline);
      • remote-test-artifacts-materialization.test.ts.
  • Memory is not the cause. A diagnostic sampler (dropped) measured peak usage at 3.5 GB and 4.1 GB out of 15.8 GB, with 11 GB of swap, and dmesg had no OOM lines.
  • The change: the explicit reporters list dropped the github-actions reporter Vitest adds by default. This PR restores it under GITHUB_ACTIONS=true (job summary off), so each failing test shows on the check as an annotation.
  • Scope: this names ordinary test failures only. A killed process never reaches onTestRunEnd, so it would still fail unnamed. #4247 stays open for that case, though none occurred in the window.
  • Files touched: 1 (vitest.config.ts). No tests skipped, no thresholds changed, no runner change.

Refs #4247

Validation

  • Head e6d504b494: pnpm check:affected --run --head passed, exactCommit: true (receipt run-CMuNdZ).
  • Annotation: a temporary failing commit 6021a1c5f8 (job) annotated the check with the test name, file and line. The slow-test gate reporter still printed.
  • Coverage CI: 7 of 7 green: 2 runs at diagnostic head f62285d574, 4 at 452e7b5e69 (run) and 1 at e6d504b494 (run).

šŸ¤– Generated with Claude Code