Produce block validity outcomes before report projection - #1635
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
Continue #1360 after #1630: produce block-validity facts before projecting the full report.
BlockValidityValidator::evaluateBlocks()produces structural evaluation facts directly; its existingvalidateBlocks()API remains a report facade.BlockValidityEvaluation::fromBlocks()adds canonical save-shape findings after structural findings, preserving counts, checked types and order.Runtime::evaluateBlockSerialization()retains string parsing and the existing parse-failure behavior.validateBlockSerialization(string|array): arrayremains compatible.HtmlCompilationconsumes authoritative status/findings directly and projects the full report from the same evaluation.HtmlValidationOutcomeaccepts plain facts, without importing the WordPress implementation class or retaining obsolete report-derived factories.No validator, reporting mode, acceptance rule, serialization schema or block behavior changes. Full reports remain the default; this is an ownership simplification, not a performance claim.
Verification
Baseline:
058663f24bb7a5a99342d87ac738ae8f07357e7a.Candidate:
c13b10ff8712c6fa99e9578ba953ba07be6880fe.All ten final checks passed: PHP 8.2-8.5 package and WordPress integration suites, plus generic visual parity tools, and solved-site promotion.
transform_duration_ms.90114975f9df227372f7650f78e00b3652e05092aa6e09aad33d25546cfc0f59.Reproduce
From
php-transformerwith dependencies installed and sufficient PHP memory inherited by child processes:composer test REQUIRE_WP_TESTS=1 WP_TESTS_DIR=/path/to/wordpress-tests composer test:wordpress-integrationThe full-corpus comparison command in #1627 applies unchanged to the baseline/candidate above with matching dependencies. Consumer ownership is documented in
php-transformer/docs/html-validation-outcome-consumer-inventory.md.AI Assistance
OpenAI GPT-5.6 Terra via direct OpenCode implemented and lab-tested the change and review corrections. GPT-6 Astra via OpenCode coordinated and reviewed Runtime sequencing, required the structural producer to stop reconstructing facts from report maps, kept the contract independent of the WordPress implementation layer, independently reran final full-corpus/artifact comparisons and prepared this PR under Chris Huber's direction. No release or deployment was performed.