[test] CI reliability: workflow tests flake on macOS, a test helper throws EPERM, and no Windows job runs the CodeBuddy gate tests
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- github-actions, node.js, typescript
Research direction
Start with the listed flaky tests in workflow-workspace.test.ts, workflow-handoff.test.ts, workflow-local-driver.test.ts, workflow-skill-lock.test.ts, and workflow-skill-driver.test.ts; inspect their assertions and waits, then reproduce the failures on macOS. In src/__tests__/helpers/detached-processes.ts, review runningIn and its process.kill(pid, 0) handling. Check .github/workflows/ci.yml and src/__tests__/helpers/windows-tests.ts for the Windows test list; done means addressing the reported races, treating EPERM like ESRCH, and running the CodeBuddy gate cases on Windows.
Written by the indexing model from the issue text.
Description
Why
PRs that do not touch workflows go red on macOS runners and pass on rerun, so a red check stops meaning anything. Separately, the CodeBuddy-on-Windows fix in #1494 has no test in the Windows job.
1. Workflow tests that flake on macOS runners
Each failed on a PR whose diff does not touch the code under test, and passed on rerun or locally.
| Test | Failure | Seen |
|---|---|---|
workflow-workspace.test.ts:1751 "does not publish an agent conflict a prompt left untouched" |
assertion at :1787 | 2026-10-28, macOS |
workflow-workspace.test.ts:2215 "does not publish conflict markers a prompt left in an agent file" |
expected undefined to match object { code: 'merge_conflict' } at :2252 |
2026-10-27 and 2026-10-28, macOS Node 22 |
workflow-workspace.test.ts:2418 "keeps a modify/delete resolution a prompt staged without editing the file" |
assertion at :2452 | 2026-10-28, macOS |
workflow-handoff.test.ts:1881 "continues a copy it took back from the commit the other machine recorded, …" |
15 s timeout | 2026-10-28, macOS |
workflow-local-driver.test.ts:1125 "kills a cancelled command that ignores SIGTERM after the grace period, and finishes" |
timeout at :1127 | 2026-10-28, macOS |
workflow-local-driver.test.ts:1183 "kills a descendant that ignores SIGTERM after the cancelled command itself exited, and finishes" |
15 s timeout at :1185 | 2026-10-28, macOS |
workflow-skill-lock.test.ts:116 "lets one of two callers act at a time: …" |
15 s timeout | 2026-10-28, ubuntu Node 22 |
workflow-skill-driver.test.ts:856 "stops the setup a killed runner left running, as it stops a command one left" |
expected true to be false at :891 |
2026-10-26 and 2026-10-27, macOS Node 20 |
Three reruns of one scrub-only PR (no workflow import) failed on different rows of this table.
2. detached-processes.ts throws kill EPERM
runningIn (src/__tests__/helpers/detached-processes.ts:45-56) probes each tracked pid with process.kill(pid, 0) and rethrows anything but ESRCH (:51). On macOS a recycled pid that belongs to a process the runner cannot signal gives EPERM, and the teardown fails the file. EPERM means the pid is not teamai's child any more; it should be forgotten like ESRCH.
3. No Windows job runs the CodeBuddy gate tests
#1494 changed how CodeBuddy's project-gate hooks run on Windows, with tests in src/__tests__/hooks-reconcile-scope.test.ts and src/__tests__/e2e/hooks-project-isolation-issue373.test.ts. Neither is in src/__tests__/helpers/windows-tests.ts, which is all the Windows job runs (.github/workflows/ci.yml:236-245). The Windows-only branches are verified only on contributors' machines.
Acceptance criteria
- Each test in the table either passes 20 consecutive runs on a macOS runner (
--repeator a matrix job) or carries a fix for its race; raising a timeout alone is acceptable only where the test waits on a real child process and says so. detached-processes.tstreatsEPERMlikeESRCH.- The Windows job runs the CodeBuddy gate cases (the files above, or a Windows-safe subset split out of them); the list guard in
windows-test-list.test.tsstill passes.
Definition of done
- One PR per part is fine. No product code changes, unless a flake turns out to be a real race in it, which then gets its own issue.
Evidence
- Check-run annotations of CI runs 40601406383 (
workflow-workspace.test.ts:2252, macOS Node 22) and 40589273923 (workflow-skill-driver.test.ts:891, macOS Node 20); the other rows from PR reruns on 2026-10-28.main's own CI runs in the same window passed. - Parts 2 and 3: code at main (a4842991), at the lines above.
- Dominant language
- TypeScript
- Stars
- 5.6k
- Forks
- 471
- Avg merge
- 20h 16m
- Merged PRs (30d)
- 399
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Tencent/teamai-cli
-
bug help wanted
Difficulty 3/5 1-2 days Newbie friendliness 64/100
Tencent/teamai-cli#1539 ·
Maintainers usually reply within 1 day
-
[bug] codebase --deep-enrich in a team repo reports success but never publishes, and leaves the team clone dirtyPossibly taken @Kiddo4993 claimed this today. Openbug help wanted
Difficulty 4/5 1-2 days Newbie friendliness 35/100
Tencent/teamai-cli#1537 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 70/100
Tencent/teamai-cli#1523 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 38/100
Tencent/teamai-cli#1516 ·
Maintainers usually reply within 1 day
-
bug help wanted
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Tencent/teamai-cli#1501 ·
Maintainers usually reply within 1 day
All issues in Tencent/teamai-cli
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gnosis/gnosis_vpn#661 ·
Maintainers usually reply within 1 day
-
content-freshness: staleOwnedContent doc comments still say 'complete receipt' (follow-up to #7912)Opentriage:bug-verified
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
fix: reject sourceStorage/packagedStorage bucket that differs from the stack default (fail loud)Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Eyevinn/open-videocore#1300 ·
Maintainers usually reply within 1 day
-
nextjs-tracking
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
cloudflare/vinext#4390 ·
Maintainers usually reply within 1 day
-
kind/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
kubernetes-sigs/headlamp#8175 ·
Maintainers usually reply within 2 days