Repository navigation
Refuse a too-long migration option and tighten the hook grammar - #67
Merged
Merged
Conversation
The runner validated its option only through the lock it names,
{option}_lock, which used to be longer than the scheduled hook
{option}_run. The hook {option}/migration/run is longer, so an option
of 178 to 186 bytes passed construction and threw only when a batched
step first scheduled its continuation, leaving the migration stuck.
The runner builds its ScheduledHook once in the constructor, which
refuses a hook name over 191 bytes there, and schedules that instance.
A new row constructs a runner on a 177-byte option and expects a
178-byte one to throw.
Assisted-by: Claude Code:claude-opus-5-5
Review found three loose ends. The grammar in AGENTS.md read as if an
option-built name such as {option}/migration/run broke it, so it now
says that a hook built from an id or option name the consumer passes
takes it whole as its first level. The updater's hook docblock carried
a semicolon. The consumer request's record kept the key "initialized"
for a count of {prefix}/boot/succeeded, so the key is boot_succeeded.
Assisted-by: Claude Code:claude-opus-5-5
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. The two review commits of #66, which merged before they were pushed:
{option}/migration/runis longer than the lock{option}_lockthrough which the constructor validated the option, so an option of 178 to 186 bytes passed construction and threw only when a batched step first scheduled its continuation, leaving the migration stuck. The runner builds itsScheduledHookin the constructor, which refuses a hook name over 191 bytes there, and schedules that instance.AGENTS.mdsays that a hook built from an id or option name the consumer passes takes it whole as its first level, which covers{option}/migration/run;initializedbecomesboot_succeeded, after the hook it counts.Production code +18 −8 (2 files), tests +13 −5 (6 files), docs +1 −1 (
AGENTS.md).Testing.
composer quality-checkwith Unit 192 and Integration 1,346,composer test:integration:multisite(41) andcomposer test:integration:php74(2).