You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci: Coverage job fails on a random package's test:coverage task and hides the failing test #1909
The PR Coverage job fails at random on PRs that change @tanstack/ai. No coverage metric drops. One package's test:coverage task fails, and it is a different package each time. A re-run passes.
packages/ai-react: vitest run and nx run @tanstack/ai-react:test:coverage --skip-nx-cache, 251 passed.
Likely cause: a change to @tanstack/ai makes the job measure about 76 packages, twice (PR head and merge-base). nx run-many runs them in parallel on one runner. Tests that depend on timing then time out under the load.
Second problem: the job log does not show the output of the failed task. pr.yml:76 and pr.yml:105 run nx run-many --outputStyle=static, and the log only has the Nx summary line ✖ @tanstack/ai-harness:test:coverage. So nobody can name the flaky test from CI.
Fix
Make the Coverage job print the full output of a failed task, so the failing test name and error are in the job log.
Find the timing-sensitive tests in ai-harness and ai-react. To do this, run their coverage under CPU load locally, or use the log from step 1. Then fix them: remove real-time waits, use fake timers, or wait for events instead of a fixed time.
If step 2 does not remove all failures, cap the parallel tasks for the coverage step (--parallel=N). Do not add retries that hide failures.
Your Minimal, Reproducible Example - (Sandbox Highly Recommended)
CI runs listed above. No local reproduction yet.
Do you intend to try to help solve this bug with your own PR?
Activity