Skip to content

Carry document metadata in WordPress site plans - #640

Merged
chubes4 merged 6 commits into
trunkfrom
fix/639-site-plan-document-metadata
Jul 21, 2026
Merged

Carry document metadata in WordPress site plans#640
chubes4 merged 6 commits into
trunkfrom
fix/639-site-plan-document-metadata

Conversation

@chubes4

@chubes4 chubes4 commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Extend blocks-engine/wordpress-site-plan/v2 with normalized per-document metadata and generic reporting summaries.
  • Resolve local metadata references through the existing canonical token/write contract.
  • Preserve browser script loading and standard link/script attributes accurately.
  • Add an independent plan-plus-receipt projection contract so consumers can build reports without legacy compiler envelopes.

Closes #639
Relates to #632

What changed

  • Added ordered document title, meta, link, and script declarations with source/placement context.
  • Preserved quoted, unquoted, empty, boolean, and mixed-case HTML attributes through a bounded parser.
  • Modeled async, defer, async+defer, module, nomodule, inline, head/body, and effective browser loading independently.
  • Preserved standard attributes including integrity, crossorigin, referrerpolicy, as, fetchpriority, type, and media; empty crossorigin normalizes to anonymous.
  • Added generic source/block/fallback/provenance/diagnostic reporting summaries.
  • Added exact page/write correspondence validation for plan-plus-materialization-receipt projection.
  • Documented the generic consumer boundary; destination report paths and product envelopes remain downstream-owned.

How to test

  1. Run composer --working-dir=php-transformer validate --strict.
  2. Run php php-transformer/tests/contract/wordpress-site-plan.php; expect wordpress-site-plan contract passed.
  3. Run composer --working-dir=php-transformer test; expect all contracts, 244 parity fixtures, and package-install proof to pass.
  4. Run git diff --check origin/trunk...HEAD.

The existing required WordPress 6.7.4/MySQL integration job remains enabled alongside the full Composer gate.

Compatibility

This is additive to WordPressSitePlan v2 from php-transformer v0.4.0. Existing v2 fields and resolver behavior remain unchanged. Consumers can ignore the new metadata/reporting fields; consumers needing stable import reports can now project them from resolved plan plus receipt without reading TransformerResult, compiled_site, MaterializationView, raw HTML, source files, or private envelopes. Intended release: v0.4.1.

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode with OpenAI GPT-5.6 Sol
  • Model: openai/gpt-5.6-sol
  • Used for: Contract design, implementation, standards edge-case analysis, deterministic tests, documentation, and independent review with Chris Huber.

@chubes4
chubes4 merged commit da06db8 into trunk Jul 21, 2026
2 checks passed
@chubes4
chubes4 deleted the fix/639-site-plan-document-metadata branch July 21, 2026 00:14
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.

Carry canonical document metadata and reporting inputs in WordPressSitePlan

1 participant