Skip to content

publish-post: note schema-regression gap in --update --dry-run - #241

Merged
jasperf merged 1 commit into
mainfrom
fix/publish-post-dry-run-schema-note
Sep 20, 2026
Merged

jasperf merged 1 commit into
mainfrom
fix/publish-post-dry-run-schema-note

Conversation

@jasperf

@jasperf jasperf commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • publish-post --update --dry-run reported 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.
  • The dry-run message now says so explicitly when --update is passed, per option 2 in the issue (the cheap, honest fix that avoids adding a first remote read to an otherwise pure-local preflight).
  • Confirmed the MCP publish_post tool 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.sh
  • Read through publish_post.ts to confirm the MCP tool path already evaluates the regression check ahead of its dry-run return

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.
@jasperf
jasperf merged commit 3438a50 into main Sep 20, 2026
1 check passed
@jasperf
jasperf deleted the fix/publish-post-dry-run-schema-note branch September 20, 2026 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

publish-post --dry-run doesn't evaluate the Article schema regression check

1 participant