fix(snapshot): revalidate Apple runner payloads with the producer's fold policy

Merged
TH
10d ago
+749-75

Summary

Fixes the tvOS snapshot refusal and missing tile focus in #4654. Host validation uses the runner’s plain-viewport fold. On the tvOS regular tree route, Swift retains the reported focus bit on the parent tile when it collapses a same-identity child wrapper into that parent. The fixture uses synthetic identifiers. This PR touches 18 files. Refusal index provenance is tracked in #4701.

Validation

  • Live tvOS 27.2 report for b2dff79348ca989ab7a00a6ebb18ec9356d119a3. The control was npm 0.21.39. Both regular modes succeeded on that candidate. Raw followed focus. Both regular modes omitted it.
  • An anonymized routed fixture failed at the Swift regular output with the old duplicate handling. On a5eda40287a66bdb95e66d3251ac84aed1ea738d, it passes three focus positions through Swift, host presentation, and ref publication. The differential suite, XCTest selection, and generic tvOS Simulator runner build passed.
  • pnpm check:affected --run --head a5eda40287a66bdb95e66d3251ac84aed1ea738d passed with exactCommit: true (receipt run-SlV1gH). GitHub owns the skipped CI checks.

Live tvOS retest

The reporter built the CLI and runner at a5eda40287a66bdb95e66d3251ac84aed1ea738d and tested on an Apple TV 4K (3rd generation) Simulator, tvOS 27.2, with fresh state and runner paths. Nine captures and two right presses succeeded. Both regular modes reported exactly one focused, hittable tile per position, matching the raw capture at each stop.

Positionsnapshot indexsnapshot -i indexRaw indexTile x
Start1092496
After right121141441.5
After right again141358787

The regular views preserve focus on the surviving outer wrapper. The report includes the anonymized node excerpts. Live evidence


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.