Repository navigation
Accept native front-page rewrite cache refresh during apply - #191
Merged
Merged
Conversation
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.
Problem
A confirmed front-page assignment on WordPress 7.1 rebuilt the native rewrite cache. Apply treated its changed hash as an unrelated edit and returned an unknown outcome after creating the pages and setting the front page.
Solution
Allow that hash to advance only while a changed, explicitly planned front-page option reads back as requested. Every other snapshot and routing field stays compared. When an interrupted option is proved, refresh completed pages' derived routes so the existing journal can continue without recreating them.
src/site/apply.tsdev/test/site-apply.test.tssrc/site/apply.tsDiff
+13 −5 · 2 files · no new command, dependency or recovery mechanism.
Testing & verification
Reviewed revision:
3b8103c2f01447f98e3fb526b40a8e7c2dc0cfbd· Environment: local macOS, Node 22.23.1.npm exec vitest -- run dev/test/site-apply.test.ts dev/test/site-plan.test.ts dev/test/site-apply-wpcli.test.ts: 71 passed, exit 0.npm run typecheckandgit diff --check: exit 0.npm run verify: exit 0; 977 passed, 4 skipped; typecheck, build, source-hash, private-reference and package checks passed.97ba58awas retained. Exact expected/observed product snapshots differed only in the rewrite hash afterpage_on_frontchanged from 0 to 9.Not verified: corrected native continuation is pending. The original unknown-outcome evidence is preserved.
Risk / rollout
An opaque hash cannot prove why the cache changed. This accepts WordPress's observed rewrite result during the specific planned front-option mutation; it does not exclude simultaneous external rewrite changes. The existing concurrency limitation remains. Other routing fields, stale state, ownership and exact recovery proof stay checked.
Detection: targeted transition controls, full CI and the retained native journal continuation. Rollback: revert this PR; existing native effects remain explicit and require operator review.