Skip to content

fix(canonical-formats)!: drop playback trackers on the v1 downgrade instead of firing them as impressions - #1655

Merged
bokelley merged 1 commit into
nextfrom
claude/issue-1643-pixel-playback-downgrade
Oct 27, 2026
Merged

bokelley merged 1 commit into
nextfrom
claude/issue-1643-pixel-playback-downgrade

Conversation

@bokelley

@bokelley bokelley commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The regen-independent part of #1643.

AdCP 3.3 adds the pixel_tracker playback events start, first_quartile, midpoint, third_quartile and complete. Buyers send them to 3.2 sellers as event: custom with custom_event_name set to the 3.3 value. The 3.2 to 3.3 migration guide (§Hosted video and audio playback trackers) says an SDK that downgrades to the 3.0 v1 tracker_pixel shape drops these trackers, including the interim custom form, emits PIXEL_TRACKER_LOSSY_DOWNGRADE, and never emits them as impression_tracker.

downgrade_pixel_tracker mapped every custom event to impression_tracker, which is exactly the miscount the guide forbids.

  • Playback events, in either form, now return PixelTrackerDowngrade(v1=None, advisory=PIXEL_TRACKER_LOSSY_DOWNGRADE) with details.lost == ["tracker"].
  • downgrade_pixel_trackers leaves dropped trackers out of items.
  • The check compares wire strings, so it works before the 3.3 enum values are generated.
  • Other custom events keep the impression slot, as before.

Breaking: PixelTrackerDowngrade.v1 is now V1UrlTracker | None. This follows the upgrade side's existing pixel_tracker: ... | None. Creates MIGRATION_v9_to_v10.md with the note.

Left on #1643 for after the 3.3 regeneration

The 3.3 → 3.2 projection rewrites playback events to the custom interim form, which the SDK MAY do, instead of dropping them.

Test plan

  • tests/test_canonical_formats_pixel_tracker.py: 42 passed, including new cases for all five interim names, the 3.3 wire value, other custom events and the batch.
  • ruff and mypy clean.

Refs #1643 · Tracking #1648

BREAKING CHANGE: PixelTrackerDowngrade.v1 is now V1UrlTracker or None; AdCP 3.3 playback trackers are dropped on the v1 downgrade. See MIGRATION_v9_to_v10.md.

🤖 Generated with Claude Code

…nstead of firing them as impressions

AdCP 3.3 adds the pixel_tracker playback events start, first_quartile,
midpoint, third_quartile and complete. Buyers send them to 3.2 sellers as
event custom with custom_event_name set to the 3.3 value. The migration
guide requires an SDK that downgrades pixel_tracker to the 3.0 v1
tracker_pixel shape to drop these trackers, including that interim form,
and never to emit them as impression_tracker: a quartile URL fired at
impression time counts every impression as a quartile view.

downgrade_pixel_tracker put every custom event in the impression slot.
It now returns v1=None with a PIXEL_TRACKER_LOSSY_DOWNGRADE advisory for
playback events in either form, and downgrade_pixel_trackers leaves them
out of items. The check compares wire strings, so it holds before the
3.3 enum values are generated.

BREAKING CHANGE: PixelTrackerDowngrade.v1 is now V1UrlTracker or None.
Check it before reading asset_id or url. See MIGRATION_v9_to_v10.md.

Refs #1643

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Approve

Approve — clean, tightly-scoped fix with no blocking or medium findings.

Checked:

  • downgrade_pixel_tracker now drops AdCP 3.3 playback events (start, first_quartile, midpoint, third_quartile, complete) and their 3.2 interim custom/custom_event_name form, returning v1=None with a PIXEL_TRACKER_LOSSY_DOWNGRADE advisory instead of firing them in the impression slot — avoiding the quartile-at-impression miscount the migration guide forbids.
  • The V1UrlTracker | None widening is a genuine break on the public PixelTrackerDowngrade export and is correctly signaled per the semver rule: fix(canonical-formats)!: + BREAKING CHANGE: footer + MIGRATION_v9_to_v10.md migration note. No non-breaking-prefix-on-breaking-diff issue.
  • Wire-string comparison (pixel_tracker.py:65, 72-73) bridges the ungenerated 3.3 enum; the sole internal .v1 consumer is guarded (L120); batch dedup collision-free.
  • Local gates green: 42 tests pass, ruff/mypy clean. No generated-code hand-edits, no import-layering violations, no credential-in-metadata concerns.

Gates: high_risk false; gated_paths false; no no-auto-approve team match; no prior decision. No rows 1–8 fire → row 9 approve.

@bokelley bokelley closed this Oct 27, 2026
@bokelley bokelley reopened this Oct 27, 2026
@bokelley
bokelley merged commit 2ffa538 into next Oct 27, 2026
114 of 116 checks passed
@bokelley
bokelley deleted the claude/issue-1643-pixel-playback-downgrade branch October 27, 2026 03:55
bokelley added a commit that referenced this pull request Nov 2, 2026
…m for 3.2 peers (#1643) (#1800)

AdCP 3.3 adds start, first_quartile, midpoint, third_quartile and complete
to the pixel_tracker event enum. event is required, so the 3.3 -> 3.2
conversion could not drop the value and refused the whole payload with
ADCPVersionConversionError. The 3.3 migration guide lets an SDK send these
to 3.2 peers as event: custom with custom_event_name set to the 3.3 value.

convert_payload now does that rewrite on any step whose target event enum
lacks the value and has custom, for buyer requests and seller responses
alike, recording a playback_event_as_custom loss on the event pointer.
Upgrades leave the custom form as sent, since 3.3 tracker execution
selectors match it, not the 3.3 event.

The 3.0 tracker_pixel downgrade (#1655) already drops these trackers and
their custom interim form; the new tests cover every event under img and
js and check that no impression_tracker slot is filled from one.

Co-authored-by: Claude Opus 5.5 <[email protected]>
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