publish-post: note schema-regression gap in --update --dry-run - #241
Merged
Merged
Conversation
The Article-schema regression guard added for #217 lives in the PHP worker and reads the live post, so a --dry-run had nothing to diff against and always reported a clean run — even for an update whose draft drops a field the real run would hard-abort on. The dry-run message for --update now says the check isn't evaluated until publish time, per the cheap-fix option from #240.
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
publish-post --update --dry-runreported a clean run for updates that the real run would hard-abort, because the Article-schema regression guard added for imageAttachmentId silently strips the Article schema image on update #217 lives entirely in the PHP worker and reads the live post — the preflight above it is pure local file inspection with no remote read, so it had nothing to diff against.--updateis passed, per option 2 in the issue (the cheap, honest fix that avoids adding a first remote read to an otherwise pure-local preflight).publish_posttool already runs this diff before its dry-run return, so it needed no change.Closes #240
Test plan
bash -n wp-cli/content-creation/publish-post.shpublish_post.tsto confirm the MCP tool path already evaluates the regression check ahead of its dry-run return