Follow-up (#7003 review L1): replace the browser-opener guard test's setTimeout poll with fs.watch

Open Beginner friendly
#7,005 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
82/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
node.js, typescript
Domain
testing

Research direction

Read packages/coding-agent/test/suite/regressions/7002-suite-browser-opener-guard.test.ts and find the wait loop that polls for the guard record file. Replace it with a bounded event-driven wait using fs.watch on the guard directory, keeping the existing 5-second deadline. Run the regression test and confirm it waits for the guard record without polling while preserving the guard behavior.

Written by the indexing model from the issue text.

Description

Summary

Follow-up from the #7003 review (LOW L1, deferred by the reviewer and the LEAD): packages/coding-agent/test/suite/regressions/7002-suite-browser-opener-guard.test.ts waits for the guard record file with a fixed 25 ms setTimeout poll loop (5 s deadline). The wait is on a detached OS child, which is defensible as an OS boundary, but fs.watch on the guard dir (or awaiting the stub's exit) would meet the suite's no-polling rule cleanly.

Scope

Single file: replace the poll loop with an event-driven wait (fs.watch on the guard dir, bounded deadline unchanged). No behavior change to the guard itself.

From review receipt code-yeongyu_senpi#7003-4397b1a150 (seoul-dq, opus-5-5).

Dominant language
TypeScript
Stars
521
Forks
167
Avg merge
23h 39m
Merged PRs (30d)
692

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

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 code-yeongyu/senpi

All issues in code-yeongyu/senpi

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.