30: Drive the requests the gate must refuse, end to end - #44
Open
nikolaystrikhar wants to merge 1 commit into
Open
30: Drive the requests the gate must refuse, end to end#44nikolaystrikhar wants to merge 1 commit into
nikolaystrikhar wants to merge 1 commit into
Conversation
Every scenario was an admin GET on the plugins screen, so the library's worst possible failure -- deactivating a plugin and exiting on a visitor's request, or aborting the activation core replays through plugin_sandbox_scrape() -- was covered by unit tests of Gatekeeper and by nothing that ran a request. Seven scenarios: a front-end request and plugins.php?action=activate leaving active_plugins untouched with nothing queued; a late boot resolving inline, with the order taken from WordPress's own update_option_active_plugins rather than asserted about; a conflict behind a sub-plugin that has none; a registration made after boot from a plugins_loaded callback; a duplicate slug with the sub-plugin behind it still loading; and a missing bundled file reported to the developer and not to the site owner.
nikolaystrikhar
force-pushed
the
29-uncovered-branches
branch
from
August 13, 2026 13:41
ade0f06 to
e400caf
Compare
nikolaystrikhar
force-pushed
the
30-scenario-coverage
branch
from
August 13, 2026 13:42
bad5ed0 to
64d8e45
Compare
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.
What: seven end-to-end scenarios in
Scenario\ConflictTestandScenario\LoadTest, pluspin_headers_as_sent()on the base case and the matching entries intests/README.md.Usage:
Why this way:
Every scenario was an admin GET on the plugins screen. So the library's worst possible failure — deactivating a plugin and
exiting on a visitor's request, or aborting the activation core replays throughplugin_sandbox_scrape()— rested entirely on unit tests ofConflict\Gatekeeperand on nothing that ran a request.The late-boot scenario takes its ordering from WordPress, not from us. It records
update_option_active_pluginsand the activation callback and asserts the sequence, which is what reachesConflict\Resolver::redirect()'sheaders_sent()branch through the real fallback rather than through a unit test of it.Each new scenario pairs with a branch that was passing for the wrong reason — the detector's first-entry loop, the registry buffer, the duplicate slug — so the end-to-end claim and the unit claim fail independently.