refactor(php-transformer): expose compact site plan result projection - #1671
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Continues #1360. Add TransformerResult::toCompactWordPressSitePlanView() to own the existing v1 projection plus v2 compaction sequence. SSI direct-artifact and URL-batch composition currently repeat that sequence.
The API lives on the result rather than ArtifactCompiler: callers retain the same composed result and its terminal-work metrics. Composition, validation, compact schema, and existing public methods are unchanged.
Verification
All ten checks passed on
1591a37abfd89e1c7975448841295339d4335f1d: Composer tests and WordPress integration across PHP 8.2-8.5, plus visual parity tools, and solved-site promotion.Run from php-transformer after installing dependencies. All passed; parity covers 307 fixtures. Contracts assert exact old/new compact-view equality for ordinary and reference-backed staged receipts, zero terminal payload reads, and retained zero-transform/normalization metrics on the same result.
SSI adoption follows the producer release; its direct-import checkpoint PR overlaps the consumer site and must be coordinated. No release or deployment included.
AI Assistance
OpenCode GPT-6 Astra coordinated implementation, review, and verification under Chris Huber direction. Independent review identified the terminal-metrics requirement; the final API preserves the result object rather than returning only a compact view from composition.