Skip to content

Release: consistent health checks - #125

Merged
StanBarrows merged 5 commits into
productionfrom
main
Oct 23, 2026
Merged

StanBarrows merged 5 commits into
productionfrom
main

Conversation

@StanBarrows

Copy link
Copy Markdown
Contributor

Release of the consistent health check set.

P1: consistent health checks

  • Adds CacheCheck, OptimizedAppCheck, PendingMigrationsCheck, ProductionConfigCheck (production only), SchedulePolicyCheck and StorageRoundTripCheck, with unit tests.
  • SecurityAdvisoriesCheck no longer uses ->lastDayOfMonth(): spatie only runs a check when its cron is due in the minute of the request, and Oh Dear asks hourly, so it was skipped on practically every run.

P2: Postmark token

  • Adds PostmarkTokenCheck, registered only when mail.default is postmark.

Note: StorageRoundTripCheck fails if the production default disk is local; check FILESYSTEM_DISK on Cloud before merging.

🤖 Generated with Claude Code

Sebastian BURGIN-FIX (ext) and others added 5 commits October 23, 2026 11:22
Adds the standard health check set agreed for all Laravel Cloud apps:
CacheCheck, OptimizedAppCheck, PendingMigrationsCheck,
ProductionConfigCheck (production only), SchedulePolicyCheck and
StorageRoundTripCheck.

SecurityAdvisoriesCheck loses ->lastDayOfMonth(): spatie only runs a
check when its cron is due in the minute of the request, and Oh Dear asks
once an hour, so the check was skipped on practically every run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds PostmarkTokenCheck, registered only when the mailer is postmark: it
asks Postmark for the server behind the configured token and fails when
the token is missing or rejected, before mails pile up in failed jobs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every codebar Laravel app now registers the same checks in the same
order. Checks that do not apply report ok instead of being left out:

- DatabaseCheck, DatabaseConnectionCountCheck (warn > 50, fail > 80),
  JobsCheck, FailedJobsCheck and PendingMigrationsCheck report
  "no database" when config('health.uses_database') is false.
- PostmarkTokenCheck reports ok when the mailer is not postmark.
- EntraClientSecretCheck finds its credentials in microsoft-entra-sso or
  services.microsoft and reports ok when no SSO is configured.
- StorageRoundTripCheck warns instead of failing while the default disk is
  local (a bucket will be added to every app).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The standard health checks get one test file per class (DatabaseCheck,
DatabaseConnectionCountCheck, DatabaseAvailability) and tests for every
branch, so the 100 % coverage gate holds. PendingMigrationsCheck is now
tested against a mocked migrator; DatabaseConnectionCountCheck is no
longer final so its thresholds can be tested without a real connection
count. EntraClientSecretCheck drops the unused configKey() override.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@StanBarrows
StanBarrows merged commit 1a8adb3 into production Oct 23, 2026
6 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.

1 participant