Skip to content

feat(decisioning): BrandRights + ContentStandards + Property/CollectionLists (breadth sprint Batch 4 — FINAL)#335

Merged
bokelley merged 1 commit intomainfrom
bokelley/decisioning-brand-lists-protocols
May 1, 2026
Merged

feat(decisioning): BrandRights + ContentStandards + Property/CollectionLists (breadth sprint Batch 4 — FINAL)#335
bokelley merged 1 commit intomainfrom
bokelley/decisioning-brand-lists-protocols

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

@bokelley bokelley commented May 1, 2026

Summary

Breadth sprint COMPLETE. Final batch ports the remaining four specialism Protocols. With this PR, every spec specialism slug except `governance-aware-seller` (a SELLER composition claim by design) and `signed-requests` (deprecated, moved to universal storyboards) has a Protocol class + REQUIRED_METHODS coverage.

New:

  • `BrandRightsPlatform` — `brand-rights` slug. `get_brand_identity`, `get_rights`, `acquire_rights` (3-arm discriminated union: acquired/pending/rejected — rejection-as-data for GRANT rejection, AdcpError for REQUEST rejection).
  • `ContentStandardsPlatform` — `content-standards` slug. 6 required CRUD + calibration + delivery validation. 2 optional analyzer reads.
  • `PropertyListsPlatform` + `CollectionListsPlatform` — `property-lists` and `collection-lists`. Parallel 5-method CRUD with fetch-token issuance + revocation semantics.
  • REQUIRED_METHODS entries for all four slugs.
  • Public exports in `adcp.decisioning.all`.

Tests (13 new, 43 total in file):

  • runtime_checkable conformance per Protocol.
  • validate_platform enforcement per slug — including a security-relevant test that `property-lists` REQUIRES `delete_property_list` (revocation path).
  • Contract pins per slug.
  • Breadth-sprint completeness pin: asserts `SPEC_SPECIALISM_ENUM - REQUIRED_METHODS.keys()` yields exactly `{governance-aware-seller, signed-requests}` — the only two slugs unenforced by design.

One existing dispatch test updated: canonical "spec-recognized but unenforced" example switched from `brand-rights` (now enforced) to `governance-aware-seller`.

Held release pile (9 PRs total → 4.4.0)

After this lands, the breadth sprint is DONE. Ready to ping salesagent for validation against editable install before tagging 4.4.0.

Test plan

  • `pytest tests/test_decisioning_specialisms.py` — 43 passed
  • `pytest tests/` — 2252 passed (up from 2239)
  • `mypy src/adcp/decisioning/` clean across 22 source files
  • Pre-commit gates pass

🤖 Generated with Claude Code

…ionLists Protocols (breadth sprint Batch 4 — FINAL)

Final batch of the breadth-sprint per the parity audit. Ports the
remaining four specialism Protocols from JS reference. With this
PR, every spec specialism slug except ``governance-aware-seller``
has a Protocol class + REQUIRED_METHODS coverage.

New Protocols:

* ``BrandRightsPlatform`` — covers ``brand-rights``. Identity
  discovery + licensing. Required (3, sync): ``get_brand_identity``,
  ``get_rights``, ``acquire_rights``. ``acquire_rights`` returns a
  3-arm discriminated success union (acquired / pending / rejected)
  — rejection-as-data for spec-defined GRANT rejection, AdcpError
  only for buyer-fixable REQUEST rejection. Async outcomes for the
  ``pending`` arm flow via ``push_notification_config`` webhook
  (NOT a polling tool).

* ``ContentStandardsPlatform`` — covers ``content-standards``.
  Brand safety policies, content adjacency rules, per-creative
  compliance verification. Required (6): list/get/create/update,
  ``calibrate_content``, ``validate_content_delivery``. Optional
  (2, analyzer reads): ``get_media_buy_artifacts``,
  ``get_creative_features``.

* ``PropertyListsPlatform`` + ``CollectionListsPlatform``
  (specialisms/lists.py) — covers ``property-lists`` and
  ``collection-lists``. Parallel CRUD shapes (5 methods each, all
  required) with token-issuance semantics: ``create_*`` returns a
  per-seller-scoped ``fetch_token``, ``delete_*`` revokes it.
  Compromise-driven revocation MUST trigger the delete path.

Required-method coverage in ``REQUIRED_METHODS_PER_SPECIALISM``:
``brand-rights`` (3), ``content-standards`` (6),
``property-lists`` (5), ``collection-lists`` (5).

Public re-exports added at ``adcp.decisioning.__all__``:
``BrandRightsPlatform``, ``ContentStandardsPlatform``,
``PropertyListsPlatform``, ``CollectionListsPlatform``.

Test coverage in ``tests/test_decisioning_specialisms.py`` (13 new
tests, 43 total in the file):

* ``runtime_checkable`` conformance per Protocol.
* ``validate_platform`` enforcement per slug — including a
  security-relevant test that ``property-lists`` REQUIRES
  ``delete_property_list`` (revocation path) so adopters can't ship
  list-publishing without revocation primitives.
* Contract pins per slug.
* **Breadth-sprint completeness pin**:
  ``test_every_spec_slug_except_governance_aware_seller_is_enforced``
  asserts that ``SPEC_SPECIALISM_ENUM - REQUIRED_METHODS.keys()``
  yields exactly ``{governance-aware-seller, signed-requests}`` —
  the two slugs unenforced by design (composition claim and
  deprecated-moved-to-universal respectively).

One existing dispatch test updated:
``test_validate_platform_warns_on_unenforced_spec_specialism``
swapped its canonical "spec-recognized but unenforced" example
from ``brand-rights`` (now enforced) to ``governance-aware-seller``
(the only remaining unenforced spec slug — by design).

**Breadth sprint COMPLETE.** All 8 missing specialism Protocols
from the parity audit are now ported. 9 PRs total accumulating in
the held release PR #328:

* #316 foundation
* #329 codemod ergonomics
* #330 parity rename + Tier 1 docs
* #331 F12 auto-emit
* #332 Signals + Audience (Batch 1)
* #333 Creative Builder + AdServer (Batch 2)
* #334 Campaign Governance (Batch 3)
* #335 Brand + Content + Lists (Batch 4 — this PR)

Ready for salesagent validation against editable install before
tagging 4.4.0.

2252 tests pass (up from 2239).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bokelley bokelley merged commit aeb2543 into main May 1, 2026
12 checks passed
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