Drop Worker-id suffix from crawler UA#384
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughThe PR removes the per-crawler ChangesCrawler ID and User-Agent Simplification
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
Updates to Preview Branch (work/exciting-bartik-1e43af) ↗︎
Tasks are run on every commit but only new migration files are pushed.
View logs for this Workflow Run ↗︎. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Release VersionsApp patch: ChangelogChanged
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CHANGELOG.md`:
- Line 34: The inline code span in CHANGELOG.md currently contains a leading
space inside the backticks (` Worker-<id>`) which triggers markdownlint MD038;
edit the line so the backticks enclose the exact token Worker-<id> (i.e., change
`` ` Worker-<id>` `` to `` `Worker-<id>` ``) and if you intended spacing for the
surrounding text, move the extra space outside the backticks; this touches the
text mentioning `Worker-<id>` and the surrounding phrase referencing
`crawler.New`.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 3162d1f2-8099-4308-8f6d-5e0bc35a948b
📒 Files selected for processing (1)
CHANGELOG.md
|
🐝 Review App Deployed Homepage: https://hover-pr-384.fly.dev |
Drop Worker-id suffix from crawler UA
Summary
crawler.New(config, id...)had a dead branch that appendedWorker-<id>to the configuredUserAgent. No production caller passes an ID — all three call sites (cmd/worker/main.go,cmd/app/main.go,internal/jobs/manager.go) usecrawler.New(crawlerConfig), so the suffix has never been emitted.id ...stringvariadic,crawlerIDlocal, and the never-readidfield on theCrawlerstruct.Why
docs/research/2025-10/crawling-best-practice/issue-6-user-agent-rotation.mdalready notes the Worker-N suffix isn't used. Leaving the branch in place was a foot-gun — any future caller passing an ID would silently mutate the UA we publish on/botand rely on for robots.txt identification.Test plan
gofmt -w internal/crawler/crawler.gogo build ./...go test ./internal/crawler/...(passes, 15.3s)/botpage rendersHoverBot/1.0 (+https://goodnative.co)(no behavioural change expected — production UA was already this exact string)Need help on this PR? Tag
@codesmithwith what you need.Summary by CodeRabbit
Refactor
Documentation