Skip to content

Conversation

@cnlangzi
Copy link
Owner

@cnlangzi cnlangzi commented Jan 11, 2026

Summary by Sourcery

Bug Fixes:

  • Correct PetalBot's allowed domain from petalbot.com to petalsearch.com in the bot configuration.

@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jan 11, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Updates the PetalBot configuration so its reverse DNS domain matches the new petalsearch.com domain instead of the old petalbot.com.

File-Level Changes

Change Details Files
Update PetalBot reverse DNS allowlist domain.
  • Change the configured PetalBot domain from petalbot.com to petalsearch.com in the bot config
  • Keep user agent, rdns flag, and other configuration fields unchanged
bots/conf.d/petalbot.yaml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@codecov
Copy link

codecov bot commented Jan 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.03%. Comparing base (1d89687) to head (126b6ea).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main       #8   +/-   ##
=======================================
  Coverage   75.03%   75.03%           
=======================================
  Files          14       14           
  Lines         645      645           
=======================================
  Hits          484      484           
  Misses        117      117           
  Partials       44       44           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cnlangzi cnlangzi merged commit c513563 into main Jan 11, 2026
5 checks passed
@cnlangzi cnlangzi deleted the fix/petalbot branch January 11, 2026 07:57
@github-actions
Copy link

Benchmark Results

BenchmarkFindBotByUA_Hit_First             	 1000000	      1240 ns/op	       7 B/op	       0 allocs/op
BenchmarkFindBotByUA_Hit_First-4           	 2229099	       489.3 ns/op	       5 B/op	       0 allocs/op
BenchmarkFindBotByUA_Hit_First-8           	 3681861	       368.7 ns/op	       5 B/op	       0 allocs/op
BenchmarkFindBotByUA_Hit_Middle            	 1608310	       675.9 ns/op	       5 B/op	       0 allocs/op
BenchmarkFindBotByUA_Hit_Middle-4          	 3020245	       399.0 ns/op	       5 B/op	       0 allocs/op
BenchmarkFindBotByUA_Hit_Middle-8          	 3080704	       337.9 ns/op	       3 B/op	       0 allocs/op
BenchmarkFindBotByUA_Hit_Last              	 1000000	      1072 ns/op	      13 B/op	       0 allocs/op
BenchmarkFindBotByUA_Hit_Last-4            	 3381315	       392.7 ns/op	       5 B/op	       0 allocs/op
BenchmarkFindBotByUA_Hit_Last-8            	 4775020	       376.3 ns/op	       3 B/op	       0 allocs/op
BenchmarkFindBotByUA_Miss                  	  463489	      2379 ns/op	      17 B/op	       0 allocs/op
BenchmarkFindBotByUA_Miss-4                	 1358923	       852.0 ns/op	       9 B/op	       0 allocs/op
BenchmarkFindBotByUA_Miss-8                	 1404720	       872.5 ns/op	       8 B/op	       0 allocs/op
BenchmarkFindBotByUA_CaseSensitive         	 1438464	       747.6 ns/op	       4 B/op	       0 allocs/op
BenchmarkFindBotByUA_CaseSensitive-4       	 3794468	       297.4 ns/op	       3 B/op	       0 allocs/op
BenchmarkFindBotByUA_CaseSensitive-8       	 2420392	       506.5 ns/op	       5 B/op	       0 allocs/op
BenchmarkValidate_KnownBot_IPHit           	 1000000	      1128 ns/op	      11 B/op	       0 allocs/op
BenchmarkValidate_KnownBot_IPHit-4         	 3772219	       279.2 ns/op	       2 B/op	       0 allocs/op
BenchmarkValidate_KnownBot_IPHit-8         	 3829994	       473.6 ns/op	       5 B/op	       0 allocs/op
BenchmarkValidate_Browser                  	  215452	      5383 ns/op	      45 B/op	       0 allocs/op
BenchmarkValidate_Browser-4                	--- FAIL: BenchmarkValidate_Browser-4
BenchmarkValidate_Browser-8                	  615114	      2006 ns/op	      22 B/op	       0 allocs/op
BenchmarkContainsWord                      	73481144	        16.59 ns/op	       0 B/op	       0 allocs/op
BenchmarkContainsWord-4                    	74226650	        16.26 ns/op	       0 B/op	       0 allocs/op
BenchmarkContainsWord-8                    	74153541	        16.11 ns/op	       0 B/op	       0 allocs/op
BenchmarkValidate_WithBotUA                	 1000000	      1121 ns/op	       2 B/op	       0 allocs/op
BenchmarkValidate_WithBotUA-4              	 2738036	       436.2 ns/op	       3 B/op	       0 allocs/op
BenchmarkValidate_WithBotUA-8              	 2754436	       432.4 ns/op	       4 B/op	       0 allocs/op
BenchmarkValidate_WithBotUA_IPMismatch     	  805905	      1552 ns/op	      14 B/op	       0 allocs/op
BenchmarkValidate_WithBotUA_IPMismatch-4   	 2060802	       540.5 ns/op	       5 B/op	       0 allocs/op
BenchmarkValidate_WithBotUA_IPMismatch-8   	--- FAIL: BenchmarkValidate_WithBotUA_IPMismatch-8
BenchmarkValidate_BrowserUA                	  294676	      4234 ns/op	      48 B/op	       0 allocs/op
BenchmarkValidate_BrowserUA-4              	  837415	      1465 ns/op	      21 B/op	       0 allocs/op
BenchmarkValidate_BrowserUA-8              	  837574	      1497 ns/op	      18 B/op	       0 allocs/op
BenchmarkValidate_UnknownBotUA             	 7801860	       152.4 ns/op	       1 B/op	       0 allocs/op
BenchmarkValidate_UnknownBotUA-4           	21074210	        60.09 ns/op	       0 B/op	       0 allocs/op
BenchmarkValidate_UnknownBotUA-8           	19898493	        58.23 ns/op	       0 B/op	       0 allocs/op
BenchmarkContainsIP                        	57603550	        21.64 ns/op	       0 B/op	       0 allocs/op
BenchmarkContainsIP-4                      	92864881	       562.4 ns/op	       0 B/op	       0 allocs/op
BenchmarkContainsIP-8                      	110644315	        10.95 ns/op	       0 B/op	       0 allocs/op
BenchmarkFindBotByUA                       	  815934	      1522 ns/op	      15 B/op	       0 allocs/op
BenchmarkFindBotByUA-4                     	 2071794	       578.4 ns/op	       6 B/op	       0 allocs/op
BenchmarkFindBotByUA-8                     	 2040936	       577.3 ns/op	       4 B/op	       0 allocs/op
BenchmarkClassifyUA                        	 2264593	       526.0 ns/op	       1 B/op	       0 allocs/op
BenchmarkClassifyUA-4                      	 5075263	       237.9 ns/op	       0 B/op	       0 allocs/op
BenchmarkClassifyUA-8                      	 5086659	       238.7 ns/op	       0 B/op	       0 allocs/op
Benchmark_MixedTraffic                     	  478954	      2836 ns/op	      11 B/op	       0 allocs/op
Benchmark_MixedTraffic-4                   	 1328474	       906.9 ns/op	       7 B/op	       0 allocs/op
Benchmark_MixedTraffic-8                   	 1300806	       898.8 ns/op	       6 B/op	       0 allocs/op
BenchmarkReload                            	     832	   1390802 ns/op	  666002 B/op	    6452 allocs/op
BenchmarkReload-4                          	     939	   1261670 ns/op	  667597 B/op	    6449 allocs/op
BenchmarkReload-8                          	     940	   1264119 ns/op	  667127 B/op	    6452 allocs/op
PASS
ok  	github.com/cnlangzi/knownbots	127.414s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants