Skip to content

Conversation

@0xJacky
Copy link
Owner

@0xJacky 0xJacky commented Nov 25, 2025

Prevent disabled site health checks from making network requests to fix issue #1446.

Even when health checks were disabled, the tryGetFavicon function would implicitly trigger HTTP GET requests, leading to unexpected traffic. This PR ensures that when health checks are disabled, cached site metadata is returned immediately without any network activity.


Open in Cursor Open in Web


Note

When health checks are disabled, return cached site metadata without making HTTP requests, leveraging a snapshot of prior site info and adding a unit test to enforce this.

  • Backend (sitecheck):
    • Behavior change: CheckSite now returns cached metadata when HealthCheckEnabled is false, avoiding favicon fetches and all network calls; populates fields from an existing site snapshot if available.
    • Utility: Adds getExistingSiteSnapshot with read-locking to safely clone prior SiteInfo.
  • Tests:
    • Adds TestCheckSiteSkipsNetworkWhenDisabled to ensure no HTTP requests occur when health checks are disabled.

Written by Cursor Bugbot for commit 54d2764. This will update automatically on new commits. Configure here.

This change ensures that when a site's health check is disabled, the checker returns cached metadata without making any network requests, as per issue #1446. A new helper function `getExistingSiteSnapshot` is introduced to retrieve this cached information. A new test case `TestCheckSiteSkipsNetworkWhenDisabled` is added to verify this behavior.

Co-authored-by: jacky-943572677 <jacky-943572677@qq.com>
@cursor
Copy link

cursor bot commented Nov 25, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@0xJacky 0xJacky marked this pull request as ready for review November 25, 2025 11:23
@0xJacky
Copy link
Owner Author

0xJacky commented Nov 25, 2025

cursor review

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no bugs!


@0xJacky 0xJacky merged commit 748b09f into dev Nov 25, 2025
40 checks passed
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.

3 participants