Repository navigation
fix(canonical-formats)!: drop playback trackers on the v1 downgrade instead of firing them as impressions - #1655
Merged
Conversation
…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]>
This was referenced Oct 27, 2026
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — clean, tightly-scoped fix with no blocking or medium findings.
Checked:
downgrade_pixel_trackernow drops AdCP 3.3 playback events (start,first_quartile,midpoint,third_quartile,complete) and their 3.2 interimcustom/custom_event_nameform, returningv1=Nonewith aPIXEL_TRACKER_LOSSY_DOWNGRADEadvisory instead of firing them in the impression slot — avoiding the quartile-at-impression miscount the migration guide forbids.- The
V1UrlTracker | Nonewidening is a genuine break on the publicPixelTrackerDowngradeexport and is correctly signaled per the semver rule:fix(canonical-formats)!:+BREAKING CHANGE:footer +MIGRATION_v9_to_v10.mdmigration 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
.v1consumer 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.
This was referenced Oct 27, 2026
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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The regen-independent part of #1643.
AdCP 3.3 adds the
pixel_trackerplayback eventsstart,first_quartile,midpoint,third_quartileandcomplete. Buyers send them to 3.2 sellers asevent: customwithcustom_event_nameset 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 v1tracker_pixelshape drops these trackers, including the interimcustomform, emitsPIXEL_TRACKER_LOSSY_DOWNGRADE, and never emits them asimpression_tracker.downgrade_pixel_trackermapped everycustomevent toimpression_tracker, which is exactly the miscount the guide forbids.PixelTrackerDowngrade(v1=None, advisory=PIXEL_TRACKER_LOSSY_DOWNGRADE)withdetails.lost == ["tracker"].downgrade_pixel_trackersleaves dropped trackers out ofitems.customevents keep the impression slot, as before.Breaking:
PixelTrackerDowngrade.v1is nowV1UrlTracker | None. This follows the upgrade side's existingpixel_tracker: ... | None. CreatesMIGRATION_v9_to_v10.mdwith the note.Left on #1643 for after the 3.3 regeneration
The 3.3 → 3.2 projection rewrites playback events to the
custominterim 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.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