{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/deadends-dev/json-schema/deadends-dev-error-canon-schema.json",
  "title": "ErrorCanon",
  "description": "Complete structured failure knowledge for one error in one environment.",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/deadends-dev-openapi.json#/components/schemas/ErrorCanon",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "error": {
      "type": "object",
      "properties": {
        "signature": {
          "type": "string"
        },
        "regex": {
          "type": "string"
        },
        "domain": {
          "type": "string"
        },
        "category": {
          "type": "string"
        }
      }
    },
    "environment": {
      "type": "object"
    },
    "verdict": {
      "type": "object",
      "properties": {
        "resolvable": {
          "type": "string",
          "enum": [
            "true",
            "partial",
            "false"
          ]
        },
        "fix_success_rate": {
          "type": "number"
        },
        "confidence": {
          "type": "number",
          "description": "0.0-1.0 score"
        },
        "summary": {
          "type": "string"
        }
      }
    },
    "dead_ends": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string"
          },
          "why_fails": {
            "type": "string"
          },
          "fail_rate": {
            "type": "number"
          }
        }
      }
    },
    "workarounds": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "action": {
            "type": "string"
          },
          "how": {
            "type": "string"
          },
          "success_rate": {
            "type": "number"
          }
        }
      }
    },
    "transition_graph": {
      "type": "object",
      "properties": {
        "leads_to": {
          "type": "array"
        },
        "preceded_by": {
          "type": "array"
        },
        "frequently_confused_with": {
          "type": "array"
        }
      }
    }
  }
}