Skip to content

Enforce canonical php-transformer result contracts#37

Merged
chubes4 merged 1 commit into
trunkfrom
cook/php-transformer-canonical-contract-enforcement
Jun 21, 2026
Merged

Enforce canonical php-transformer result contracts#37
chubes4 merged 1 commit into
trunkfrom
cook/php-transformer-canonical-contract-enforcement

Conversation

@chubes4

@chubes4 chubes4 commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Remove legacy_mapping from the canonical php-transformer result envelope.
  • Add TransformerResult::assertCanonicalEnvelope() so downstream wrappers can require the canonical source_reports.conversion_report contract and artifact source_reports.materialization_plan contract.
  • Make FormatBridge success and failure results emit canonical source_reports.conversion_report metadata.
  • Add contract coverage rejecting legacy aliases and missing canonical reports/plans.

Verification

  • composer validate from php-transformer/
  • composer test from php-transformer/
  • git diff --check

Downstream impact

  • Wrappers can fail fast on non-canonical result envelopes instead of accepting BAC/BFB/H2BC-shaped aliases.
  • Artifact consumers can require source_reports.materialization_plan as the stable materialization contract.
  • Compatibility-only legacy projection remains downstream-owned rather than part of Blocks Engine's main result path.

AI assistance

  • AI assistance: Yes
  • Tool(s): openai/gpt-5.5 via OpenCode
  • Used for: Implementing canonical result contract enforcement, updating tests, and running verification.

@chubes4 chubes4 merged commit 6068464 into trunk Jun 21, 2026
1 check passed
@chubes4 chubes4 deleted the cook/php-transformer-canonical-contract-enforcement branch June 21, 2026 16:42
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