ci: Coverage job fails on a random package's test:coverage task and hides the failing test
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- github-actions, typescript
Hướng nghiên cứu
Start with .github/workflows/pr.yml lines 76 and 105 and inspect the Coverage job output settings. Reproduce coverage failures under CPU load in ai-harness and ai-react, using the listed vitest and Nx commands; use the failing test output to identify timing dependent tests. Done when failed task output identifies the test and the intermittent failures are fixed, with parallelism capped only if failures persist.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
TanStack AI version
main (8731d75)
Framework/Library version
CI only (.github/workflows/pr.yml, Coverage job)
Describe the bug and the steps to reproduce it
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.
Seen so far:
| Run | PR | Failed task |
|---|---|---|
| 40271697755 | #1894 | @tanstack/ai-harness:test:coverage (passed on re-run) |
| 40270604983 | #1887 | @tanstack/ai-harness:test:coverage |
| 40277024581 | #1894 | @tanstack/ai-react:test:coverage |
The same tests pass locally:
packages/ai-harness:vitest run, 2469 passed.packages/ai-react:vitest runandnx 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-harnessandai-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?
Yes, I am also opening a PR to fix this issue.
- Ngôn ngữ chính
- TypeScript
- Star
- 3.2k
- Fork
- 372
- Merge trung bình
- 1 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 244
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của TanStack/ai
-
Durable resume through withPersistence never fills ctx.inputResponse for mcp_input interruptsCó thể đã có người làm @tombeckenham đã nhận 3 ngày trước. Đang mởwaiting-on: maintainer
TanStack/ai#1885 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ai, ai-persistence: a nested subagent that waits runs again from the start under withPersistenceCó thể đã có người làm @tombeckenham đã nhận 4 ngày trước. Đang mởwaiting-on: maintainer
TanStack/ai#1878 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ai-ollama: streamed chat() reports finishReason "stop" when done_reason is "length"Có thể đã có người làm @AlemTuzlak đã nhận 4 ngày trước. Đang mởwaiting-on: maintainer
TanStack/ai#1852 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Discriminate status-dependent record and option types (RunRecord, SessionIndexEntry, InputState, durable-only options)Có thể đã có người làm @jherr đã nhận 10 ngày trước. Đang mởenhancement waiting-on: maintainer
TanStack/ai#1799 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
move to modelschemasCó thể đã có người làm @jherr đã nhận 11 ngày trước. Đang mởhas-pr waiting-on: maintainer
TanStack/ai#1788 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
awslabs/visual-asset-management-system#804 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
restatedev/sdk-typescript#813 ·
-
bug desktop P1 session XS
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Merit-Systems/x402scan#1312 ·
-
type:bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Azure/apiops-cli#331 ·
Maintainer thường phản hồi trong vòng 3 ngày