Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[test] CI reliability: workflow tests flake on macOS, a test helper throws EPERM, and no Windows job runs the CodeBuddy gate tests

Chiusa
#1,504 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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

bug help wanted

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

  1. Each test in the table either passes 20 consecutive runs on a macOS runner (--repeat or 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.
  2. detached-processes.ts treats EPERM like ESRCH.
  3. 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.ts still 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

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Tencent/teamai-cli

Tutte le issue di Tencent/teamai-cli

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.