Skip to content

feat(conf): add Google-Read-Aloud bot config#18

Open
adri wants to merge 1 commit intocnlangzi:mainfrom
adri:feat/add-google-read-aloud
Open

feat(conf): add Google-Read-Aloud bot config#18
adri wants to merge 1 commit intocnlangzi:mainfrom
adri:feat/add-google-read-aloud

Conversation

@adri
Copy link
Copy Markdown
Contributor

@adri adri commented Mar 19, 2026

Add detection for Google's text-to-speech crawler used by Google Assistant and Google Home. Verifies by IP using Google's published user-triggered fetchers list.

Ref: https://developers.google.com/crawling/docs/crawlers-fetchers/overview#google-read-aloud

Summary by Sourcery

New Features:

  • Introduce a Google-Read-Aloud bot configuration entry to detect requests from Google's text-to-speech crawler used by Google Assistant and Google Home.

Add detection for Google's text-to-speech crawler used by Google
Assistant and Google Home. Verifies by IP using Google's published
user-triggered fetchers list.

Ref: https://developers.google.com/crawling/docs/crawlers-fetchers/overview#google-read-aloud
@sourcery-ai
Copy link
Copy Markdown
Contributor

sourcery-ai bot commented Mar 19, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adds configuration for detecting the Google-Read-Aloud text-to-speech crawler as a search engine bot, wired into the existing Google parser and using Google’s published IP range list for user-triggered fetchers for verification.

Sequence diagram for Google-Read-Aloud bot detection flow

sequenceDiagram
    participant Client
    participant WebServer
    participant BotDetector
    participant GoogleParser
    participant IpRangeFetcher

    Client->>WebServer: HTTP request with User-Agent Google-Read-Aloud
    WebServer->>BotDetector: Pass request headers and client_ip
    BotDetector->>BotDetector: Match ua against google-read-aloud config
    BotDetector->>GoogleParser: Invoke parse with ua and client_ip
    GoogleParser->>IpRangeFetcher: Fetch IP ranges from user-triggered-fetchers JSON URL
    IpRangeFetcher-->>GoogleParser: Return Google user-triggered IP ranges
    GoogleParser->>GoogleParser: Verify client_ip in Google IP ranges
    GoogleParser-->>BotDetector: Return BotIdentity Google-Read-Aloud
    BotDetector-->>WebServer: Mark request as search_engine bot
    WebServer-->>Client: Serve response with bot-specific handling
Loading

File-Level Changes

Change Details Files
Introduce a new bot configuration for the Google-Read-Aloud text-to-speech crawler, integrating it with the existing Google bot parsing and IP verification flow.
  • Define a new SearchEngine kind entry named google-read-aloud that reuses the existing google parser.
  • Match the crawler by the "Google-Read-Aloud" user agent string.
  • Configure the URLs section to point at Google’s user-triggered fetchers IP ranges JSON for IP-based verification.
bots/conf.d/google-read-aloud.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
Copy Markdown
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
Copy Markdown

codecov bot commented Mar 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.80%. Comparing base (60ce193) to head (28e4dc8).
⚠️ Report is 7 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main      #18       +/-   ##
===========================================
- Coverage   72.76%   61.80%   -10.97%     
===========================================
  Files          15       24        +9     
  Lines         661     1000      +339     
===========================================
+ Hits          481      618      +137     
- Misses        136      324      +188     
- Partials       44       58       +14     

☔ 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.

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.

1 participant