[test] CI reliability: workflow tests flake on macOS, a test helper throws EPERM, and no Windows job runs the CodeBuddy gate tests
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- github-actions, node.js, typescript
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 5.6k
- Fork
- 471
- Merge medio
- 19h
- PR unite (30g)
- 415
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Tencent/teamai-cli
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
Tencent/teamai-cli#1605 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
Tencent/teamai-cli#1590 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
Tencent/teamai-cli#1589 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
Tencent/teamai-cli#1579 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
Tencent/teamai-cli#1564 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Tencent/teamai-cli
Issue simili
-
Replace discontinued crypto-js in the themeForse già presa @aelmanaa l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
PaloAltoNetworks/docusaurus-openapi-docs#1689 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
solana-foundation/solana-web3.js#4015 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
formatSearchQuery drops the :present modifier, so `email:present=true` is sent as `email=true`Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 1/5 1-3 ore Idoneità per principianti 90/100
ivopogace/opencode-courier#422 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
chapel-lang/chapel-vscode#158 ·
I maintainer di solito rispondono entro 1 giorno