docs: add Workers howto page and Packages.md entry#56
Conversation
- New howto/workers.md: overview, quick start, builder methods, WorkerContext, helpers, dynamic workers (config reconciliation, fixed children, per-tenant, nested hierarchy), logging - Add Workers section to Packages.md - Add /howto/workers/ to Playwright navigation tests
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 11 minutes and 47 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 WalkthroughWalkthroughAdds documentation for a new Workers library (package reference and a detailed how-to) and updates the site test suite to include the new howto page route. No code changes to exported/public APIs. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@howto/workers.md`:
- Around line 19-27: The fenced architecture block is missing a language tag
causing MD040; update the fenced code block in the workers.md content (the ASCII
diagram block starting with "Root Supervisor" and the triple backticks) to
include a language identifier such as ```text so the block becomes ```text ...
``` and satisfies the markdown lint rule.
- Line 289: The markdown contains an unused reference label "workers-docs" (the
link definition `[workers-docs]:
https://pkg.go.dev/github.com/go-coldbrew/workers`); either remove that link
definition if it's not needed or update the document to reference
`[workers-docs]` where the package docs should be linked (e.g., replace an
inline URL or add the reference-style link). Locate the definition for the
"workers-docs" label and either delete it or insert the `[workers-docs]`
reference into the appropriate anchor text elsewhere in the file so MD053 is
satisfied.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: fc61b6a9-9b48-458b-94f1-96014c5abcb7
📒 Files selected for processing (3)
Packages.mdhowto/workers.mdtests/navigation.spec.ts
There was a problem hiding this comment.
Pull request overview
This PR expands the documentation set by introducing a new “Workers” How To guide for the go-coldbrew/workers package, linking it from the central package index, and ensuring the new page is covered by the docs site navigation smoke test.
Changes:
- Add new
howto/workers.mddocumentation page covering worker lifecycle patterns and APIs. - Add a “Workers” entry to
Packages.mdwith links to GitHub and pkg.go.dev docs. - Update Playwright navigation smoke test to include the new
/howto/workers/route.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/navigation.spec.ts | Adds /howto/workers/ to the list of how-to pages that must load successfully. |
| Packages.md | Adds a “Workers” section and link references to the Workers repo and Go docs. |
| howto/workers.md | Introduces the new Workers how-to page with overview, patterns, and examples. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Add text language tag to architecture code fence - Handle Run error in quick start example - Simplify log.Info usage to match ColdBrew API pattern - Remove unused workers-docs reference link
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
howto/workers.md (1)
274-274: Use fully-qualified type name for consistencyConsider changing
[]*Worker{w}to[]*workers.Worker{w}in prose to match the rest of the page and reduce ambiguity for readers.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@howto/workers.md` at line 274, Update the prose to use the fully-qualified type name to match the rest of the document: change the snippet `[]*Worker{w}` to `[]*workers.Worker{w}` in the sentence describing RunWorker as a convenience for Run(ctx, []*Worker{w}); keep the rest of the sentence intact and ensure the referenced symbols RunWorker, Run, and workers.Worker are used exactly as shown.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@howto/workers.md`:
- Around line 38-50: The Quick Start snippet is missing required imports which
prevents copy-paste execution; add the standard imports used (context, log, os,
os/signal, time) and keep the third-party "github.com/go-coldbrew/workers"
import, so the calls to signal.NotifyContext, workers.Run and workers.NewWorker
compile correctly; update the import block to a grouped import including those
standard packages and leave the rest of the example (ctx/cancel, NotifyContext,
NewWorker, Every, WithRestart, Run) unchanged.
---
Nitpick comments:
In `@howto/workers.md`:
- Line 274: Update the prose to use the fully-qualified type name to match the
rest of the document: change the snippet `[]*Worker{w}` to
`[]*workers.Worker{w}` in the sentence describing RunWorker as a convenience for
Run(ctx, []*Worker{w}); keep the rest of the sentence intact and ensure the
referenced symbols RunWorker, Run, and workers.Worker are used exactly as shown.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
howto/workers.mdpage covering the go-coldbrew/workers packageHowto page covers:
Test plan
Summary by CodeRabbit