Skip to content

fix(scheduler): register seo:warm-sitemap-source-cache in bootstrap/app.php#2817

Merged
fermatmind merged 1 commit into
mainfrom
fix/sitemap-warm-scheduler-bootstrap
Jul 7, 2026
Merged

fix(scheduler): register seo:warm-sitemap-source-cache in bootstrap/app.php#2817
fermatmind merged 1 commit into
mainfrom
fix/sitemap-warm-scheduler-bootstrap

Conversation

@fermatmind

Copy link
Copy Markdown
Owner

What changed

Add seo:warm-sitemap-source-cache --json to bootstrap/app.php ->withSchedule() closure.

Why

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

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 passed
  • php artisan schedule:list | grep 'seo:warm-sitemap' — command now visible at */10 * * * *
  • git diff --check — clean

Deferred

  • email:lifecycle-rollout, commerce:repair-paid-orders, and commerce:repair-post-commit-failed have the same root cause (in Kernel but not in bootstrap/app.php) — separate follow-up PR.

…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.
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@fermatmind fermatmind merged commit 26fb90a into main Jul 7, 2026
15 checks passed
@fermatmind fermatmind deleted the fix/sitemap-warm-scheduler-bootstrap branch July 7, 2026 16:06
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