René's URL Explorer Experiment


Title: @IdempotencyStore.wrap incompatible with arg-projected methods (update_media_buy) · Issue #559 · adcontextprotocol/adcp-client-python · GitHub

Open Graph Title: @IdempotencyStore.wrap incompatible with arg-projected methods (update_media_buy) · Issue #559 · adcontextprotocol/adcp-client-python

X Title: @IdempotencyStore.wrap incompatible with arg-projected methods (update_media_buy) · Issue #559 · adcontextprotocol/adcp-client-python

Description: What @IdempotencyStore.wrap (src/adcp/server/idempotency/store.py:131-219) wraps the handler with signature (handler_self, params, context=None, *args, **kwargs). But the framework's arg-projector (src/adcp/decisioning/dispatch.py:~1080)...

Open Graph Description: What @IdempotencyStore.wrap (src/adcp/server/idempotency/store.py:131-219) wraps the handler with signature (handler_self, params, context=None, *args, **kwargs). But the framework's arg-projector ...

X Description: What @IdempotencyStore.wrap (src/adcp/server/idempotency/store.py:131-219) wraps the handler with signature (handler_self, params, context=None, *args, **kwargs). But the framework's arg-projec...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"@IdempotencyStore.wrap incompatible with arg-projected methods (update_media_buy)","articleBody":"## What\n\n`@IdempotencyStore.wrap` ([`src/adcp/server/idempotency/store.py:131-219`](https://github.com/adcontextprotocol/adcp-client-python/blob/main/src/adcp/server/idempotency/store.py#L131-L219)) wraps the handler with signature `(handler_self, params, context=None, *args, **kwargs)`. But the framework's arg-projector ([`src/adcp/decisioning/dispatch.py:~1080`](https://github.com/adcontextprotocol/adcp-client-python/blob/main/src/adcp/decisioning/dispatch.py)) splits some tools into per-field kwargs:\n\n```python\n# dispatch.py:1085 (arg_projector branch for update_media_buy)\nresult = await method(**arg_projector, ctx=ctx)\n# arg_projector = {\"media_buy_id\": \"...\", \"patch\": {...}}\n```\n\nWhen `update_media_buy` is decorated with `@_IDEMPOTENCY.wrap`, the wrap body **never runs** — Python raises before:\n\n```\nTypeError: MockSellerPlatform.update_media_buy() missing 1 required positional argument: 'params'\n```\n\nStrictly a calling-convention incompatibility. Dispatch passes `media_buy_id=...`, `patch=...`, `ctx=...` as kwargs. None match the `params` positional, no default, the projected kwargs land in `**kwargs`, and Python errors out before `_wrapped`'s body executes. So this isn't a hash collision or cache-key issue — the wrap doesn't get a chance to compute anything.\n\n## Repro\n\nsalesagent's `MockSellerPlatform.update_media_buy` decorated with `@_IDEMPOTENCY.wrap`. Method signature is `(self, media_buy_id, patch, ctx)` per the framework's arg-projector contract. Calling through MCP storyboard runner against `core/` raised the TypeError above on every `update_media_buy` request.\n\nReference: same shape as `examples/v3_reference_seller/src/platform.py:735` which intentionally does NOT wrap `update_media_buy` (presumably for the same reason — neither the example nor the docs spell this out as a known incompatibility).\n\n## Workaround we shipped\n\nDropped `@_IDEMPOTENCY.wrap` from `update_media_buy` on both [`core/platforms/mock.py`](https://github.com/prebid/salesagent/blob/main/core/platforms/mock.py) and [`core/platforms/gam.py`](https://github.com/prebid/salesagent/blob/main/core/platforms/gam.py). **We've lost idempotency on update_media_buy** — buyer retries re-execute side effects. Acceptable for the spike; not for prod.\n\n## What we'd want\n\n**Cleanest fix on the wrap side:** make wrap signature-flexible so it works regardless of how the framework calls it. Detect the arg-projector calling pattern (kwargs that aren't `ctx`/`context`) and synthesize a params dict from those kwargs before hashing:\n\n```python\nasync def _wrapped(handler_self, params=None, context=None, *args, **kwargs):\n    if params is None and kwargs:\n        # Arg-projector calling pattern — synthesize params from non-ctx kwargs\n        ctx_kw = kwargs.pop(\"ctx\", None) or kwargs.pop(\"context\", None)\n        params = kwargs\n        if ctx_kw is not None:\n            context = ctx_kw\n    # ... existing logic, then dispatch back via the same calling pattern\n    return await handler(handler_self, **params, ctx=context)  # for arg-projected\n    # OR: return await handler(handler_self, params, context, *args, **kwargs)  # for normal\n```\n\n(Sketch only — needs tightening on which calling pattern was used so the inner `handler(...)` invocation matches.)\n\n**Alternative on dispatch side:** detect a wrapped handler and route via `method(params=arg_projector_dict, ctx=ctx)` instead of unpacking. But dispatch is generic and shouldn't know about `@wrap`, so the wrap-side fix is cleaner.\n\n## Filed by\n\nsalesagent kill-nginx/M2 spike — surfaced in [`core/SDK_FEEDBACK.md`](https://github.com/prebid/salesagent/blob/main/core/SDK_FEEDBACK.md) round 3 along with #558 (BearerTokenAuth × transport=both).","author":{"url":"https://github.com/bokelley","@type":"Person","name":"bokelley"},"datePublished":"2026-05-04T09:59:27Z","url":"https://github.com/adcontextprotocol/adcp-client-python/issues/559"}

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:84a890f2-20bd-ae44-7c9e-6be7d7d19e1f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB95E:291B58:B9412:E9C09:6B00F69C
html-safe-nonce9e2f88d53cd1828b373b72f4f6e53453d949715e0cff95999c5601fb8c030849
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOTVFOjI5MUI1ODpCOTQxMjpFOUMwOTo2QjAwRjY5QyIsInZpc2l0b3JfaWQiOiIxODg5NzMzODg3NzQ0MDc5NTE2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacf00f7d866d6fee07e09c44ef83b0f5092c060a47ead5672860a7837350079feb
hovercard-subject-tagissue:4375601270
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/559/issue_layout
twitter:imagehttps://opengraph.githubassets.com/fabd1ac37dfeea1599dfb6f958d5f19cae4d4e5c62aa48643c5223c04d32f83a/adcontextprotocol/adcp-client-python/issues/559
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/fabd1ac37dfeea1599dfb6f958d5f19cae4d4e5c62aa48643c5223c04d32f83a/adcontextprotocol/adcp-client-python/issues/559
og:image:altWhat @IdempotencyStore.wrap (src/adcp/server/idempotency/store.py:131-219) wraps the handler with signature (handler_self, params, context=None, *args, **kwargs). But the framework's arg-projector ...
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/559#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fadcontextprotocol%2Fadcp-client-python%2Fissues%2F559
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%2F559
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/559
Reloadhttps://github.com/adcontextprotocol/adcp-client-python/issues/559
Reloadhttps://github.com/adcontextprotocol/adcp-client-python/issues/559
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/559
New issuehttps://github.com/login?return_to=https://github.com/adcontextprotocol/adcp-client-python/issues/559
#567https://github.com/adcontextprotocol/adcp-client-python/pull/567
@IdempotencyStore.wrap incompatible with arg-projected methods (update_media_buy)https://github.com/adcontextprotocol/adcp-client-python/issues/559#top
#567https://github.com/adcontextprotocol/adcp-client-python/pull/567
bugSomething isn't workinghttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22bug%22
claude-triagedhttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaged%22
no-triageSkip the Claude triage bot — human or designated agent will handle this issuehttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22no-triage%22
https://github.com/bokelley
bokelleyhttps://github.com/bokelley
on May 4, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/559#issue-4375601270
src/adcp/server/idempotency/store.py:131-219https://github.com/adcontextprotocol/adcp-client-python/blob/main/src/adcp/server/idempotency/store.py#L131-L219
src/adcp/decisioning/dispatch.py:~1080https://github.com/adcontextprotocol/adcp-client-python/blob/main/src/adcp/decisioning/dispatch.py
core/platforms/mock.pyhttps://github.com/prebid/salesagent/blob/main/core/platforms/mock.py
core/platforms/gam.pyhttps://github.com/prebid/salesagent/blob/main/core/platforms/gam.py
core/SDK_FEEDBACK.mdhttps://github.com/prebid/salesagent/blob/main/core/SDK_FEEDBACK.md
#558https://github.com/adcontextprotocol/adcp-client-python/issues/558
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 4, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/559#event-25126867254
bokelleyhttps://github.com/bokelley
on May 4, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/559#event-25127913602
fix(idempotency): support @Wrap on arg-projected methods (update_medi…https://github.com/adcontextprotocol/adcp-client-python/commit/5906daeaf0668b96e0b55e9e503d243b0a3d86a6
@Wraphttps://github.com/Wrap
https://docs.github.com/articles/closing-issues-via-commit-messages
5906daehttps://github.com/adcontextprotocol/adcp-client-python/commit/5906daeaf0668b96e0b55e9e503d243b0a3d86a6
https://github.com/bokelley
bokelleyhttps://github.com/bokelley
on May 4, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/559#issuecomment-4370320535
https://claude.ai/code/session_01HopGAcSiNk5SWbLpE9fd6bhttps://claude.ai/code/session_01HopGAcSiNk5SWbLpE9fd6b
Claude Codehttps://claude.ai/code
bokelleyhttps://github.com/bokelley
bugSomething isn't workinghttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22bug%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 4, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/559#event-25127960617
https://github.com/bokelley
bokelleyhttps://github.com/bokelley
on May 4, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/559#issuecomment-4370334784
@bokelleyhttps://github.com/bokelley
https://claude.ai/code/session_019pauPrwFyu6tbAuQHzDccohttps://claude.ai/code/session_019pauPrwFyu6tbAuQHzDcco
Claude Codehttps://claude.ai/code
bokelleyhttps://github.com/bokelley
no-triageSkip the Claude triage bot — human or designated agent will handle this issuehttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22no-triage%22
on May 4, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/559#event-25129278408
bokelleyhttps://github.com/bokelley
completedhttps://github.com/adcontextprotocol/adcp-client-python/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#567https://github.com/adcontextprotocol/adcp-client-python/pull/567
on May 4, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/559#event-25130827668
bokelleyhttps://github.com/bokelley
on May 4, 2026https://github.com/adcontextprotocol/adcp-client-python/issues/559#event-25130827689
fix(idempotency): @IdempotencyStore.wrap supports arg-projected metho…https://github.com/adcontextprotocol/adcp-client-python/commit/1abdae676c8f3bcf2bef48ea5a6d192a5da7de92
https://docs.github.com/articles/closing-issues-via-commit-messages
1abdae6https://github.com/adcontextprotocol/adcp-client-python/commit/1abdae676c8f3bcf2bef48ea5a6d192a5da7de92
Sign up for freehttps://github.com/signup?return_to=https://github.com/adcontextprotocol/adcp-client-python/issues/559
Sign in to commenthttps://github.com/login?return_to=https://github.com/adcontextprotocol/adcp-client-python/issues/559
bugSomething isn't workinghttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22bug%22
claude-triagedhttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22claude-triaged%22
no-triageSkip the Claude triage bot — human or designated agent will handle this issuehttps://github.com/adcontextprotocol/adcp-client-python/issues?q=state%3Aopen%20label%3A%22no-triage%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.