Skip to content

[codex] Extend semantic E2E for Site Editor objects#316

Closed
adamziel wants to merge 1 commit into
codex/merge-revalidation-nextfrom
codex/wp-semantic-merge-e2e-next
Closed

[codex] Extend semantic E2E for Site Editor objects#316
adamziel wants to merge 1 commit into
codex/merge-revalidation-nextfrom
codex/wp-semantic-merge-e2e-next

Conversation

@adamziel
Copy link
Copy Markdown
Contributor

@adamziel adamziel commented May 18, 2026

What it does

Extends the runtime WordPress semantic merge E2E slice with branch-local Site Editor objects:

  • wp_template_part
  • wp_template
  • wp_global_styles

The test now creates these through WordPress on both source and target branches, stores their IDs in the branch semantic option graph, merges source into target, and verifies both branches' Site Editor rows and option references survived the merge without ID rewriting.

Also updates docs/merge-reliability.md to point the release-gate evidence at the successful v0.1.34 publish run.

Rationale

The fast PHP smoke suite already covers synthetic wp_template_part, wp_template, and wp_global_styles merge cases. This adds the matching runtime coverage so real WordPress insertion, serialization, and branch merge behavior are covered by the semantic E2E path too.

Implementation

The existing forkpress-e2e-semantic.php mu-plugin now inserts Site Editor rows during each branch mutation and includes them in the inspect response. The post-merge validator checks:

  1. both source and target rows exist with the expected post types;
  2. branch option graphs still point at the correct branch-local Site Editor IDs;
  3. template part content, template-part block JSON, and global-styles JSON survive the merge.

This PR is stacked on #313 and should be retargeted to trunk after #313 merges.

Testing instructions

Run:

bash -n tests/cow/e2e.sh
awk '/^cat > "\\$WORK\\/main\\/wp-content\\/mu-plugins\\/forkpress-e2e-semantic.php" <<\\x27PHP\\x27$/{in_block=1; next} in_block && /^PHP$/{exit} in_block{print}' tests/cow/e2e.sh | php -l

Full runtime verification is:

FORKPRESS_E2E_ONLY=semantic tests/cow/e2e.sh <path-to-current-forkpress-binary>

Local full E2E was not run in this worktree because it does not have a built production dist/x86_64-unknown-linux-gnu runtime bundle.

@adamziel adamziel force-pushed the codex/wp-semantic-merge-e2e-next branch from 5204d23 to c16bd65 Compare May 18, 2026 10:19
@adamziel adamziel deleted the branch codex/merge-revalidation-next May 18, 2026 10:32
@adamziel adamziel closed this May 18, 2026
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.

2 participants