src/io/watchFile.test.ts flaky test on refactor branch.
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
- 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 aws/agentcore-cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
aws/agentcore-cli#2395 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
aws/agentcore-cli#2392 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
aws/agentcore-cli#2267 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
aws/agentcore-cli#2258 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
aws/agentcore-cli#2176 ·
Maintainers usually reply within 1 day
All issues in aws/agentcore-cli
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
opengovsg/FormSG#10118 · 1 comment ·
Maintainers usually reply within 1 day
-
ai-driven-qa bug claude
Difficulty 1/5 Under an hour Newbie friendliness 75/100
linagora/twake-calendar-frontend#1434 · 1 comment ·
Maintainers usually reply within 1 day
-
check:passed streams:add
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
iptv-org/iptv#52824 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 Half a day Newbie friendliness 78/100
jaegertracing/jaeger-ui#4512 ·
Maintainers usually reply within 1 day
-
area:ide documentation enhancement platform:macos platform:vscode
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
anthropics/claude-code#97389 ·
Maintainers usually reply within 1 day