VOOZH about

URL: https://dev.to/nivandosoares/callback-trace-contracts-for-the-td2-compare-lane-4po5

⇱ Callback trace contracts for the TD2 compare lane - DEV Community


Callback trace contracts in the TD2 compare lane

The latest TD2 port checkpoint promotes the first callback-backed compare fixture on top of the existing pixel and PPU-state checks.

What changed

  • Added td2_contracts.* to resolve callback_state_contracts.jsonc from the scene path and load validated intro checkpoints by frame.
  • The runtime now seeds a bootstrap callback/state shadow for covered frames.
  • Compare bundles now emit callback_contract next to state_contract.
  • frame_01093 is promoted as the first callback-backed fixture in the default smoke.

Why this matters

This closes the representation gap between archaeology outputs and the SDL runtime. The port can now carry validated callback/state checkpoints in-band with visual compare output instead of treating them as a separate offline report.

Validation

  • make -C port test
  • frame300_compare: exact pixels, exact PPU-state parity, no callback contract expected
  • frame1086_compare: exact pixels, exact PPU-state parity, no callback contract expected
  • frame1093_compare: exact pixels, exact PPU-state parity, and 8 callback checks loaded from the validated 01:9FE5 contract with 0 failures

Next gate

The next step is replacing the seeded callback shadow with real callback/state execution for the front-end family and expanding callback-backed fixtures beyond frame 1093.