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

src/io/watchFile.test.ts flaky test on refactor branch.

Open Beginner friendly
#2,140 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
bun, typescript
Domain
testing-qa

Research direction

Start with the failing test in src/io/watchFile.test.ts, especially the debounced callback and abort case around line 29, and reproduce the failure on macOS if possible. Check why the two writeFileSync calls can leave calls at 0 after the 250ms wait. Done means the test reliably observes one callback for the edit burst and still verifies that abort stops watching.

Written by the indexing model from the issue text.

Description

src/io/watchFile.test.ts:
  24 |   watchFile(path, () => calls++, controller.signal);
  25 | 
  26 |   writeFileSync(path, '{"a":1}');
  27 |   writeFileSync(path, '{"a":2}');
  28 |   await Bun.sleep(250);
  29 |   expect(calls).toBe(1);
                       ^
  error: expect(received).toBe(expected)
  
  Expected: 1
  Received: 0
  
        at <anonymous> (/Users/runner/work/agentcore-cli/agentcore-cli/src/io/watchFile.test.ts:29:17)
  
  Error: Expected: 1
  Received: 0
  
        at <anonymous> (/Users/runner/work/agentcore-cli/agentcore-cli/src/io/watchFile.test.ts:29:17)
  (fail) debounces a burst of edits into a single callback and stops on abort [257.78ms]
  (pass) a missing file fails quietly rather than throwing [0.18ms]

Ex. https://github.com/aws/agentcore-cli/actions/runs/33117797255/job/98676836925

Seen it fail twice on MacOS, retrying fixed.

Dominant language
TypeScript
Stars
291
Forks
96
Avg merge
20h 50m
Merged PRs (30d)
214

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 aws/agentcore-cli

All issues in aws/agentcore-cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.