{
  "id": "ku_2e4a17e17ecba206ac51786625a66611",
  "version": 1,
  "domains": [
    "mpp",
    "proxy",
    "seller",
    "delivery"
  ],
  "insight": {
    "summary": "A long paid request outlives the client or edge timeout; the upstream call is aborted with it, and a retry with the same credential cannot get what was paid for.",
    "detail": "The proxy settled first and passed the client's abort signal to the upstream fetch. From 0.17.1 an opt-in replay option runs the paid upstream request detached from the client: a retry with the same credential and request gets the stored response, 202 while it runs, or a new upstream attempt after a failed delivery, without paying again. A non-idempotent upstream may run twice unless maxAttempts is 1.",
    "action": "Upgrade mppx to 0.17.1 or later and turn on replay with a shared atomic store and a fixed authority."
  },
  "context": {
    "languages": [
      "typescript"
    ],
    "frameworks": [
      "mppx"
    ],
    "pattern": "paid-not-delivered"
  },
  "evidence": {
    "confidence": 0.85,
    "confirmations": 1,
    "first_observed": "2026-11-04T00:00:00Z",
    "last_confirmed": "2026-12-02T00:00:00Z"
  },
  "tier": "public",
  "created_by": "neomorphic:house",
  "flags": [],
  "extensions": {
    "neomorphic:title": "mppx proxy: the buyer paid, the client disconnected during a long upstream call, and the response is gone",
    "neomorphic:signature": {
      "surface": "mpp",
      "provider": "mppx",
      "code": "proxy-disconnect-aborts-paid-upstream",
      "versions": "fixed in mppx 0.17.1",
      "environment": "mppx/proxy in front of slow upstreams or behind an edge proxy with a short timeout",
      "key": "mpp/mppx/proxy-disconnect-aborts-paid-upstream"
    },
    "neomorphic:status": "fixed",
    "neomorphic:fix": {
      "summary": "Upgrade mppx to 0.17.1 or later and turn on replay with a shared atomic store and a fixed authority.",
      "snippet": {
        "lang": "ts",
        "text": "const proxy = Proxy.create({\n  // ...routes and payment config\n  replay: {\n    authority: 'api.example.com',   // fixed, never from request headers\n    store,                          // atomic store shared by every instance\n    maxAttempts: 1,                 // only replay recorded responses for non-idempotent upstreams\n  },\n});"
      }
    },
    "neomorphic:fixed_in": "mppx 0.17.1",
    "neomorphic:sources": [
      {
        "kind": "issue",
        "url": "https://github.com/wevm/mppx/issues/1044",
        "observed_at": "2026-12-02",
        "note": "Proxy: paid requests cannot be recovered when the client disconnects before a long upstream request finishes; closed 2026-11-02."
      },
      {
        "kind": "pull-request",
        "url": "https://github.com/wevm/mppx/pull/1157",
        "observed_at": "2026-12-02",
        "note": "Merged 2026-11-02: opt-in replay of paid deliveries after a client disconnect."
      },
      {
        "kind": "release",
        "url": "https://github.com/wevm/mppx/releases/tag/mppx%400.17.1",
        "observed_at": "2026-12-02",
        "note": "mppx 0.17.1, published 2026-11-04; changelog 3fca0d6: added an opt-in replay option to Proxy.create so a payer who loses the connection can collect the response without paying again."
      }
    ],
    "neomorphic:author": {
      "kind": "house",
      "name": "Neomorphic"
    },
    "neomorphic:escalation": "seller",
    "neomorphic:observed_at": "2026-11-04",
    "neomorphic:updated_at": "2026-12-02",
    "neomorphic:stale_after": "2027-06-01"
  }
}
