Skip to content

fix(examples): stop zero-filling impressions and flat multi-standard viewability in the reference seller - #1709

Merged
bokelley merged 1 commit into
nextfrom
claude/issue-1669-reference-seller-delivery
Oct 29, 2026
Merged

bokelley merged 1 commit into
nextfrom
claude/issue-1669-reference-seller-delivery

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Part of #1669, alongside #1707: the reference seller (examples/seller_agent.py) gaps that #1707's audit found.

AdCP 3.3 rules (migration guide §Delivery rows may omit impressions, §Multi-qualifier metrics omit flat totals):

  • Impressions: absent means not measured, never zero. Totals now carry impressions only when a delivery measured them; package rows already followed the totals.
  • Rates: never derive an impression-denominated rate without a count. viewable_rate is omitted when nothing was measurable, where it used to be 0.
  • Multiple standards: a metric reported under more than one qualifier omits its flat carrier from buy totals. The flat viewability block is omitted when deliveries used more than one standard.
  • Callers below 3.3: a dimensional row with no impression count is omitted, not sent with impressions: 0. by_format rows without impressions are dropped for those callers.

Totals and by_package don't require impressions in 3.2 either, so they stay valid for 3.2 callers. Storyboard deliveries always inject impressions, so their responses are unchanged.

Tests: three new cases in tests/test_seller_agent_storyboard.py. That file and test_seller_agent_dual_emit.py: 43 passed.

Refs #1669

🤖 Generated with Claude Code

…viewability in the reference seller

The reference seller's delivery totals reported impressions as 0 when no
delivery measured them, set viewable_rate to 0 with nothing measurable,
and combined viewability reported under different standards into one flat
total. AdCP 3.3 forbids all three: an absent count means not measured,
receivers never derive an impression rate from it, and a metric reported
under more than one qualifier omits its flat carrier from buy totals.

Totals now carry impressions only when a delivery measured them, omit
viewable_rate without measurable impressions, and omit the flat
viewability block when deliveries used more than one standard. Toward
callers served below 3.3, format breakdown rows without impressions are
omitted rather than sent with a zero.

Refs #1669

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

@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, well-scoped fix to the reference seller example plus tests (2 files, +77/-4). The reviewer traced all three AdCP 3.3 behaviors (impressions omitted when unmeasured, viewable_rate dropped when measurable == 0, flat viewability block gated on a single standard) and confirmed _serves_impressionless_rows parses version robustly (3.3-beta.1 keep, 3.2 drop, None/malformed fail-open). The DR-0032/0033 droppable pathway for pre-3.3 callers is tested.

No critical/high/medium findings. Not a gated path, high_risk is false, no author team gate, no prior decision. None of rows 1–8 fire, so this falls through to row 9 = approve.

@bokelley
bokelley merged commit a63836f into next Oct 29, 2026
37 checks passed
@bokelley
bokelley deleted the claude/issue-1669-reference-seller-delivery branch October 29, 2026 22:05
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