Problem
Studio’s Socials review flow still creates fake pending WordPress posts with _studio_social_* metadata and publishes on post-status transitions. This duplicates action storage, review state, resolution, and cleanup behavior already owned by Data Machine.
Current legacy paths:
src/blocks/studio/tabs/socials/publish/index.ts::submitForReview()
inc/social-drafts.php
Goal
Represent each Socials review request as a Data Machine pending action and remove the post-backed approval lifecycle.
Upstream readiness
The earlier observer-dispatch and signed-resolution prerequisites have landed. Re-read the current PendingActionStore and Data Machine Socials contracts before implementation; do not rely on historical API names in old comments.
Migration sequence
- Document the current pending-action create/read/resolve contract.
- Submit caption, platform, media, requester, and provenance as a bounded Socials action payload.
- Resolve approval through the existing Data Machine Socials publish handler.
- Migrate or explicitly dispose of existing
_studio_social_* pending posts.
- Remove transition-post-status publishing and obsolete meta registration.
- Preserve direct Publish Now behavior.
Acceptance criteria
- Submit for Review creates no WordPress post.
- Pending actions are idempotent and auditable.
- Approval and rejection re-check reviewer authorization.
- Publish outcomes and platform errors are stored on the action/receipt path.
- Existing pending records have a documented one-time migration or cleanup result.
inc/social-drafts.php legacy storage and transition behavior are removed.
- Tests cover create, duplicate request, approve, reject, unauthorized resolve, and publish failure.
Problem
Studio’s Socials review flow still creates fake pending WordPress posts with
_studio_social_*metadata and publishes on post-status transitions. This duplicates action storage, review state, resolution, and cleanup behavior already owned by Data Machine.Current legacy paths:
src/blocks/studio/tabs/socials/publish/index.ts::submitForReview()inc/social-drafts.phpGoal
Represent each Socials review request as a Data Machine pending action and remove the post-backed approval lifecycle.
Upstream readiness
The earlier observer-dispatch and signed-resolution prerequisites have landed. Re-read the current PendingActionStore and Data Machine Socials contracts before implementation; do not rely on historical API names in old comments.
Migration sequence
_studio_social_*pending posts.Acceptance criteria
inc/social-drafts.phplegacy storage and transition behavior are removed.