{
  "additionalProperties": false,
  "properties": {
    "findings": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "evidence_excerpt": {
            "maxLength": 180,
            "type": "string"
          },
          "file_sha256": {
            "maxLength": 64,
            "minLength": 1,
            "pattern": "^[0-9a-f]{64}$",
            "type": "string"
          },
          "line": {
            "minimum": 1,
            "type": "integer"
          },
          "message": {
            "maxLength": 800,
            "minLength": 1,
            "type": "string"
          },
          "path": {
            "maxLength": 240,
            "minLength": 1,
            "type": "string"
          },
          "remediation": {
            "maxLength": 1000,
            "minLength": 1,
            "type": "string"
          },
          "rule_id": {
            "maxLength": 8,
            "minLength": 1,
            "type": "string"
          },
          "severity": {
            "enum": [
              "INFO",
              "LOW",
              "MEDIUM",
              "HIGH",
              "CRITICAL"
            ],
            "type": "string"
          },
          "surface": {
            "maxLength": 64,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "rule_id",
          "surface",
          "severity",
          "message",
          "remediation",
          "path",
          "line",
          "file_sha256",
          "evidence_excerpt"
        ],
        "type": "object"
      },
      "maxItems": 200,
      "type": "array"
    },
    "findings_truncated": {
      "type": "boolean"
    },
    "reason": {
      "maxLength": 500,
      "type": [
        "string",
        "null"
      ]
    },
    "status": {
      "enum": [
        "PASS",
        "WARN",
        "FAIL",
        "INCONCLUSIVE",
        "INVALID_INPUT",
        "UNSUPPORTED_INPUT",
        "INTERNAL_ERROR",
        "TIMEOUT"
      ],
      "type": "string"
    },
    "scope": {
      "const": "PUBLIC_PRODUCTION_SNAPSHOT"
    },
    "fee_eligibility": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "eligible",
        "price_atomic",
        "currency",
        "rule",
        "invalid_no_charge",
        "unsupported_no_charge",
        "failure_no_charge",
        "settlement_claimed"
      ],
      "properties": {
        "eligible": {
          "type": "boolean"
        },
        "price_atomic": {
          "const": "4000"
        },
        "currency": {
          "const": "USDC"
        },
        "rule": {
          "const": "COMPLETED_IN_SCOPE_ONLY"
        },
        "invalid_no_charge": {
          "const": true
        },
        "unsupported_no_charge": {
          "const": true
        },
        "failure_no_charge": {
          "const": true
        },
        "settlement_claimed": {
          "const": false
        }
      }
    }
  },
  "required": [
    "status",
    "reason",
    "findings",
    "findings_truncated",
    "scope",
    "fee_eligibility"
  ],
  "type": "object"
}
