Skip to content

refactor(php-transformer): build site plans before report projection - #1656

Merged
chubes4 merged 2 commits into
trunkfrom
refactor/1360-pre-report-plan
Sep 10, 2026
Merged

refactor(php-transformer): build site plans before report projection#1656
chubes4 merged 2 commits into
trunkfrom
refactor/1360-pre-report-plan

Conversation

@chubes4

@chubes4 chubes4 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Continues #1360 by removing the provisional conversion report from artifact compilation. Internal site-plan construction consumes producer-owned fallback evidence, then the compiler constructs the terminal report once. Public WordPressSitePlan::fromResult() retains strict canonical-envelope validation. Serialized source-report ordering is preserved.

Verification

All ten CI checks passed on 242e71506f4f007754a73cab40462367a1ac6fdb: Composer tests, WordPress integration across PHP 8.2-8.5, and visual parity tools, plus solved-site promotion.

  • Added pre-report/final-plan equality coverage for ordinary output and nonempty sanitization fallback evidence, plus rejection of pre-report data through the public API.
  • Focused site-plan contract passed on the candidate.
  • Initial external-harness comparison of 385 HTML fixtures and nine targeted cases did not catch a final artifact-report regression. CI caught a plan/report asset-count mismatch. The correction retains the completed plan in the final report's transient inputs without changing persisted key order.
  • Direct full artifact parity passed all 305 fixtures on baseline and corrected candidate. The original candidate reproduced the CI failure. Added explicit terminal-report counts to the affected commerce/runtime artifact fixture.
  • PHP syntax checks and git diff --check passed.
  • Local test execution encountered FAIL [empty-plaintext-drops]; separate baseline and candidate runs reproduced the same failure in that environment. Final CI Composer suites passed across PHP 8.2-8.5 as linked above.

Repo-native reproduction, from php-transformer after installing Composer dependencies:

php tests/contract/wordpress-site-plan.php
php tests/unit/text-leaf-element-converter.php
composer test
php tests/parity/run.php

AI Assistance

Implemented and reviewed with AI assistance through OpenCode, coordinated by GPT-6 Astra under Chris Huber's direction. Delegated agents handled implementation and independent review; the coordinator reviewed the diff and required fresh baseline/candidate evidence before publication.

@chubes4
chubes4 marked this pull request as ready for review September 10, 2026 17:29
@chubes4
chubes4 merged commit 48d72b7 into trunk Sep 10, 2026
10 checks passed
@chubes4
chubes4 deleted the refactor/1360-pre-report-plan branch September 10, 2026 17:50
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.

1 participant