Title: feat(decisioning): property_list resolver + intersection helper for get_products · Issue #494 · adcontextprotocol/adcp-client-python · GitHub
Open Graph Title: feat(decisioning): property_list resolver + intersection helper for get_products · Issue #494 · adcontextprotocol/adcp-client-python
X Title: feat(decisioning): property_list resolver + intersection helper for get_products · Issue #494 · adcontextprotocol/adcp-client-python
Description: Motivation GetProductsRequest.property_list is {agent_url, list_id, auth_token?} — a reference to an externally-managed list of properties the buyer has been authorized to spend on. The seller is expected to fetch the list from the buyer...
Open Graph Description: Motivation GetProductsRequest.property_list is {agent_url, list_id, auth_token?} — a reference to an externally-managed list of properties the buyer has been authorized to spend on. The seller is e...
X Description: Motivation GetProductsRequest.property_list is {agent_url, list_id, auth_token?} — a reference to an externally-managed list of properties the buyer has been authorized to spend on. The seller is e...
Opengraph URL: https://github.com/adcontextprotocol/adcp-client-python/issues/494
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feat(decisioning): property_list resolver + intersection helper for get_products","articleBody":"## Motivation\n\n`GetProductsRequest.property_list` is `{agent_url, list_id, auth_token?}` — a reference to an externally-managed list of properties the buyer has been authorized to spend on. The seller is expected to fetch the list from the buyer's agent, intersect against each product's `publisher_properties`, and set `property_list_applied: true` in the response.\n\nThis is **directly capability-gated already**: `RequiredFeatures.property_list_filtering` (`src/adcp/types/generated_poc/core/media_buy_features.py:18`) exists on both buyer-side filter and seller capabilities response. Every adopter that wants to claim this capability writes the same fetch + intersect + flag-echo code. Salesagent already has it inline; the helper should live in the SDK.\n\nParent tracker: #491.\n\n## Current state\n\n**Salesagent** has the canonical implementation inline:\n- `src/core/tools/products.py:65-91` — `extract_product_property_ids` (reads `selection_type` `all`/`by_id`/`by_tag`)\n- `src/core/tools/products.py:94-126` — `should_include_product_for_property_list` (handles `property_targeting_allowed` permissive vs strict mode)\n- `src/core/tools/products.py:129-142` — `filter_products_by_property_list`\n- `src/core/tools/products.py:404-424` — invocation site (calls `resolve_property_list` from `src/core/property_list_resolver.py:42`, then filters, sets the flag *implicitly* via the wire schema's `property_list_applied`)\n\n**SDK**: nothing. `MediaBuyHandler.get_products` (`src/adcp/decisioning/handler.py:1015-1033`) doesn't touch `property_list`. The capability `RequiredFeatures.property_list_filtering` is wire-defined but the framework doesn't gate on it.\n\n## Proposed API\n\nCapability-gated, framework intercepts post-adapter (mirrors auto-emit pattern):\n\n```python\n# src/adcp/decisioning/property_list.py (new)\n\nasync def resolve_property_list(\n ref: PropertyList,\n *,\n fetcher: PropertyListFetcher,\n) -> set[str]:\n \\\"\\\"\\\"Fetch the list from `ref.agent_url` and return the set of allowed\n property_ids. Adopter supplies a `PropertyListFetcher` to plug in\n their HTTP client / auth.\\\"\\\"\\\"\n\ndef filter_products_by_property_list(\n products: list[Product],\n allowed_property_ids: set[str],\n) -> list[Product]:\n \\\"\\\"\\\"Mirrors salesagent's logic: respects publisher_properties.selection_type\n ('all' = always include, 'by_id' = intersect, 'by_tag' = exclude),\n and respects product.property_targeting_allowed (False = strict subset\n required, True = any intersection suffices).\\\"\\\"\\\"\n```\n\nCapability declaration on `DecisioningCapabilities`:\n\n```python\ncaps = DecisioningCapabilities(\n media_buy=MediaBuy(\n execution=Execution(\n features=Features(property_list_filtering=True),\n ),\n ),\n)\n# When True, framework runs filter post-adapter and sets\n# response.property_list_applied = True. When False, framework\n# leaves request.property_list untouched and the adopter handles it\n# (or ignores it).\n```\n\n## Acceptance criteria\n\n- [ ] `filter_products_by_property_list` matches salesagent's three-mode logic (all / strict / permissive) — port the salesagent test suite\n- [ ] Framework runs the filter only when capability is declared AND `req.property_list` is present\n- [ ] Sets `response.property_list_applied = True` when filter applied\n- [ ] Adopter-supplied `PropertyListFetcher` protocol (no hidden HTTP client)\n- [ ] Fetch failures surface as `AdcpError` with `recovery='transient'`, mirroring salesagent's behavior\n- [ ] `validate_platform` warns when `property_list_filtering=True` is declared but no fetcher is wired\n- [ ] Test: product with `selection_type='all'` always passes\n- [ ] Test: product with `property_targeting_allowed=False` requires full subset\n- [ ] Test: `auth_token` threaded through to the fetcher\n\n## Out of scope\n\n- The `list_property_lists` / `create_property_list` task family (already wired in handler at lines 1814-1909)\n- Caching the fetched list across requests (out of scope for v1; framework calls fetcher every time)\n- Seller-side property-list publishing (separate from the buyer-supplied filter)\n\n## Cross-references\n\n- Wire capability: `src/adcp/types/generated_poc/core/media_buy_features.py:18` (`property_list_filtering`)\n- Wire request shape: `src/adcp/types/generated_poc/bundled/media_buy/get_products_request.py:1178-1191` (`PropertyList`)\n- Wire response flag: `src/adcp/types/generated_poc/bundled/media_buy/get_products_response.py:4538-4543` (`property_list_applied`)\n- Salesagent helpers (port these): `src/core/tools/products.py:65-142`\n- Salesagent fetcher: `src/core/property_list_resolver.py`\n- Reference pattern: `src/adcp/decisioning/webhook_emit.py`\n- Parent tracker: #491\n- Migration guide: #489","author":{"url":"https://github.com/bokelley","@type":"Person","name":"bokelley"},"datePublished":"2026-05-03T21:06:58Z","url":"https://github.com/adcontextprotocol/adcp-client-python/issues/494"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:bb726858-9021-cf57-0923-e4ef1a02a3ac |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 881E:2D2F2F:F6C21C:13E617C:6B00FF02 |
| html-safe-nonce | 65426a909286d4986fd81d71f80e6874b7a9e3fa8fd2629bb6024aa08441b6ab |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4ODFFOjJEMkYyRjpGNkMyMUM6MTNFNjE3Qzo2QjAwRkYwMiIsInZpc2l0b3JfaWQiOiI2NDUwMjg5ODc5NTg1NzE4MDE4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | be9a3d5f741000d8f39d676112c78277e852fe7d40e35b6078ba6d28ff762e40 |
| hovercard-subject-tag | issue:4372987403 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/adcontextprotocol/adcp-client-python/494/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f1dc0b01fa34fa880296acdb2281ee66d87a15c0207bff5462b9a2d21d311ac2/adcontextprotocol/adcp-client-python/issues/494 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f1dc0b01fa34fa880296acdb2281ee66d87a15c0207bff5462b9a2d21d311ac2/adcontextprotocol/adcp-client-python/issues/494 |
| og:image:alt | Motivation GetProductsRequest.property_list is {agent_url, list_id, auth_token?} — a reference to an externally-managed list of properties the buyer has been authorized to spend on. The seller is e... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | bokelley |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| turbo-cache-control | no-preview |
| go-import | github.com/adcontextprotocol/adcp-client-python git https://github.com/adcontextprotocol/adcp-client-python.git |
| octolytics-dimension-user_id | 221690821 |
| octolytics-dimension-user_login | adcontextprotocol |
| octolytics-dimension-repository_id | 1090305973 |
| octolytics-dimension-repository_nwo | adcontextprotocol/adcp-client-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1090305973 |
| octolytics-dimension-repository_network_root_nwo | adcontextprotocol/adcp-client-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width