{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Ledger1099ReconciliationOutput",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "service",
    "service_version",
    "supported_scope",
    "evaluated_at_utc",
    "evidence_mode",
    "source_fresh_for_current_use",
    "evidence_valid_until_utc",
    "request_sha256",
    "policy_sha256",
    "overall_status",
    "group_results",
    "unmatched_ledger_row_ids",
    "unmatched_form_document_ids",
    "unmatched_adjustment_ids",
    "evidence_context",
    "evidence_checksum",
    "limitations",
    "difference_is_underreported_income",
    "difference_proves_form_incorrect",
    "deductibility_determined",
    "journal_entries_generated",
    "scope",
    "fee_eligibility"
  ],
  "properties": {
    "service": {
      "const": "ledger-1099-reconciliation-evidence"
    },
    "service_version": {
      "const": "ledger-1099-reconciliation-1.0.0"
    },
    "supported_scope": {
      "type": "object"
    },
    "evaluated_at_utc": {
      "type": "string"
    },
    "evidence_mode": {
      "type": "string",
      "enum": [
        "current",
        "snapshot_replay"
      ]
    },
    "source_fresh_for_current_use": {
      "type": "boolean"
    },
    "evidence_valid_until_utc": {
      "type": "string"
    },
    "request_sha256": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    },
    "policy_sha256": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    },
    "overall_status": {
      "type": "string",
      "enum": [
        "COMPLETE",
        "REVIEW",
        "CONFLICT",
        "UNKNOWN"
      ]
    },
    "group_results": {
      "type": "array",
      "items": {
        "type": "object"
      }
    },
    "unmatched_ledger_row_ids": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "unmatched_form_document_ids": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "unmatched_adjustment_ids": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "evidence_context": {
      "type": "object"
    },
    "evidence_checksum": {
      "type": "string",
      "pattern": "^[0-9a-f]{64}$"
    },
    "limitations": {
      "type": "array",
      "minItems": 8,
      "items": {
        "type": "string"
      }
    },
    "difference_is_underreported_income": {
      "const": false
    },
    "difference_proves_form_incorrect": {
      "const": false
    },
    "deductibility_determined": {
      "const": false
    },
    "journal_entries_generated": {
      "const": false
    },
    "scope": {
      "const": "PUBLIC_PRODUCTION_SNAPSHOT"
    },
    "fee_eligibility": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "eligible",
        "price_atomic",
        "currency",
        "rule",
        "review_no_charge",
        "conflict_no_charge",
        "unknown_no_charge",
        "stale_no_charge",
        "settlement_claimed"
      ],
      "properties": {
        "eligible": {
          "type": "boolean"
        },
        "price_atomic": {
          "const": "30000"
        },
        "currency": {
          "const": "USDC"
        },
        "rule": {
          "const": "FRESH_COMPLETE_ONLY_IF_VALIDATED"
        },
        "review_no_charge": {
          "const": true
        },
        "conflict_no_charge": {
          "const": true
        },
        "unknown_no_charge": {
          "const": true
        },
        "stale_no_charge": {
          "const": true
        },
        "settlement_claimed": {
          "const": false
        }
      }
    }
  }
}
