Skip to content

Fixed incoming recommendations disappearing on transient errors#26673

Draft
kevinansfield wants to merge 1 commit intomainfrom
worktree-ONC-1500-missing-recommendation-notifications
Draft

Fixed incoming recommendations disappearing on transient errors#26673
kevinansfield wants to merge 1 commit intomainfrom
worktree-ONC-1500-missing-recommendation-notifications

Conversation

@kevinansfield
Copy link
Copy Markdown
Member

@kevinansfield kevinansfield commented Mar 3, 2026

Summary

During boot Ghost attempts to fetch recommendations to validate that they still exist. If the site isn't reachable then the recommendation is soft-deleted causing it to disappear from various UIs with no way for the site owner to recover it themselves. On next boot Ghost will revalidate the recommendations and restore any that are back online but it does leave periods where transient network issues can confusingly make recommendations disappear.

Changes

  • Transient fetch errors (429, 503) during incoming recommendation revalidation are now ignored instead of immediately deleting the mention
  • Hard failures now require 3 consecutive occurrences before a mention is soft-deleted, tracked via a new revalidation_failure_count column on the mentions table
  • A successful metadata fetch resets the failure counter to zero
  • All failures are logged with a [Webmention Revalidation] prefix for easy diagnosis

ref https://linear.app/ghost/issue/ONC-1511/

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 3, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch worktree-ONC-1500-missing-recommendation-notifications

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ErisDS
Copy link
Copy Markdown
Member

ErisDS commented Mar 3, 2026

🤖 Velo CI Failure Analysis

Classification: 🔴 HARD FAIL

  • Workflow: CI
  • Failed Step: Determine changed packages
  • Run: View failed run
    What failed: GitHub API rate limit exceeded, causing failure to list changed files
    Why: The error message indicates that the GitHub API rate limit has been exceeded, which is an infrastructure issue outside the control of the code. This is a hard failure that requires investigating the GitHub API usage and potentially increasing the rate limit.
    Action:
    Check the GitHub API usage and rate limit, and consider increasing the rate limit or implementing caching to avoid hitting the limit during CI runs.

@ErisDS
Copy link
Copy Markdown
Member

ErisDS commented Mar 3, 2026

🤖 Velo CI Failure Analysis

Classification: 🔴 HARD FAIL

  • Workflow: Migration Review
  • Failed Step: Run actions/github-script@v7
  • Run: View failed run
    What failed: Unexpected end of JSON input from GitHub API
    Why: The error message indicates that the GitHub API returned an unexpected response, which is likely an infrastructure issue on GitHub's side. This is not a code issue, as the error is not related to the application code itself.
    Action:
    This is likely a temporary issue with the GitHub API. Try rerunning the workflow, and if the issue persists, you may need to investigate further on the GitHub infrastructure side.

ref https://linear.app/ghost/issue/ONC-1511/

During boot, incoming recommendation mentions are revalidated. If the
metadata fetch failed for any reason (including transient errors like
429 rate limits or network timeouts), the mention was immediately
soft-deleted, causing valid recommendations to disappear from Ghost
Admin. Now transient errors are ignored entirely, and hard failures
require 3 consecutive occurrences before deletion. A successful fetch
resets the failure count.
@kevinansfield kevinansfield force-pushed the worktree-ONC-1500-missing-recommendation-notifications branch from 1fbb8e6 to fe16f21 Compare March 3, 2026 19:07
@ErisDS
Copy link
Copy Markdown
Member

ErisDS commented Mar 3, 2026

🤖 Velo CI Failure Analysis

Classification: 🟠 SOFT FAIL

  • Workflow: CI
  • Failed Step: Run unit tests
  • Run: View failed run
    What failed: Database schema has changed, but migration test failed
    Why: The root cause is a test failure related to the database schema integrity. This is a code issue, as the test is checking that the database schema has not changed without a corresponding migration being created.
    Action:
    The author should review the database schema changes, ensure a proper migration has been created, and update the test to reflect the new expected schema hash.

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