Title: mcpx: Phase 1 of #2434 — structured upstream-error carriage through the gateway + local-error origin marker · Issue #2435 · developing-today/code · GitHub
Open Graph Title: mcpx: Phase 1 of #2434 — structured upstream-error carriage through the gateway + local-error origin marker · Issue #2435 · developing-today/code
X Title: mcpx: Phase 1 of #2434 — structured upstream-error carriage through the gateway + local-error origin marker · Issue #2435 · developing-today/code
Description: Phase 1 of design #2434 (mcpx error honesty, finished). Design doc: files/designs/code-mcpx-error-honesty.md in the keep-the-four-repos-healthy goal workspace. The decisions are recorded on #2434; this phase implements its first slice. S...
Open Graph Description: Phase 1 of design #2434 (mcpx error honesty, finished). Design doc: files/designs/code-mcpx-error-honesty.md in the keep-the-four-repos-healthy goal workspace. The decisions are recorded on #2434; ...
X Description: Phase 1 of design #2434 (mcpx error honesty, finished). Design doc: files/designs/code-mcpx-error-honesty.md in the keep-the-four-repos-healthy goal workspace. The decisions are recorded on #2434; ...
Opengraph URL: https://github.com/developing-today/code/issues/2435
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"mcpx: Phase 1 of #2434 — structured upstream-error carriage through the gateway + local-error origin marker","articleBody":"Phase 1 of design #2434 (mcpx error honesty, finished). Design doc: `files/designs/code-mcpx-error-honesty.md` in the keep-the-four-repos-healthy goal workspace. The decisions are recorded on #2434; this phase implements its first slice.\n\n## Scope\n\nOne structured error carriage through the gateway, so a peer's error reaches the client as that peer's error, and mcpx's own errors are recognisably mcpx's:\n\n- The daemon `/v1` call reply gains a structured upstream-error field (code, message, data), populated whenever the pool/client layer holds a real JSON-RPC error from the upstream. Today the failure is flattened to text (`internal/daemon/routes_proto.go` `ToolFailure` path) and `internal/cli/serve_ask.go` (~L225-255) rebuilds an `UpstreamError` by guessing at that text, with one structured special case (-32021, serve_ask.go:241).\n- The gateway/MCP path consumes the structured field and relays it verbatim via the existing `UpstreamError` mechanism (`internal/mcpserver/capability.go`). The text-reconstruction heuristics are deleted for any reply carrying the structured field; they remain only as fallback for replies that don't (older daemon / non-JSON-RPC failure). The daemon batch path's text-only `isError` surfacing is in scope where it carries the same replies.\n- mcpx's OWN locally-minted errors (its -32602 name checks, -32603 internal failures, policy refusals) go through one minting helper that stamps `error.data` with the origin marker `\"mcpx\": {\"origin\": \"local\"}` (merged into any existing data). Peer errors are relayed untouched and never gain the marker.\n\n## Acceptance\n\n- [ ] A pass-through upstream error and the same error via the gateway (`mcpx_call`) reach the client with identical code, message and data — pinned by a parity test\n- [ ] An upstream -32021 relayed through the gateway keeps its `data.requiredCapabilities` intact without the serve_ask special case\n- [ ] Every error mcpx mints itself on the MCP surface carries the origin marker in `data`; no relayed peer error carries it\n- [ ] Replies without the structured field (older daemon shape) still surface as before via the text fallback\n- [ ] Tests run via CI per fleet policy (no builds on the sandbox)\n\nOut of scope: the dispatch gate (Phase 2), -32021 production (Phase 3), any change to which errors mcpx mints — only their carriage and marking.\n\n## Acceptance criteria\n\n- Daemon `/v1` call replies carry a structured upstream-error field (code, message, data) whenever the pool/client layer holds a real JSON-RPC error from upstream.\n- The gateway/MCP path relays that structured error verbatim via the existing `UpstreamError` mechanism; the text-reconstruction heuristics are deleted for replies carrying the field and remain only as fallback for replies without it.\n- Tests cover the structured relay end-to-end, the no-field fallback path, and the existing -32021 special case behaving identically through the structured path.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-29T21:34:38Z","url":"https://github.com/developing-today/code/issues/2435"}
| 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:26f106c9-6e99-e8e3-b942-7f8958d45f8c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A488:113BA5:2E75E0:3E20FA:6B06180D |
| html-safe-nonce | cd934901e7c6cc3c7f6ca920ecadad37f8f53cf5144d2487482ffea681af1b36 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNDg4OjExM0JBNToyRTc1RTA6M0UyMEZBOjZCMDYxODBEIiwidmlzaXRvcl9pZCI6IjMzMjE4NzkzMDc5ODI2MDgzOTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a8816a1e5b57503bd405235d3b7e8a629403810e95f3531da84dd7ea80d9c16e |
| hovercard-subject-tag | issue:6108902746 |
| 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/developing-today/code/2435/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c7d248a3669c98dfac7fed3da7bfeffe812c06d943cfde3540043d8405dae4e4/developing-today/code/issues/2435 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c7d248a3669c98dfac7fed3da7bfeffe812c06d943cfde3540043d8405dae4e4/developing-today/code/issues/2435 |
| og:image:alt | Phase 1 of design #2434 (mcpx error honesty, finished). Design doc: files/designs/code-mcpx-error-honesty.md in the keep-the-four-repos-healthy goal workspace. The decisions are recorded on #2434; ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 97d4714e567728e1f85f88b0cf68c89f0f8a3dc41e8869af7aeb8195ad990374 |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| 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 | 866f202ebf7ac5aff8f633417d9fd8a53818a977 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width