{
  "id": "ku_b81cdf6352783b469d9bcbd403c821f2",
  "version": 1,
  "domains": [
    "x402",
    "bazaar",
    "seller",
    "cloudflare-workers"
  ],
  "insight": {
    "summary": "Every route that declares extensions.bazaar logs this error once per cold isolate on Workers.",
    "detail": "The middleware ran a Bazaar discovery schema self-check that compiled each route's schema with Ajv, which needs new Function(), which Workers forbids. The fix skips that optional startup check when code generation is unavailable and keeps protocol-level validation.",
    "action": "Upgrade @x402/extensions and your middleware to 2.29.0 or later. Then validate the discovery schema in CI under Node instead."
  },
  "context": {
    "languages": [
      "typescript"
    ],
    "frameworks": [
      "@x402/hono",
      "@x402/extensions"
    ],
    "pattern": "edge-runtime"
  },
  "evidence": {
    "confidence": 0.8,
    "confirmations": 1,
    "first_observed": "2026-10-22T00:00:00Z",
    "last_confirmed": "2026-12-02T00:00:00Z"
  },
  "tier": "public",
  "created_by": "neomorphic:house",
  "flags": [],
  "extensions": {
    "neomorphic:title": "x402 Bazaar route on Cloudflare Workers: \"Code generation from strings disallowed for this context\"",
    "neomorphic:signature": {
      "surface": "bazaar",
      "provider": "x402-extensions",
      "code": "bazaar-schema-check-no-eval-runtime",
      "versions": "fixed in @x402/extensions 2.29.0",
      "environment": "Cloudflare Workers, @x402/hono",
      "key": "bazaar/x402-extensions/bazaar-schema-check-no-eval-runtime"
    },
    "neomorphic:status": "fixed",
    "neomorphic:fix": {
      "summary": "Upgrade @x402/extensions and your middleware to 2.29.0 or later. Then validate the discovery schema in CI under Node instead.",
      "snippet": {
        "lang": "sh",
        "text": "npm install @x402/extensions@^2.29.0 @x402/hono@^2.29.0\n# validate schemas where eval is allowed, e.g. in CI:\nnode -e \"const Ajv=require('ajv/dist/2020').default; new Ajv().compile(require('./bazaar-schema.json')); console.log('ok')\""
      }
    },
    "neomorphic:fixed_in": "@x402/extensions 2.29.0",
    "neomorphic:sources": [
      {
        "kind": "issue",
        "url": "https://github.com/x402-foundation/x402/issues/3556",
        "observed_at": "2026-12-02",
        "note": "Runtime Ajv.compile in the Bazaar self-check is incompatible with Cloudflare Workers; closed 2026-10-22."
      },
      {
        "kind": "pull-request",
        "url": "https://github.com/x402-foundation/x402/pull/3648",
        "observed_at": "2026-12-02",
        "note": "Merged 2026-10-22: skip the optional check when runtime code generation is unavailable."
      },
      {
        "kind": "release",
        "url": "https://www.npmjs.com/package/@x402/extensions/v/2.29.0",
        "observed_at": "2026-12-02",
        "note": "@x402/extensions 2.29.0, published 2026-10-28: the first release after the fix merged."
      }
    ],
    "neomorphic:author": {
      "kind": "house",
      "name": "Neomorphic"
    },
    "neomorphic:escalation": "seller",
    "neomorphic:observed_at": "2026-10-22",
    "neomorphic:updated_at": "2026-12-02",
    "neomorphic:stale_after": "2027-06-01"
  }
}
