René's URL Explorer Experiment


Title: feat(decisioning): refine[] flow scaffold for get_products (position-matched echo) · Issue #496 · adcontextprotocol/adcp-client-python · GitHub

Open Graph Title: feat(decisioning): refine[] flow scaffold for get_products (position-matched echo) · Issue #496 · adcontextprotocol/adcp-client-python

X Title: feat(decisioning): refine[] flow scaffold for get_products (position-matched echo) · Issue #496 · adcontextprotocol/adcp-client-python

Description: Motivation GetProductsRequest.refine[] is a discriminated-union list (scope: request | product | proposal) used when buying_mode='refine' to iterate on a previous response. The seller MUST return refinement_applied[] in the response, sam...

Open Graph Description: Motivation GetProductsRequest.refine[] is a discriminated-union list (scope: request | product | proposal) used when buying_mode='refine' to iterate on a previous response. The seller MUST return r...

X Description: Motivation GetProductsRequest.refine[] is a discriminated-union list (scope: request | product | proposal) used when buying_mode='refine' to iterate on a previous response. The seller MUST ...

Opengraph URL: https://github.com/adcontextprotocol/adcp-client-python/issues/496

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feat(decisioning): refine[] flow scaffold for get_products (position-matched echo)","articleBody":"## Motivation\n\n`GetProductsRequest.refine[]` is a discriminated-union list (scope: `request` | `product` | `proposal`) used when `buying_mode='refine'` to iterate on a previous response. The seller MUST return `refinement_applied[]` in the response, **same length, same order, echoing scope and the matching id field** (per the wire description). That echo contract is mechanical — adopters that get it wrong silently break orchestrators that cross-validate alignment.\n\nThe framework can scaffold the position-matched echo, validate the request, and call the adopter once per refine entry with a typed handler. The narrowing logic itself is adopter business logic, but every other piece is protocol plumbing.\n\nParent tracker: #491.\n\n## Current state\n\n**Salesagent**: does not implement `refine`. Grep of `src/core/tools/products.py` shows zero references to `refine` or `buying_mode`. A buyer sending `buying_mode='refine'` to salesagent today gets undefined behavior.\n\n**SDK**: `MediaBuyHandler.get_products` (`src/adcp/decisioning/handler.py:1015-1033`) is a pass-through; nothing validates the refine shape or builds `refinement_applied[]`. Wire shapes:\n- Request: `src/adcp/types/generated_poc/bundled/media_buy/get_products_request.py:21-107` (`Refine` / `Refine6` / `Refine7` / discriminated `Refine4`)\n- Request mode: `src/adcp/types/generated_poc/bundled/media_buy/get_products_request.py:15-18` (`BuyingMode.refine`)\n- Response: lines 4550-4554 of `get_products_response.py` (`refinement_applied`)\n\n## Proposed API\n\nAdopter-facing protocol the framework calls per refine entry; framework handles everything else (validation, position alignment, `refinement_applied[]` construction, `buying_mode` cross-validation):\n\n```python\n# src/adcp/decisioning/specialisms/sales.py — extend SalesPlatform\n\nclass SalesPlatform(Protocol):\n    ...\n    async def refine_get_products(\n        self,\n        previous_response_state: GetProductsResponseState,  # opaque, framework-managed\n        refines: list[Refine4],\n        ctx: RequestContext,\n    ) -> RefineResult:\n        \\\"\\\"\\\"Optional. When buying_mode='refine', framework calls this\n        instead of get_products. Adopter applies the narrowing logic per\n        refine entry; framework projects to the wire response with\n        position-matched refinement_applied[].\\\"\\\"\\\"\n\n\n# Adopter returns a typed shape that mirrors per-entry decisions:\n@dataclass\nclass RefineResult:\n    products: list[Product]\n    proposals: list[Proposal] | None\n    per_refine_outcome: list[RefinementOutcome]  # exactly len(refines)\n\n@dataclass\nclass RefinementOutcome:\n    status: Literal['applied', 'partial', 'unable']\n    note: str | None\n    # framework infers scope + product_id/proposal_id from the request entry\n```\n\nThe framework:\n1. Rejects `buying_mode='refine'` when adopter doesn't implement `refine_get_products` (with a clear `AdcpError`).\n2. Validates `len(refinement_outcome) == len(refines)` and raises a developer-facing error if not.\n3. Echoes `scope`, `product_id`, `proposal_id` from request entries by position (adopter doesn't have to remember).\n4. Rejects `buying_mode='refine' + brief` and `buying_mode='wholesale' + brief` per wire spec.\n\n## Acceptance criteria\n\n- [ ] `refine_get_products` is optional on `SalesPlatform`; when absent, `buying_mode='refine'` returns `AdcpError(REFINE_NOT_SUPPORTED)`\n- [ ] Framework constructs `refinement_applied[i]` from `refines[i]` + `per_refine_outcome[i]` — adopter doesn't echo scope/id manually\n- [ ] Framework rejects mismatched lengths with a developer-facing error (not a wire error — this is an adopter bug)\n- [ ] Framework rejects `buying_mode='refine'` + non-empty `brief` per wire spec\n- [ ] Framework rejects `buying_mode='wholesale'` + non-empty `brief` per wire spec\n- [ ] `validate_platform` warns when adopter implements `refine_get_products` but doesn't list `sales-proposal-mode` (or whichever specialism gates refine — confirm via spec)\n- [ ] Test: 3-entry refine, all `applied` → response has 3-entry `refinement_applied`, scope+ids echoed correctly\n- [ ] Test: mixed `applied`/`unable` outcomes\n- [ ] Test: `proposal` scope echoes `proposal_id`\n- [ ] Test: `request` scope (no id) echoes scope only\n\n## Out of scope\n\n- The narrowing logic itself (adopter business logic)\n- Storing previous-response state — framework passes `previous_response_state` opaquely; adopter chooses whether to load anything from it (probably yes via `product_id` lookup, but not framework's job)\n- The `request_proposal` task (separate verb per `SalesPlatform.get_products` docstring at sales.py:115)\n- `action='finalize'` proposal-scoped refines that trigger HITL — that's a `SalesResult` hybrid concern, may need its own follow-up\n\n## Cross-references\n\n- Wire shapes: `src/adcp/types/generated_poc/bundled/media_buy/get_products_request.py:21-107`, `1413-1431`\n- Wire response: `src/adcp/types/generated_poc/bundled/media_buy/get_products_response.py:4550-4554`\n- `SalesPlatform` protocol: `src/adcp/decisioning/specialisms/sales.py:105-119`\n- Parent tracker: #491\n- Migration guide: #489\n\n## Open question (for the implementer)\n\nSpec-side: is `refine_get_products` gated by a specialism, or is it implicit in `sales-*`? If it's implicit, drop the `validate_platform` warning. If gated, name the gate. Check `adcontextprotocol/adcp` schemas before implementing.","author":{"url":"https://github.com/bokelley","@type":"Person","name":"bokelley"},"datePublished":"2026-05-03T21:07:57Z","url":"https://github.com/adcontextprotocol/adcp-client-python/issues/496"}

react-profiling0
react-import-mapreact,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-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:6b4829de-dc32-129b-23d3-953ae9e08c81
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE852:117C62:B8AE2D:F7E532:6B00F6A7
html-safe-noncee77effa2ffb22e97f096100ea9029cd8a24d00efef346e68647a998f8656f9ad
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODUyOjExN0M2MjpCOEFFMkQ6RjdFNTMyOjZCMDBGNkE3IiwidmlzaXRvcl9pZCI6IjYzNjAzNDQ0MDM4ODk5NDQyMzEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac702b7875c117fbf1379c2b780ebccfda368d162361e34c2325b962e50ce552d7
hovercard-subject-tagissue:4372989339
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/adcontextprotocol/adcp-client-python/496/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d6dbfa74077b1dc24edc10eb8ea178f94e0f72c94f454be09f3b21ed2be38e30/adcontextprotocol/adcp-client-python/issues/496
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d6dbfa74077b1dc24edc10eb8ea178f94e0f72c94f454be09f3b21ed2be38e30/adcontextprotocol/adcp-client-python/issues/496
og:image:altMotivation GetProductsRequest.refine[] is a discriminated-union list (scope: request | product | proposal) used when buying_mode='refine' to iterate on a previous response. The seller MUST return r...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamebokelley
hostnamegithub.com
expected-hostnamegithub.com
None4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc
turbo-cache-controlno-preview
go-importgithub.com/adcontextprotocol/adcp-client-python git https://github.com/adcontextprotocol/adcp-client-python.git
octolytics-dimension-user_id221690821
octolytics-dimension-user_loginadcontextprotocol
octolytics-dimension-repository_id1090305973
octolytics-dimension-repository_nwoadcontextprotocol/adcp-client-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1090305973
octolytics-dimension-repository_network_root_nwoadcontextprotocol/adcp-client-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release9983dd5da06943f833c971dd5b6bc988e2858be5
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/adcontextprotocol/adcp-client-python/issues/496#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fadcontextprotocol%2Fadcp-client-python%2Fissues%2F496
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fadcontextprotocol%2Fadcp-client-python%2Fissues%2F496
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=adcontextprotocol%2Fadcp-client-python
Reloadhttps://github.com/adcontextprotocol/adcp-client-python/issues/496
Reloadhttps://github.com/adcontextprotocol/adcp-client-python/issues/496
Reloadhttps://github.com/adcontextprotocol/adcp-client-python/issues/496
adcontextprotocolhttps://github.com/adcontextprotocol
adcp-client-pythonhttps://github.com/adcontextprotocol/adcp-client-python
Codehttps://github.com/adcontextprotocol/adcp-client-python
Issues44 (44)https://github.com/adcontextprotocol/adcp-client-python/issues
Pull requests13 (13)https://github.com/adcontextprotocol/adcp-client-python/pulls
Actionshttps://github.com/adcontextprotocol/adcp-client-python/actions
Projectshttps://github.com/adcontextprotocol/adcp-client-python/projects
Security and qualityhttps://github.com/adcontextprotocol/adcp-client-python/security
Insightshttps://github.com/adcontextprotocol/adcp-client-python/insights
https://github.com/adcontextprotocol/adcp-client-python
New issuehttps://github.com/login?return_to=https://github.com/adcontextprotocol/adcp-client-python/issues/496
New issuehttps://github.com/login?return_to=https://github.com/adcontextprotocol/adcp-client-python/issues/496
#505https://github.com/adcontextprotocol/adcp-client-python/pull/505
feat(decisioning): refine[] flow scaffold for get_products (position-matched echo)https://github.com/adcontextprotocol/adcp-client-python/issues/496#top
#505https://github.com/adcontextprotocol/adcp-client-python/pull/505
claude-triagedhttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaged%22
enhancementNew feature or requesthttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com/bokelley
bokelleyhttps://github.com/bokelley
on May 3, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/496#issue-4372989339
#491https://github.com/adcontextprotocol/adcp-client-python/issues/491
feat(decisioning): built-in helpers for buyer-side request-shape parameters on get_products (parent tracker) #491https://github.com/adcontextprotocol/adcp-client-python/issues/491
docs: salesagent → adcp Python SDK migration guide #489https://github.com/adcontextprotocol/adcp-client-python/pull/489
bokelleyhttps://github.com/bokelley
claude-triagingTriage routine is actively working on this issue (1-3 min)https://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaging%22
on May 3, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/496#event-25112658400
https://github.com/bokelley
bokelleyhttps://github.com/bokelley
on May 3, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/496#issuecomment-4367182790
feat(decisioning): built-in helpers for buyer-side request-shape parameters on get_products (parent tracker) #491https://github.com/adcontextprotocol/adcp-client-python/issues/491
#491https://github.com/adcontextprotocol/adcp-client-python/issues/491
#491https://github.com/adcontextprotocol/adcp-client-python/issues/491
https://claude.ai/code/cse_01NjjA8c5stfyV9CUAy85Mqshttps://claude.ai/code/cse_01NjjA8c5stfyV9CUAy85Mqs
Claude Codehttps://claude.ai/code
bokelleyhttps://github.com/bokelley
enhancementNew feature or requesthttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22enhancement%22
claude-triagedhttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaged%22
claude-triagingTriage routine is actively working on this issue (1-3 min)https://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaging%22
on May 3, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/496#event-25112667094
bokelleyhttps://github.com/bokelley
on May 3, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/496#event-25114060850
feat(decisioning): refine[] flow scaffold for get_products (#496)https://github.com/adcontextprotocol/adcp-client-python/commit/8f0f05dd6771791c4892616bc690a8c5789cf738
#496https://github.com/adcontextprotocol/adcp-client-python/issues/496
8f0f05dhttps://github.com/adcontextprotocol/adcp-client-python/commit/8f0f05dd6771791c4892616bc690a8c5789cf738
feat(decisioning): refine[] flow scaffold for get_products (#496) (#505)https://github.com/adcontextprotocol/adcp-client-python/commit/b584e70e8563044434898d0b78c3ca00d3c13eea
#496https://github.com/adcontextprotocol/adcp-client-python/issues/496
#505https://github.com/adcontextprotocol/adcp-client-python/pull/505
b584e70https://github.com/adcontextprotocol/adcp-client-python/commit/b584e70e8563044434898d0b78c3ca00d3c13eea
bokelleyhttps://github.com/bokelley
completedhttps://github.com/adcontextprotocol/adcp-client-python/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#505https://github.com/adcontextprotocol/adcp-client-python/pull/505
on May 3, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/496#event-25114154429
Sign up for freehttps://github.com/signup?return_to=https://github.com/adcontextprotocol/adcp-client-python/issues/496
Sign in to commenthttps://github.com/login?return_to=https://github.com/adcontextprotocol/adcp-client-python/issues/496
claude-triagedhttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaged%22
enhancementNew feature or requesthttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.