Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

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

Open
#1,504 2 comments 0 reactions 0 assignees View on GitHub

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

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.
Dominant language
TypeScript
Stars
5.6k
Forks
471
Avg merge
20h 16m
Merged PRs (30d)
399

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Tencent/teamai-cli

All issues in Tencent/teamai-cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.