{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://extol.work/attestation/statement/v1/hours-corrected/schema.json",
  "title": "Hours corrected",
  "description": "An organization's operator supersedes an earlier hours-verified attestation with a corrected version. Follows Notary Spec §4.3 additive-supersession convention.",
  "type": "object",
  "required": ["hours", "reporting_period", "activity_description", "org_root_pubkey", "delegation_attestation_reference", "operator_legal_name", "operator_title", "confirmed_at", "teos_status_snapshot", "supersedes_attestation_reference", "correction_reason"],
  "properties": {
    "hours": { "type": "number", "minimum": 0 },
    "reporting_period": {
      "type": "object",
      "required": ["start", "end"],
      "properties": {
        "start": { "type": "string", "format": "date" },
        "end": { "type": "string", "format": "date" }
      }
    },
    "activity_description": { "type": "string" },
    "org_root_pubkey": { "type": "string", "contentEncoding": "base64" },
    "delegation_attestation_reference": { "type": "string", "pattern": "^[0-9a-f]{64}$" },
    "operator_legal_name": { "type": "string" },
    "operator_title": { "type": "string" },
    "confirmed_at": { "type": "string", "format": "date-time" },
    "teos_status_snapshot": {
      "type": "object",
      "required": ["status", "checked_at"],
      "properties": {
        "status": { "type": "string", "enum": ["verified_501c3", "verified_501c4"] },
        "checked_at": { "type": "string", "format": "date-time" }
      }
    },
    "supersedes_attestation_reference": { "type": "string", "pattern": "^[0-9a-f]{64}$", "description": "SHA-256 hex of the superseded hours-verified attestation" },
    "correction_reason": {
      "type": "string",
      "enum": ["data_entry_error", "volunteer_dispute_resolved", "hours_recalculated", "reporting_period_wrong", "other"]
    },
    "correction_narrative": { "type": "string", "description": "Optional explanation of the correction" }
  }
}
