Title: feat: TaskHandoff registry.fail path should echo request context (PR #560 follow-up) · Issue #563 · adcontextprotocol/adcp-client-python · GitHub
Open Graph Title: feat: TaskHandoff registry.fail path should echo request context (PR #560 follow-up) · Issue #563 · adcontextprotocol/adcp-client-python
X Title: feat: TaskHandoff registry.fail path should echo request context (PR #560 follow-up) · Issue #563 · adcontextprotocol/adcp-client-python
Description: Context PR #560 echoed request context onto MCP structuredContent and A2A DataPart for the synchronous AdcpError raise path. Background-task failures route through a different code path that #560 does NOT touch. The path src/adcp/decisio...
Open Graph Description: Context PR #560 echoed request context onto MCP structuredContent and A2A DataPart for the synchronous AdcpError raise path. Background-task failures route through a different code path that #560 d...
X Description: Context PR #560 echoed request context onto MCP structuredContent and A2A DataPart for the synchronous AdcpError raise path. Background-task failures route through a different code path that #560 d...
Opengraph URL: https://github.com/adcontextprotocol/adcp-client-python/issues/563
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"feat: TaskHandoff registry.fail path should echo request context (PR #560 follow-up)","articleBody":"## Context\n\nPR #560 echoed request `context` onto MCP `structuredContent` and A2A DataPart for the synchronous AdcpError raise path. Background-task failures route through a different code path that #560 does NOT touch.\n\n## The path\n\n`src/adcp/decisioning/dispatch.py:1275-1292` — `TaskHandoff` background fn raises and is caught by:\n\n```python\nexcept AdcpError as exc:\n await registry.fail(task_id, exc.to_wire())\n return\nexcept Exception as exc:\n # ... wraps to AdcpError(INTERNAL_ERROR)\n await registry.fail(task_id, wrapped.to_wire())\n```\n\n`exc.to_wire()` produces the structured envelope that lands in the task registry. When a buyer polls the task status (or the registry pushes via webhook), they receive this envelope — without the request `context` echoed.\n\n## The fix shape\n\nThe registry-fail call site has access to the original request params (the same params `TaskHandoff` was invoked with). Threading them through and applying `inject_context` on the wire dict before `registry.fail` mirrors PR #560.\n\nLikely API:\n- `registry.fail(task_id, wire_envelope)` → `registry.fail(task_id, wire_envelope, request_params=None)`\n- Or build the echoed envelope at the dispatch site and pass it pre-merged.\n\n## Acceptance\n\n- `tests/test_handoff_registry.py` (or similar) adds a test where the background fn raises an AdcpError, the request had a `context` field, and the registry-stored wire envelope carries that `context`.\n- Symmetric test for the success path (TaskHandoff completes normally — does the success registry payload echo context today? Verify before fixing.)","author":{"url":"https://github.com/bokelley","@type":"Person","name":"bokelley"},"datePublished":"2026-05-04T10:26:02Z","url":"https://github.com/adcontextprotocol/adcp-client-python/issues/563"}
| 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:85561ab6-e331-9dc6-110d-844b6bc50618 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C29E:27E5CD:D902B9:118BF8B:6B00F662 |
| html-safe-nonce | b2738fc9be006992a9f683468a899d64b34ebeb40943c6355617be2ed15d053f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMjlFOjI3RTVDRDpEOTAyQjk6MTE4QkY4Qjo2QjAwRjY2MiIsInZpc2l0b3JfaWQiOiI1NjAxNDQ0MzE1NzA5NjM0MTQ2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 72debaeb2353f56cc2ed3ba48f41ab86267006d95c3329ba712dede3e1f65dda |
| hovercard-subject-tag | issue:4375764191 |
| 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/563/issue_layout |
| twitter:image | https://opengraph.githubassets.com/71173229f90ec0934a913f2217d7e025df210e69fabd4d8d7fc0ce5cf17e59e4/adcontextprotocol/adcp-client-python/issues/563 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/71173229f90ec0934a913f2217d7e025df210e69fabd4d8d7fc0ce5cf17e59e4/adcontextprotocol/adcp-client-python/issues/563 |
| og:image:alt | Context PR #560 echoed request context onto MCP structuredContent and A2A DataPart for the synchronous AdcpError raise path. Background-task failures route through a different code path that #560 d... |
| 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 | 4ef498cbabcbe3c50befc7a5b743e7072ee770b4daf0e15e54801180d1fa91fc |
| 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 | 9983dd5da06943f833c971dd5b6bc988e2858be5 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width