Parent: #1076
Problem
transformScenegraph(), transformResponsivePage(), and transformNormalizedScenegraphPage() separately attach mismatch reports, merge diagnostics, build parity data, construct source reports, calculate overlapping metrics, and create FigmaTransformResult envelopes. This makes output-contract changes easy to apply inconsistently.
Scope
- Introduce one result-finalization path for normalized artifacts.
- Keep normalization and page-selection differences in their existing branch-specific code.
- Centralize mismatch report attachment, diagnostics, parity, source-report construction, and common metrics.
Acceptance criteria
composer test passes.
- Public result schemas and status behavior remain unchanged.
- Single-page, responsive, and pre-normalized page paths retain their current metrics and source-report fields.
- Layout and render-style mismatch evidence remains attached identically.
- No backward-compatibility wrapper or duplicate finalizer remains.
AI assistance
OpenAI gpt-5.6-sol via OpenCode identified the duplicated finalization paths and drafted this issue. Chris Huber is responsible for the scope and final changes.
Parent: #1076
Problem
transformScenegraph(),transformResponsivePage(), andtransformNormalizedScenegraphPage()separately attach mismatch reports, merge diagnostics, build parity data, construct source reports, calculate overlapping metrics, and createFigmaTransformResultenvelopes. This makes output-contract changes easy to apply inconsistently.Scope
Acceptance criteria
composer testpasses.AI assistance
OpenAI
gpt-5.6-solvia OpenCode identified the duplicated finalization paths and drafted this issue. Chris Huber is responsible for the scope and final changes.