fix(scheduler): register seo:warm-sitemap-source-cache in bootstrap/app.php#2817
Merged
Merged
Conversation
…pp.php 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.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
What changed
Add
seo:warm-sitemap-source-cache --jsontobootstrap/app.php->withSchedule()closure.Why
The application uses Laravel 11+
bootstrap/app.php->withSchedule()pattern for schedule registration, which takes precedence overKernel::schedule(). PR #2816 added the warm command toKernel::schedule()(dead code path) but not tobootstrap/app.php(active path).Impact: Since deployment, the scheduler has never executed
seo:warm-sitemap-source-cache. The sitemap-source cache was populated by the deploy-time warm only. The stale cache (24h TTL) provided a safety net, but the fresh cache expired after 10 minutes with no automatic rebuild.Validation
php artisan test --filter='SitemapWarm|SitemapSource|TestMetricsScheduler'— 20 tests passedphp artisan schedule:list | grep 'seo:warm-sitemap'— command now visible at*/10 * * * *git diff --check— cleanDeferred
email:lifecycle-rollout,commerce:repair-paid-orders, andcommerce:repair-post-commit-failedhave the same root cause (in Kernel but not in bootstrap/app.php) — separate follow-up PR.