{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "service_version": {
      "const": "1.0.0"
    },
    "mode": {
      "type": "string",
      "enum": [
        "current",
        "snapshot_replay"
      ]
    },
    "evaluated_at": {
      "type": "string",
      "maxLength": 40,
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T.*(?:Z|[+-]\\d{2}:\\d{2})$"
    },
    "tax_year": {
      "type": "integer",
      "minimum": 1900,
      "maximum": 2200
    },
    "filing_channel": {
      "type": "string",
      "enum": [
        "FIRE",
        "IRIS_PORTAL",
        "IRIS_A2A",
        "THIRD_PARTY"
      ]
    },
    "overall_status": {
      "type": "string",
      "enum": [
        "READY",
        "NOT_READY",
        "UNKNOWN",
        "NOT_APPLICABLE"
      ]
    },
    "readiness_semantics": {
      "type": "string",
      "maxLength": 1200
    },
    "declared": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "tax_year": {
          "type": "integer",
          "minimum": 1900,
          "maximum": 2200
        },
        "filing_channel": {
          "type": "string",
          "enum": [
            "FIRE",
            "IRIS_PORTAL",
            "IRIS_A2A",
            "THIRD_PARTY"
          ]
        },
        "form_types": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "1099-NEC",
              "1099-MISC",
              "1099-K",
              "W-2",
              "W-3"
            ]
          },
          "minItems": 1,
          "maxItems": 5,
          "uniqueItems": true
        },
        "volume_by_form": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "1099-NEC": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000
            },
            "1099-MISC": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000
            },
            "1099-K": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000
            },
            "W-2": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000
            },
            "W-3": {
              "type": "integer",
              "minimum": 0,
              "maximum": 1000000
            }
          },
          "required": []
        },
        "tcc_status": {
          "type": "string",
          "enum": [
            "absent",
            "pending",
            "active",
            "unknown"
          ]
        },
        "readiness_flags": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "portal_tcc_confirmed": {
              "type": "string",
              "enum": [
                "yes",
                "no",
                "unknown"
              ]
            },
            "a2a_tcc_confirmed": {
              "type": "string",
              "enum": [
                "yes",
                "no",
                "unknown"
              ]
            },
            "portal_access_ready": {
              "type": "string",
              "enum": [
                "yes",
                "no",
                "unknown"
              ]
            },
            "portal_batch_plan_ready": {
              "type": "string",
              "enum": [
                "yes",
                "no",
                "unknown"
              ]
            },
            "fire_test_required": {
              "type": "string",
              "enum": [
                "yes",
                "no",
                "unknown"
              ]
            },
            "ir_application_change_required": {
              "type": "string",
              "enum": [
                "yes",
                "no",
                "unknown"
              ]
            },
            "schema_package_acquired": {
              "type": "string",
              "enum": [
                "yes",
                "no",
                "unknown"
              ]
            },
            "corrections_required": {
              "type": "string",
              "enum": [
                "yes",
                "no",
                "unknown"
              ]
            },
            "third_party_iris_support_confirmed": {
              "type": "string",
              "enum": [
                "yes",
                "no",
                "unknown"
              ]
            }
          },
          "required": []
        },
        "software_vendor_support": {
          "type": "string",
          "enum": [
            "yes",
            "no",
            "unknown"
          ]
        },
        "api_client_ready": {
          "type": "string",
          "enum": [
            "yes",
            "no",
            "unknown"
          ]
        },
        "ats_status": {
          "type": "string",
          "enum": [
            "passed",
            "pending",
            "unknown"
          ]
        },
        "schema_version": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 24,
              "pattern": "^(?:TY2026-)?v?[0-9]{1,2}\\.[0-9]{1,2}(?:\\.[0-9]{1,2})?$"
            },
            {
              "type": "null"
            }
          ]
        },
        "correction_years": {
          "type": "array",
          "items": {
            "type": "integer",
            "minimum": 1900,
            "maximum": 2200
          },
          "minItems": 0,
          "maxItems": 10,
          "uniqueItems": true
        }
      },
      "required": [
        "tax_year",
        "filing_channel",
        "form_types",
        "volume_by_form",
        "tcc_status",
        "readiness_flags"
      ],
      "allOf": [
        {
          "if": {
            "properties": {
              "form_types": {
                "type": "array",
                "contains": {
                  "const": "1099-NEC"
                }
              }
            }
          },
          "then": {
            "properties": {
              "volume_by_form": {
                "type": "object",
                "properties": {
                  "1099-NEC": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000
                  }
                },
                "required": [
                  "1099-NEC"
                ]
              }
            }
          },
          "else": {
            "properties": {
              "volume_by_form": {
                "type": "object",
                "properties": {
                  "1099-NEC": false
                }
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "form_types": {
                "type": "array",
                "contains": {
                  "const": "1099-MISC"
                }
              }
            }
          },
          "then": {
            "properties": {
              "volume_by_form": {
                "type": "object",
                "properties": {
                  "1099-MISC": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000
                  }
                },
                "required": [
                  "1099-MISC"
                ]
              }
            }
          },
          "else": {
            "properties": {
              "volume_by_form": {
                "type": "object",
                "properties": {
                  "1099-MISC": false
                }
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "form_types": {
                "type": "array",
                "contains": {
                  "const": "1099-K"
                }
              }
            }
          },
          "then": {
            "properties": {
              "volume_by_form": {
                "type": "object",
                "properties": {
                  "1099-K": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000
                  }
                },
                "required": [
                  "1099-K"
                ]
              }
            }
          },
          "else": {
            "properties": {
              "volume_by_form": {
                "type": "object",
                "properties": {
                  "1099-K": false
                }
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "form_types": {
                "type": "array",
                "contains": {
                  "const": "W-2"
                }
              }
            }
          },
          "then": {
            "properties": {
              "volume_by_form": {
                "type": "object",
                "properties": {
                  "W-2": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000
                  }
                },
                "required": [
                  "W-2"
                ]
              }
            }
          },
          "else": {
            "properties": {
              "volume_by_form": {
                "type": "object",
                "properties": {
                  "W-2": false
                }
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "form_types": {
                "type": "array",
                "contains": {
                  "const": "W-3"
                }
              }
            }
          },
          "then": {
            "properties": {
              "volume_by_form": {
                "type": "object",
                "properties": {
                  "W-3": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 1000000
                  }
                },
                "required": [
                  "W-3"
                ]
              }
            }
          },
          "else": {
            "properties": {
              "volume_by_form": {
                "type": "object",
                "properties": {
                  "W-3": false
                }
              }
            }
          }
        }
      ]
    },
    "observed": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "accounts_checked": {
          "const": false
        },
        "ats_acceptance_observed": {
          "const": false
        },
        "live_system_availability_observed": {
          "const": false
        },
        "schema_bytes_available": {
          "const": false
        },
        "source_evidence": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "properties": {
              "ref_id": {
                "type": "string",
                "maxLength": 120
              },
              "source_id": {
                "type": "string",
                "maxLength": 80
              },
              "url": {
                "type": "string",
                "maxLength": 1500
              },
              "raw_sha256": {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              "text_sha256": {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              "headers_sha256": {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              "excerpt_sha256": {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              },
              "line_start": {
                "type": "integer",
                "minimum": 1
              },
              "line_end": {
                "type": "integer",
                "minimum": 1
              },
              "observed_at": {
                "type": "string",
                "maxLength": 40,
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T.*(?:Z|[+-]\\d{2}:\\d{2})$"
              },
              "valid_until": {
                "type": "string",
                "maxLength": 40,
                "pattern": "^\\d{4}-\\d{2}-\\d{2}T.*(?:Z|[+-]\\d{2}:\\d{2})$"
              },
              "kind": {
                "type": "string",
                "enum": [
                  "SYNTHETIC_FIXTURE",
                  "CAPTURED_PUBLIC_SOURCE"
                ]
              }
            },
            "required": [
              "ref_id",
              "source_id",
              "url",
              "raw_sha256",
              "text_sha256",
              "headers_sha256",
              "excerpt_sha256",
              "line_start",
              "line_end",
              "observed_at",
              "valid_until",
              "kind"
            ]
          },
          "minItems": 0,
          "maxItems": 40
        }
      },
      "required": [
        "accounts_checked",
        "ats_acceptance_observed",
        "live_system_availability_observed",
        "schema_bytes_available",
        "source_evidence"
      ]
    },
    "checks": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "check_id": {
            "type": "string",
            "maxLength": 100
          },
          "status": {
            "type": "string",
            "enum": [
              "READY",
              "NOT_READY",
              "UNKNOWN",
              "NOT_APPLICABLE"
            ]
          },
          "reason": {
            "type": "string",
            "maxLength": 1200
          },
          "applies_to": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "FIRE",
                "IRIS_PORTAL",
                "IRIS_A2A",
                "THIRD_PARTY"
              ]
            },
            "minItems": 1,
            "maxItems": 4
          },
          "basis": {
            "type": "string",
            "enum": [
              "DECLARED",
              "LOCAL_POLICY",
              "PUBLIC_EVIDENCE",
              "PUBLIC_EVIDENCE_AND_CLOCK",
              "DECLARED_AND_PUBLIC_EVIDENCE",
              "CORPUS_LIMITATION"
            ]
          },
          "rule_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 100
            },
            "minItems": 0,
            "maxItems": 20
          },
          "source_refs": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 120
            },
            "minItems": 0,
            "maxItems": 50
          },
          "detail": {
            "type": "string",
            "maxLength": 1200
          }
        },
        "required": [
          "check_id",
          "status",
          "reason",
          "applies_to",
          "basis",
          "rule_ids",
          "source_refs",
          "detail"
        ]
      },
      "minItems": 1,
      "maxItems": 30
    },
    "channel_paths": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "channel": {
            "type": "string",
            "enum": [
              "FIRE",
              "IRIS_PORTAL",
              "IRIS_A2A",
              "THIRD_PARTY"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "READY",
              "NOT_READY",
              "UNKNOWN",
              "NOT_APPLICABLE"
            ]
          },
          "check_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 100
            },
            "minItems": 0,
            "maxItems": 30
          },
          "readiness_basis": {
            "type": "string",
            "maxLength": 1200
          },
          "production_ready": {
            "const": false
          }
        },
        "required": [
          "channel",
          "status",
          "check_ids",
          "readiness_basis",
          "production_ready"
        ]
      },
      "minItems": 4,
      "maxItems": 4
    },
    "form_routing": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "form_type": {
            "type": "string",
            "enum": [
              "1099-NEC",
              "1099-MISC",
              "1099-K",
              "W-2",
              "W-3"
            ]
          },
          "declared_count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 1000000
          },
          "route": {
            "type": "string",
            "enum": [
              "SSA",
              "IRIS_CHANNEL_REVIEW",
              "UNKNOWN"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "READY",
              "NOT_READY",
              "UNKNOWN",
              "NOT_APPLICABLE"
            ]
          },
          "planning_channels": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "IRIS_PORTAL",
                "IRIS_A2A"
              ]
            },
            "minItems": 0,
            "maxItems": 2
          },
          "reason": {
            "type": "string",
            "maxLength": 1200
          },
          "rule_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 100
            },
            "minItems": 0,
            "maxItems": 20
          },
          "source_refs": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 120
            },
            "minItems": 0,
            "maxItems": 50
          },
          "production_route_verified": {
            "const": false
          }
        },
        "required": [
          "form_type",
          "declared_count",
          "route",
          "status",
          "planning_channels",
          "reason",
          "rule_ids",
          "source_refs",
          "production_route_verified"
        ]
      },
      "minItems": 1,
      "maxItems": 5
    },
    "operational_timeline": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "cutoff_id": {
            "type": "string",
            "enum": [
              "FIRE_TEST",
              "IR_APPLICATION_CHANGES",
              "FIRE_FILING"
            ]
          },
          "published_date": {
            "type": "string",
            "enum": [
              "2026-11-01",
              "2026-11-09",
              "2026-11-19"
            ]
          },
          "published_time": {
            "anyOf": [
              {
                "const": "15:00:00-05:00"
              },
              {
                "type": "null"
              }
            ]
          },
          "timezone": {
            "const": "America/New_York"
          },
          "cutoff_utc": {
            "anyOf": [
              {
                "const": "2026-11-19T20:00:00+00:00"
              },
              {
                "type": "null"
              }
            ]
          },
          "scope": {
            "type": "string",
            "maxLength": 1200
          },
          "automatic_weekend_rollover": {
            "const": false
          },
          "phase": {
            "type": "string",
            "enum": [
              "BEFORE_DAY",
              "ON_PUBLISHED_DAY_TIME_UNSPECIFIED",
              "AFTER_DAY",
              "BEFORE_INSTANT",
              "AT_OR_AFTER_INSTANT"
            ]
          },
          "evidence_status": {
            "type": "string",
            "enum": [
              "READY",
              "UNKNOWN"
            ]
          },
          "reason": {
            "type": "string",
            "maxLength": 1200
          },
          "rule_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 100
            },
            "minItems": 0,
            "maxItems": 20
          },
          "source_refs": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 120
            },
            "minItems": 0,
            "maxItems": 50
          },
          "snapshot_only": {
            "type": "boolean"
          }
        },
        "required": [
          "cutoff_id",
          "published_date",
          "published_time",
          "timezone",
          "cutoff_utc",
          "scope",
          "automatic_weekend_rollover",
          "phase",
          "evidence_status",
          "reason",
          "rule_ids",
          "source_refs",
          "snapshot_only"
        ]
      },
      "minItems": 3,
      "maxItems": 3
    },
    "tcc_processing_guidance": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "typical_processing_business_days": {
          "const": 45
        },
        "status": {
          "type": "string",
          "enum": [
            "READY",
            "UNKNOWN"
          ]
        },
        "reason": {
          "type": "string",
          "maxLength": 1200
        },
        "is_sla": {
          "const": false
        },
        "approval_guaranteed": {
          "const": false
        },
        "guaranteed_approval_date": {
          "const": null
        },
        "scope": {
          "type": "string",
          "maxLength": 1200
        },
        "rule_ids": {
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 100
          },
          "minItems": 0,
          "maxItems": 20
        },
        "source_refs": {
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 120
          },
          "minItems": 0,
          "maxItems": 50
        }
      },
      "required": [
        "typical_processing_business_days",
        "status",
        "reason",
        "is_sla",
        "approval_guaranteed",
        "guaranteed_approval_date",
        "scope",
        "rule_ids",
        "source_refs"
      ]
    },
    "evidence_issues": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "topic": {
            "type": "string",
            "maxLength": 100
          },
          "reason": {
            "type": "string",
            "maxLength": 1200
          },
          "rule_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "maxLength": 100
            },
            "minItems": 0,
            "maxItems": 20
          }
        },
        "required": [
          "topic",
          "reason",
          "rule_ids"
        ]
      },
      "minItems": 0,
      "maxItems": 20
    },
    "missing_prerequisites": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 100
      },
      "minItems": 0,
      "maxItems": 30
    },
    "unknown_items": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 100
      },
      "minItems": 0,
      "maxItems": 30
    },
    "production_xml_validation": {
      "const": "UNSUPPORTED"
    },
    "ssa_efw2_validation": {
      "const": "OUTSIDE_SCOPE"
    },
    "caveats": {
      "type": "array",
      "items": {
        "type": "string",
        "maxLength": 1200
      },
      "minItems": 1,
      "maxItems": 12
    },
    "scope": {
      "const": "PUBLIC_PRODUCTION_SNAPSHOT"
    },
    "fee_eligibility": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "eligible",
        "price_atomic",
        "currency",
        "rule",
        "unknown_overall_no_charge",
        "settlement_claimed"
      ],
      "properties": {
        "eligible": {
          "type": "boolean"
        },
        "price_atomic": {
          "const": "50000"
        },
        "currency": {
          "const": "USDC"
        },
        "rule": {
          "const": "OVERALL_DETERMINATE_READY_NOT_READY_NOT_APPLICABLE"
        },
        "unknown_overall_no_charge": {
          "const": true
        },
        "settlement_claimed": {
          "const": false
        }
      }
    },
    "limitations": {
      "type": "array",
      "minItems": 8,
      "maxItems": 16,
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 512
      }
    }
  },
  "required": [
    "service_version",
    "mode",
    "evaluated_at",
    "tax_year",
    "filing_channel",
    "overall_status",
    "readiness_semantics",
    "declared",
    "observed",
    "checks",
    "channel_paths",
    "form_routing",
    "operational_timeline",
    "tcc_processing_guidance",
    "evidence_issues",
    "missing_prerequisites",
    "unknown_items",
    "production_xml_validation",
    "ssa_efw2_validation",
    "caveats",
    "scope",
    "fee_eligibility",
    "limitations"
  ]
}
