fix(seo): keep stale sitemap cache and schedule sitemap source warm#2816
Merged
Merged
Conversation
- retain stale sitemap-source cache on article publish as fallback safety net - schedule seo:warm-sitemap-source-cache every 10 minutes without overlapping - update article publish discoverability cache invalidation test - no CMS writes, no search submission, no deployment - sitemap suite has 2 pre-existing unrelated failures
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
fermatmind
added a commit
that referenced
this pull request
Jul 7, 2026
…pp.php (#2817) Root cause: The application uses Laravel 11+ bootstrap/app.php ->withSchedule() pattern for schedule registration, which takes precedence over Kernel::schedule(). PR #2816 added the warm command to Kernel::schedule() (dead code path) but not to bootstrap/app.php (active path). Fix: Add seo:warm-sitemap-source-cache --json to the ->withSchedule() closure in bootstrap/app.php at everyTenMinutes(). Also add SitemapWarmSchedulerBootstrapTest to prevent regression. Note: email:lifecycle-rollout, commerce:repair-paid-orders, and commerce:repair-post-commit-failed have the same root cause and are registered in Kernel but missing from bootstrap/app.php — a separate follow-up PR should address those.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Root Cause
Two bugs:
seo:warm-sitemap-source-cachenever scheduled — the command was implemented but never added toKernel::schedule(). After the fresh cache TTL (10 min) expired, the API fell back to stale; after stale expired (24h) or article publish flushed both, the API fell back to ~20 hardcoded paths — and stayed there.flushArticleDiscoverabilityCaches()deleted both fresh AND stale — on article publish, bothCACHE_KEY_FRESHandCACHE_KEY_STALEwere deleted, leaving only the fallback. Since no scheduled warm existed, this was effectively permanent.Fix
SeoDiscoverabilityCacheInvalidator.phpCACHE_KEY_STALE— retain as safety net during gap windowKernel.phpseo:warm-sitemap-source-cache --jsonevery 10 min,withoutOverlapping()ArticlePublishDiscoverabilityCacheInvalidationTest.phpRuntime Impact
Before: Article publish → fallback (~20 paths) until manual warm
After: Article publish → stale cache (~2,389 paths) for max 10 min gap, then fresh. If warm fails, stale retained.
Validation
Impact
Explicitly Deferred