Skip to content

feat: implement workers pattern - #65

Merged
aidanhibbard merged 2 commits into
mainfrom
feat/workers-pattern
Jul 19, 2026
Merged

feat: implement workers pattern#65
aidanhibbard merged 2 commits into
mainfrom
feat/workers-pattern

Conversation

@aidanhibbard

Copy link
Copy Markdown
Owner

Summary

Allows for developers to pass their own pattern for scanning worker files.

Changes

  • Implements an optional pattern for scanning workers directories.

How to Test

  1. Boot your app with worker files using a pattern and a mix of file types
  2. Verify only your selected files are scanned

Screenshots (optional)

N/A

Linked Issues

Closes #60

Checklist

  • I read CONTRIBUTING.md and agree to the Code of Conduct
  • I tested these changes locally
  • Added/updated tests if needed
  • Updated docs (README/docs) if needed
  • npm run ci passes (or npm run lint and npm test at minimum)
  • No breaking changes, or I documented them above

@aidanhibbard aidanhibbard self-assigned this Jul 19, 2026
@aidanhibbard aidanhibbard added the enhancement New feature or request label Jul 19, 2026
@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@aidanhibbard, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 55 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 23132a8b-a836-4c7e-b91a-b12207433c32

📥 Commits

Reviewing files that changed from the base of the PR and between d1c49ac and 674f3d2.

📒 Files selected for processing (1)
  • src/module.ts
📝 Walkthrough

Walkthrough

Adds configurable worker-file glob scanning through processor.workersPattern, updates the scanner API, wires the option into module setup, documents the configuration, and expands scan-folder test coverage.

Changes

Worker scan configuration

Layer / File(s) Summary
Configurable scan API and tests
src/utils/scan-folder.ts, spec/utils/scan-folder.spec.ts
scanFolder now accepts a path and optional pattern, preserving the default glob and testing extension filters, extglob exclusions, and empty matches.
Module option wiring and documentation
src/module.ts, docs/api.md, changelog.md
Adds workersPattern with its default, passes it into worker discovery, and documents the new option.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ModuleBuildStart
  participant scanFolder
  participant fastGlob
  ModuleBuildStart->>scanFolder: path and workersPattern
  scanFolder->>fastGlob: scan path with pattern
  fastGlob-->>scanFolder: matching worker files
  scanFolder-->>ModuleBuildStart: worker file list
Loading

Poem

A rabbit hops through globs so wide,
While test files quietly step aside.
Patterns bloom from root to leaf,
Workers gather, neat and brief.
“Thump!” says Bunny—scans complete!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: adding support for a workers pattern.
Description check ✅ Passed The description follows the template and includes summary, changes, testing steps, linked issue, and checklist.
Linked Issues check ✅ Passed The changes address #60 by making worker scanning pattern-based and adding coverage to exclude spec files.
Out of Scope Changes check ✅ Passed The changelog, docs, tests, and code changes all support the new workers pattern behavior and are in scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/workers-pattern

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@aidanhibbard
aidanhibbard merged commit 5cba104 into main Jul 19, 2026
3 checks passed
@aidanhibbard
aidanhibbard deleted the feat/workers-pattern branch July 19, 2026 22:11
@coderabbitai coderabbitai Bot mentioned this pull request Jul 19, 2026
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Filter out test files from workers entry generation

1 participant