Route native Copilot MCP requests to Desktop

Merged
KH
5d ago
+1605-1

Summary

Native Copilot MCP initialization fails with an unknown route because the public session router does not forward POST /copilot/mcp to Desktop. This change routes that exact POST through the account transport and returns HTTP 409 when no compatible handler exists. Desktop retains its native peer, binding and per-call proof checks.

Validation

  • Two production outer-router integration tests pass, including peer forwarding, unavailable/declined account refusal and wrong-method handling. JSON framing and the sandbox route inventory remain aligned.
  • All 66 regression guard tests pass; formatting and public-source checks pass. Independent adversarial/contextual review and Veto host code/security/secrets review found no material issue in the main compatibility update.
  • Exact committed runner 20339faa4 passes the real external Rust consumer against base 25974652f (404 and no account call), fixed head 20339faa4 (managed response and peer refusals), and the retained corpus head-only mode (equal base/head SHA). Manifests and observations validate through scripts/verify-features/case-contract.mjs; the shared process runner uses its retained path. No obsolete mandatory PR-proof workflow is restored.
  • The original full Rust library run passed 2,289 tests with 16 ignored. Existing Clippy and quality violations were reproduced on the exact original base; no suppressions or unrelated cleanup were added. The focused routing suite was rerun after merging current main.
  • Live Copilot verification remains pending a merged core pin in a signed Desktop beta. These tests use a fake account with the production router and do not claim native attestation, hosted delivery, wake or uploaded history end to end.

Regression corpus case: 2100-copilot-native-mcp-route.