feat(Health): Site Health board — check registry + security checks (#41 phase 1)#71
Merged
Conversation
…r sitemap, file editing)
17 tasks
…ware generator check, duplicate-id guard, translatable badges, kses on actions
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.
Implements phase 1 of #41 per the design refinement comment (code-first configuration, read-only board).
What
Parisek\TimberKit\Health\sub-namespace:HealthCheckinterface (declareseffect/config/bothverification method),Resultvalue object (static constructors only — invalid status unrepresentable),CheckRegistry(unique ids, throws on collision),SiteHealthAdapter(the only Site Health touchpoint).StarterBase::$site_healthflag, defaultfalse(feature-flag doctrine). Wiring: defaults →health_checks()Base.php override (primary customization path, visible in project diffs) →timber_kit_health_checksfilter (uniform low-level hook) → adapter.Read-only by design
The board never writes: no options page, no DB toggles, no remediation buttons. Expected state lives versioned in code; Site Health reports drift. "Actions" hints point to code fixes.
Testing on a real project
In the project
Baseclass setprotected bool $site_health = true;, then open Tools → Site Health → Status. Five "Security" badged entries appear; the REST users check performs a loopback request (falls back torecommendedwith an explanation when loopbacks are blocked).Follow-ups (tracked in #41)
timber-kitself-diagnostics category (version currency, deprecated API usage, flag inventory viadebug_information)wp timber-kit health) for CI gates + fleet sweepswarn_duplicate_security_headers,resizer_format_health) onto the registryCloses nothing — #41 stays open as the tracking issue.
🤖 Generated with Claude Code
https://claude.ai/code/session_01BJHq7Gez1NRq46Q7dwvra6