Fix poisoned capabilities cache before and after Hiive connect#285
Open
mr-vara wants to merge 6 commits into
Open
Fix poisoned capabilities cache before and after Hiive connect#285mr-vara wants to merge 6 commits into
mr-vara wants to merge 6 commits into
Conversation
Reject and refetch capabilities that lack canAccessAI, never persist failed fetches, clear cache on successful connect, and remove the Bluehost bootstrap fallback that cached only canMigrateSite and hasAISiteGen for four hours.
mr-vara
requested review from
arunshenoy99 and
circlecube
and removed request for
arunshenoy99
July 9, 2026 08:07
Contributor
AI code review✅ Strengths
|
Contributor
|
Coverage: Base 32.94% → PR 33.17% (must not decrease). |
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.
Summary
canAccessAI(marker for a real Hiive response)nfd_site_capabilitieswhen connect succeeds so the next admin load refetches from HiivecanMigrateSiteandhasAISiteGenfor 4 hoursProblem
On first admin load,
wp-module-runtimerequests capabilities before connect completes. Failed fetches were cached (or replaced by a 2-key Bluehost fallback), so sites could be connected to Hiive whilecanAccessHelpCenterand other capabilities stayed missing for up to 4 hours.Test plan
vendor/bin/phpunit tests/wpunit/includes/SiteCapabilitiesWPUnitTest.php(in wp-browser env)canAccessHelpCenterGET /sites/v1/capabilitiesstill works for connected sites