Repository navigation
Release: consistent health checks - #42
Merged
Merged
Conversation
Adds the standard health check set agreed for all Laravel Cloud apps: CacheCheck, OptimizedAppCheck, JobsCheck, FailedJobsCheck, ProductionConfigCheck (production only), SchedulePolicyCheck and PendingMigrationsCheck. HealthCheckTest now expects that set instead of asserting that cache and optimize checks are absent. 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>
All Laravel Cloud apps move to SESSION_DRIVER=database, and this app had no sessions table yet. The migration skips the table if it already exists. 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).
StorageRoundTripCheck, EntraClientSecretCheck and PostmarkTokenCheck are
new in this 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 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. JobsCheck and FailedJobsCheck declare strict types, as the repo's architecture rule requires for every app file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The check forged the share link by replacing the first signature character with '0'. Whenever the real signature already started with '0' (1 in 16 per browser, so about one run in four across the four browsers) the URL stayed valid and the server rightly answered 200, failing the test on a different browser each time. The first character is now flipped to a different value, and the test asserts the URL changed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Rolls out the health check set agreed for all Laravel Cloud apps.
P1 – consistent health checks (6df09d7)
CacheCheck,OptimizedAppCheck,JobsCheck,FailedJobsCheck,PendingMigrationsCheck,ProductionConfigCheck(production only) andSchedulePolicyCheck, with unit tests.SecurityAdvisoriesCheckloses->lastDayOfMonth(), which made it skip practically every hourly Oh Dear run.HealthCheckTestnow expects the full set.No P2 changes for this app (no Postmark, no Entra SSO).
Heads-up: the Cloud deploy command of this app has no
php artisan optimize, soOptimizedAppCheckwill fail in production until it is added.🤖 Generated with Claude Code