{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://charts.fyi/data/receivership/us-ca-artifact-schemas.json",
  "schemaVersion": 1,
  "sourcePolicy": "first_party_only",
  "artifacts": {
    "acceptanceAudit": "public/data/receivership/us-ca-acceptance-audit.json",
    "artifactHashes": "public/data/receivership/us-ca-artifact-hashes.json",
    "companiesCsv": "public/data/receivership/us-ca-companies.csv",
    "companies": "public/data/receivership/us-ca-companies.json",
    "current": "public/data/receivership/us-ca-current.json",
    "dataDictionary": "public/data/receivership/us-ca-data-dictionary.json",
    "deltaEventsJson": "public/data/receivership/us-ca-delta-events.json",
    "deltaEvents": "public/data/receivership/us-ca-delta-events.ndjson",
    "eventsJson": "public/data/receivership/us-ca-events.json",
    "eventsPages": "public/data/receivership/us-ca-events-pages.json",
    "events": "public/data/receivership/us-ca-events.ndjson",
    "freshness": "public/data/receivership/us-ca-freshness.json",
    "importTemplateBcCsoCsv": "public/data/receivership/us-ca-import-template-bc-cso.csv",
    "importTemplateOntarioCourtsCsv": "public/data/receivership/us-ca-import-template-ontario-courts.csv",
    "importTemplateOsbBiaCsv": "public/data/receivership/us-ca-import-template-osb-bia.csv",
    "importTemplatePacerCourtCsv": "public/data/receivership/us-ca-import-template-pacer-court.csv",
    "importTemplates": "public/data/receivership/us-ca-import-templates.json",
    "manifest": "public/data/receivership/us-ca-manifest.json",
    "productionBlockers": "public/data/receivership/us-ca-production-blockers.json",
    "productionEnvironment": "public/data/receivership/us-ca-production-environment.json",
    "productionRunbook": "public/data/receivership/us-ca-production-runbook.json",
    "releaseAudit": "public/data/receivership/us-ca-release-audit.json",
    "releaseHistory": "public/data/receivership/us-ca-release-history.json",
    "schemas": "public/data/receivership/us-ca-artifact-schemas.json",
    "search": "public/data/receivership/us-ca-search.json",
    "setup": "public/data/receivership/us-ca-production-setup.json",
    "setupPacketMarkdown": "public/data/receivership/us-ca-production-setup-packet.md",
    "sourceDecisionLedgerTemplate": "public/data/receivership/us-ca-source-decision-ledger-template.json",
    "sourceActivation": "public/data/receivership/us-ca-source-activation.json",
    "sourceDecisionPacketMarkdown": "public/data/receivership/us-ca-source-decision-packet.md",
    "sourceHealth": "public/data/receivership/us-ca-source-health.json",
    "sqlite": "public/data/receivership/us-ca-current.sqlite",
    "streamApi": "public/data/receivership/us-ca-stream-api.json",
    "streamCheckpoint": "public/data/receivership/us-ca-stream-checkpoint.json"
  },
  "$defs": {
    "usCaAcceptanceAudit": {
      "type": "object",
      "required": [
        "auditVersion",
        "completionProven",
        "coverage",
        "evidenceCommands",
        "generatedAt",
        "overallStatus",
        "productionReady",
        "requirements",
        "sourcePolicy",
        "summary",
        "targetCountries"
      ],
      "properties": {
        "auditVersion": { "const": 1 },
        "completionProven": { "type": "boolean" },
        "coverage": { "$ref": "#/$defs/usCaCoverage" },
        "evidenceCommands": { "type": "object" },
        "generatedAt": { "type": "string" },
        "overallStatus": {
          "enum": ["blocked_external_setup", "complete", "failed"]
        },
        "productionReady": { "type": "boolean" },
        "requirements": {
          "type": "array",
          "items": { "$ref": "#/$defs/usCaAcceptanceRequirement" }
        },
        "sourcePolicy": { "const": "first_party_only" },
        "summary": { "type": "object" },
        "targetCountries": {
          "type": "array",
          "items": { "enum": ["US", "CA"] }
        }
      }
    },
    "usCaAcceptanceRequirement": {
      "type": "object",
      "required": ["evidence", "id", "status", "summary"],
      "properties": {
        "blockerIds": { "type": "array", "items": { "type": "string" } },
        "evidence": { "type": "object" },
        "id": { "type": "string" },
        "status": { "enum": ["blocked", "failed", "satisfied"] },
        "summary": { "type": "string" }
      }
    },
    "usCaArtifactHashEntry": {
      "type": "object",
      "required": ["bytes", "key", "path", "sha256"],
      "properties": {
        "bytes": { "type": "integer" },
        "key": { "type": "string" },
        "path": { "type": "string" },
        "sha256": { "type": "string" }
      }
    },
    "usCaArtifactHashes": {
      "type": "object",
      "required": [
        "algorithm",
        "artifacts",
        "coverage",
        "generatedAt",
        "hashVersion",
        "sourceManifest",
        "sourcePolicy"
      ],
      "properties": {
        "algorithm": { "const": "sha256" },
        "artifacts": {
          "type": "array",
          "items": { "$ref": "#/$defs/usCaArtifactHashEntry" }
        },
        "coverage": { "$ref": "#/$defs/usCaCoverage" },
        "generatedAt": { "type": "string" },
        "hashVersion": { "const": 1 },
        "rowCounts": { "type": "object" },
        "sourceManifest": {
          "const": "public/data/receivership/us-ca-manifest.json"
        },
        "sourcePolicy": { "const": "first_party_only" }
      }
    },
    "usCaCompanyDatabase": {
      "type": "object",
      "required": [
        "companies",
        "countryCounts",
        "generatedAt",
        "liveCompanies",
        "sourcePolicy",
        "totalCompanies"
      ],
      "properties": {
        "companies": {
          "type": "array",
          "items": { "$ref": "#/$defs/usCaCompanyRecord" }
        },
        "countryCounts": { "type": "object" },
        "coverageNote": { "type": "string" },
        "generatedAt": { "type": "string" },
        "liveCompanies": { "type": "integer" },
        "sourcePolicy": { "const": "first_party_only" },
        "totalCompanies": { "type": "integer" }
      }
    },
    "usCaBudgetGuard": {
      "type": "object",
      "required": [
        "controlsConfigured",
        "cost",
        "enabled",
        "ledgerDate",
        "ledgerPath",
        "observedAt",
        "sourceId",
        "status",
        "usage",
        "warnings"
      ],
      "properties": {
        "controlsConfigured": { "type": "boolean" },
        "cost": { "type": "object" },
        "enabled": { "type": "boolean" },
        "ledgerDate": { "type": "string" },
        "ledgerPath": { "type": "string" },
        "observedAt": { "type": "string" },
        "sourceId": { "type": "string" },
        "status": { "enum": ["configured", "missing_controls", "over_budget"] },
        "usage": { "type": "object" },
        "warnings": { "type": "array", "items": { "type": "string" } }
      }
    },
    "usCaCompanyRecord": {
      "type": "object",
      "required": [
        "canonicalName",
        "caseId",
        "companyName",
        "companyId",
        "country",
        "isLive",
        "legalEntities",
        "primaryLegalEntity",
        "procedure",
        "slug",
        "score"
      ],
      "properties": {
        "canonicalName": { "type": "string" },
        "caseId": { "type": "string" },
        "companyName": { "type": "string" },
        "companyId": { "type": "string" },
        "country": { "enum": ["US", "CA"] },
        "isLive": { "type": "boolean" },
        "isSeedExample": { "type": "boolean" },
        "legalEntities": { "type": "array", "items": { "type": "string" } },
        "primaryLegalEntity": { "type": "string" },
        "score": { "type": "integer" },
        "slug": { "type": "string" }
      }
    },
    "usCaCoverage": {
      "type": "object",
      "required": [
        "asOfDate",
        "basis",
        "blockedSourceIds",
        "liveSourceCoverage",
        "liveSourcesFresh",
        "requiredLiveSourceIds"
      ],
      "properties": {
        "asOfDate": { "type": "string" },
        "basis": { "type": "string" },
        "blockedSourceIds": { "type": "array", "items": { "type": "string" } },
        "liveSourceCoverage": {
          "type": "array",
          "items": { "$ref": "#/$defs/usCaSourceCoverage" }
        },
        "liveSourcesFresh": { "type": "boolean" },
        "requiredLiveSourceIds": {
          "type": "array",
          "items": { "type": "string" }
        }
      }
    },
    "usCaCoverageSegment": {
      "type": "object",
      "required": [
        "billable",
        "blockers",
        "country",
        "description",
        "implemented",
        "requiredForProductionCoverage",
        "segmentId",
        "setupRequirementIds",
        "sourceIds",
        "sources",
        "status"
      ],
      "properties": {
        "billable": { "type": "boolean" },
        "blockers": {
          "type": "array",
          "items": { "$ref": "#/$defs/usCaCoverageSegmentBlocker" }
        },
        "country": { "enum": ["US", "CA"] },
        "description": { "type": "string" },
        "implemented": { "type": "boolean" },
        "onboarding": { "$ref": "#/$defs/usCaSourceOnboarding" },
        "requiredForProductionCoverage": { "type": "boolean" },
        "segmentId": { "type": "string" },
        "setupRequirementIds": {
          "type": "array",
          "items": { "type": "string" }
        },
        "sourceIds": { "type": "array", "items": { "type": "string" } },
        "sources": {
          "type": "array",
          "items": { "$ref": "#/$defs/usCaCoverageSegmentSource" }
        },
        "status": {
          "enum": [
            "blocked",
            "credentials_required",
            "implementation_required",
            "live",
            "terms_review"
          ]
        }
      }
    },
    "usCaCoverageSegmentBlocker": {
      "type": "object",
      "required": ["actionRequired", "sourceId", "status"],
      "properties": {
        "actionRequired": { "type": "string" },
        "sourceId": { "type": "string" },
        "status": { "type": "string" }
      }
    },
    "usCaCoverageSegmentSource": {
      "type": "object",
      "required": ["freshness", "sourceId", "status"],
      "properties": {
        "actionRequired": { "type": "string" },
        "freshness": { "type": "string" },
        "sourceId": { "type": "string" },
        "sourceName": { "type": "string" },
        "sourceStatus": { "type": "string" },
        "status": { "type": "string" }
      }
    },
    "usCaDataDictionary": {
      "type": "object",
      "required": [
        "artifacts",
        "companyDatabase",
        "coverage",
        "database",
        "dictionaryVersion",
        "generatedAt",
        "regressionChecks",
        "rowCounts",
        "sourcePolicy",
        "stream",
        "targetCountries"
      ],
      "properties": {
        "artifacts": { "type": "object" },
        "companyDatabase": {
          "type": "object",
          "required": ["csvColumns", "formats", "primaryKey", "rowGrain"],
          "properties": {
            "csvColumns": { "type": "array" },
            "formats": { "type": "object" },
            "primaryKey": { "const": "companyId" },
            "rowGrain": { "type": "string" }
          }
        },
        "coverage": {
          "type": "object",
          "required": [
            "asOfDate",
            "blockedSourceIds",
            "liveSourcesFresh",
            "minimumCoverageDate",
            "productionReady",
            "requiredLiveSourceIds"
          ],
          "properties": {
            "asOfDate": { "type": "string" },
            "blockedSourceIds": { "type": "array" },
            "liveSourcesFresh": { "type": "boolean" },
            "minimumCoverageDate": { "const": "2026-07-05" },
            "productionReady": { "type": "boolean" },
            "requiredLiveSourceIds": { "type": "array" }
          }
        },
        "database": {
          "type": "object",
          "required": ["ftsTable", "primaryTable", "schemaVersion", "tables"],
          "properties": {
            "ftsTable": { "const": "company_search_fts" },
            "primaryTable": { "const": "companies" },
            "schemaVersion": { "const": 21 },
            "tables": {
              "type": "array",
              "items": {
                "enum": [
                  "acceptance_requirement_blockers",
                  "acceptance_requirements",
                  "business_categories",
                  "cases",
                  "classification_evidence",
                  "companies",
                  "current_acceptance_status",
                  "current_import_template_readiness",
                  "current_raw_snapshot_readiness",
                  "current_source_activation",
                  "current_coverage_gaps",
                  "current_source_refresh_state",
                  "current_source_readiness",
                  "current_stream_status",
                  "coverage_segment_blockers",
                  "coverage_segment_sources",
                  "coverage_segments",
                  "company_events",
                  "company_legal_entities",
                  "company_search_fts",
                  "deadlines",
                  "evidence",
                  "legal_entities",
                  "latest_release_source_health",
                  "live_companies",
                  "metadata",
                  "opportunity_reasons",
                  "opportunity_warnings",
                  "production_environment_inputs",
                  "production_setup_requirements",
                  "production_blockers",
                  "raw_source_snapshots",
                  "release_audit",
                  "release_delta_events",
                  "release_history",
                  "release_source_health",
                  "stream_events",
                  "source_activation_ready_when",
                  "source_activation_steps",
                  "source_import_template_fields",
                  "source_import_templates",
                  "source_official_references",
                  "source_verification_commands",
                  "source_health",
                  "source_refresh_state",
                  "sources"
                ]
              },
              "minItems": 46,
              "maxItems": 46,
              "uniqueItems": true
            }
          }
        },
        "dictionaryVersion": { "const": 1 },
        "generatedAt": { "type": "string" },
        "regressionChecks": { "type": "object" },
        "rowCounts": { "type": "object" },
        "sourcePolicy": { "const": "first_party_only" },
        "stream": { "type": "object" },
        "targetCountries": {
          "type": "array",
          "items": { "enum": ["US", "CA"] }
        }
      }
    },
    "usCaDataset": {
      "type": "object",
      "required": [
        "cases",
        "generatedAt",
        "sourceHealth",
        "sourcePolicy",
        "sourceRegistry"
      ],
      "properties": {
        "cases": { "type": "array" },
        "coverageNote": { "type": "string" },
        "generatedAt": { "type": "string" },
        "seedNotice": { "type": "string" },
        "sourceHealth": { "type": "array" },
        "sourcePolicy": { "const": "first_party_only" },
        "sourceRegistry": { "type": "array" }
      }
    },
    "usCaImportTemplates": {
      "type": "object",
      "required": [
        "acceptedFormats",
        "generatedAt",
        "purpose",
        "sourcePolicy",
        "templateVersion",
        "templates"
      ],
      "properties": {
        "acceptedFormats": {
          "type": "array",
          "items": { "enum": ["csv", "json", "ndjson"] }
        },
        "artifacts": { "type": "object" },
        "generatedAt": { "type": "string" },
        "purpose": { "type": "string" },
        "sourcePolicy": { "const": "first_party_only" },
        "templateVersion": { "const": 1 },
        "templates": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "acceptedFormats",
              "activationEnv",
              "exampleFiles",
              "exampleRows",
              "fields",
              "importPathEnv",
              "rowSelection",
              "setupId",
              "sourceId",
              "title"
            ],
            "properties": {
              "acceptedFormats": { "type": "array" },
              "activationEnv": { "type": "object" },
              "exampleFiles": { "type": "object" },
              "exampleRows": { "type": "array" },
              "fields": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "aliases",
                    "description",
                    "name",
                    "required",
                    "type"
                  ],
                  "properties": {
                    "aliases": { "type": "array" },
                    "description": { "type": "string" },
                    "name": { "type": "string" },
                    "required": { "type": "boolean" },
                    "type": { "type": "string" }
                  }
                }
              },
              "importPathEnv": { "type": "string" },
              "rowSelection": { "type": "string" },
              "setupId": { "type": "string" },
              "sourceId": { "type": "string" },
              "title": { "type": "string" }
            }
          }
        }
      }
    },
    "usCaEventRecord": {
      "type": "object",
      "required": [
        "canonicalName",
        "caseId",
        "companyName",
        "companyId",
        "country",
        "eventId",
        "eventSequence",
        "eventTime",
        "eventType",
        "feedVersion",
        "generatedAt",
        "isLive",
        "legalEntities",
        "sourceArtifact",
        "sourcePolicy"
      ],
      "properties": {
        "canonicalName": { "type": "string" },
        "caseId": { "type": "string" },
        "companyName": { "type": "string" },
        "companyId": { "type": "string" },
        "country": { "enum": ["US", "CA"] },
        "eventId": { "type": "string" },
        "eventSequence": { "type": "integer" },
        "eventTime": { "type": "string" },
        "eventType": { "const": "receivership_company_snapshot" },
        "feedVersion": { "const": 1 },
        "generatedAt": { "type": "string" },
        "isLive": { "type": "boolean" },
        "legalEntities": { "type": "array", "items": { "type": "string" } },
        "sourceArtifact": {
          "const": "public/data/receivership/us-ca-companies.json"
        },
        "sourcePolicy": { "const": "first_party_only" }
      }
    },
    "usCaDeltaEventRecord": {
      "type": "object",
      "required": [
        "canonicalName",
        "caseId",
        "change",
        "changedFields",
        "companyName",
        "companyId",
        "country",
        "eventId",
        "eventSequence",
        "eventTime",
        "eventType",
        "feedVersion",
        "generatedAt",
        "releaseAuditArtifact",
        "releaseChangeStatus",
        "sourceArtifact",
        "sourcePolicy"
      ],
      "properties": {
        "after": { "type": ["object", "null"] },
        "before": { "type": ["object", "null"] },
        "canonicalName": { "type": "string" },
        "caseId": { "type": "string" },
        "change": { "enum": ["added", "changed", "removed"] },
        "changedFields": { "type": "array" },
        "companyName": { "type": "string" },
        "companyId": { "type": "string" },
        "country": { "enum": ["US", "CA"] },
        "eventId": { "type": "string" },
        "eventSequence": { "type": "integer" },
        "eventTime": { "type": "string" },
        "eventType": {
          "enum": [
            "receivership_company_added",
            "receivership_company_changed",
            "receivership_company_removed"
          ]
        },
        "feedVersion": { "const": 1 },
        "generatedAt": { "type": "string" },
        "releaseAuditArtifact": {
          "const": "public/data/receivership/us-ca-release-audit.json"
        },
        "releaseChangeStatus": { "type": "string" },
        "sourceArtifact": {
          "const": "public/data/receivership/us-ca-release-audit.json"
        },
        "sourcePolicy": { "const": "first_party_only" }
      }
    },
    "usCaDeltaEventFeed": {
      "type": "object",
      "required": [
        "coverage",
        "deltaFeedVersion",
        "eventTypes",
        "events",
        "feedVersion",
        "generatedAt",
        "releaseAuditArtifact",
        "releaseChangeStatus",
        "sourcePolicy",
        "totalEvents"
      ],
      "properties": {
        "coverage": { "$ref": "#/$defs/usCaCoverage" },
        "deltaFeedVersion": { "const": 1 },
        "eventTypes": {
          "type": "array",
          "items": {
            "enum": [
              "receivership_company_added",
              "receivership_company_changed",
              "receivership_company_removed"
            ]
          }
        },
        "events": {
          "type": "array",
          "items": { "$ref": "#/$defs/usCaDeltaEventRecord" }
        },
        "feedVersion": { "const": 1 },
        "generatedAt": { "type": "string" },
        "releaseAuditArtifact": {
          "const": "public/data/receivership/us-ca-release-audit.json"
        },
        "releaseChangeStatus": { "type": "string" },
        "sourcePolicy": { "const": "first_party_only" },
        "totalEvents": { "type": "integer" }
      }
    },
    "usCaEventPage": {
      "type": "object",
      "required": [
        "coverage",
        "eventPageVersion",
        "eventTypes",
        "eventSequenceScope",
        "events",
        "feedVersion",
        "generatedAt",
        "highWatermark",
        "liveEvents",
        "lowWatermark",
        "ndjsonArtifact",
        "page",
        "sourcePolicy",
        "streamApiArtifact",
        "totalEvents"
      ],
      "properties": {
        "coverage": { "$ref": "#/$defs/usCaCoverage" },
        "eventPageVersion": { "const": 1 },
        "eventTypes": {
          "type": "array",
          "items": { "const": "receivership_company_snapshot" }
        },
        "eventSequenceScope": { "const": "per_snapshot_newest_first_position" },
        "events": {
          "type": "array",
          "items": { "$ref": "#/$defs/usCaEventRecord" }
        },
        "feedVersion": { "const": 1 },
        "generatedAt": { "type": "string" },
        "highWatermark": { "type": "object" },
        "liveEvents": { "type": "integer" },
        "lowWatermark": { "type": "object" },
        "ndjsonArtifact": {
          "const": "public/data/receivership/us-ca-events.ndjson"
        },
        "nextPage": { "type": ["object", "null"] },
        "page": { "type": "object" },
        "pageSize": { "type": "integer" },
        "pagesIndexArtifact": {
          "const": "public/data/receivership/us-ca-events-pages.json"
        },
        "sourcePolicy": { "const": "first_party_only" },
        "streamApiArtifact": {
          "const": "public/data/receivership/us-ca-stream-api.json"
        },
        "totalEvents": { "type": "integer" }
      }
    },
    "usCaEventPagesIndex": {
      "type": "object",
      "required": [
        "coverage",
        "eventPagesVersion",
        "eventTypes",
        "eventSequenceScope",
        "feedVersion",
        "fullJsonArtifact",
        "generatedAt",
        "highWatermark",
        "liveEvents",
        "lowWatermark",
        "ndjsonArtifact",
        "pageSize",
        "pages",
        "sourcePolicy",
        "streamApiArtifact",
        "totalEvents",
        "totalPages"
      ],
      "properties": {
        "coverage": { "$ref": "#/$defs/usCaCoverage" },
        "eventPagesVersion": { "const": 1 },
        "eventTypes": {
          "type": "array",
          "items": { "const": "receivership_company_snapshot" }
        },
        "eventSequenceScope": { "const": "per_snapshot_newest_first_position" },
        "feedVersion": { "const": 1 },
        "fullJsonArtifact": {
          "const": "public/data/receivership/us-ca-events.json"
        },
        "generatedAt": { "type": "string" },
        "highWatermark": { "type": "object" },
        "liveEvents": { "type": "integer" },
        "lowWatermark": { "type": "object" },
        "ndjsonArtifact": {
          "const": "public/data/receivership/us-ca-events.ndjson"
        },
        "pageSize": { "const": 50 },
        "pages": {
          "type": "array",
          "items": { "$ref": "#/$defs/usCaEventPagesIndexEntry" }
        },
        "sourcePolicy": { "const": "first_party_only" },
        "streamApiArtifact": {
          "const": "public/data/receivership/us-ca-stream-api.json"
        },
        "totalEvents": { "type": "integer" },
        "totalPages": { "type": "integer" }
      }
    },
    "usCaEventPagesIndexEntry": {
      "type": "object",
      "required": [
        "artifactPath",
        "eventCount",
        "firstEventSequence",
        "href",
        "lastEventSequence",
        "pageNumber"
      ],
      "properties": {
        "artifactPath": { "type": "string" },
        "eventCount": { "type": "integer" },
        "firstEventSequence": { "type": ["integer", "null"] },
        "href": { "type": "string" },
        "lastEventSequence": { "type": ["integer", "null"] },
        "pageNumber": { "type": "integer" }
      }
    },
    "usCaFreshnessSource": {
      "type": "object",
      "required": [
        "fetchedRows",
        "freshness",
        "isProductionCritical",
        "isRequiredLiveSource",
        "liveCases",
        "liveCompanyRows",
        "sourceId",
        "status"
      ],
      "properties": {
        "actionRequired": { "type": "string" },
        "activationRequired": { "type": "boolean" },
        "coverageDate": { "type": "string" },
        "cursorKind": { "type": "string" },
        "cursorTime": { "type": "string" },
        "cursorValue": { "type": "string" },
        "fetchedRows": { "type": "integer" },
        "freshness": { "type": "string" },
        "isProductionCritical": { "type": "boolean" },
        "isRequiredLiveSource": { "type": "boolean" },
        "latestPublishedAt": { "type": "string" },
        "liveCases": { "type": "integer" },
        "liveCompanyRows": { "type": "integer" },
        "nextExpectedRefreshAt": { "type": ["string", "null"] },
        "observedAt": { "type": "string" },
        "rawSnapshotPath": { "type": ["string", "null"] },
        "refreshReady": { "type": "boolean" },
        "sourceId": { "type": "string" },
        "staleAfterHours": { "type": "number" },
        "staleAt": { "type": "string" },
        "status": { "type": "string" },
        "windowEndDate": { "type": ["string", "null"] },
        "windowStartDate": { "type": ["string", "null"] }
      }
    },
    "usCaFreshnessStatus": {
      "type": "object",
      "required": [
        "artifacts",
        "coverage",
        "freshnessVersion",
        "generatedAt",
        "monitors",
        "rowCounts",
        "serviceLevel",
        "sourcePolicy",
        "sources",
        "status"
      ],
      "properties": {
        "artifacts": { "type": "object" },
        "coverage": { "$ref": "#/$defs/usCaCoverage" },
        "freshnessVersion": { "const": 1 },
        "generatedAt": { "type": "string" },
        "monitors": { "type": "array" },
        "rowCounts": { "type": "object" },
        "serviceLevel": { "type": "object" },
        "sourcePolicy": { "const": "first_party_only" },
        "sources": {
          "type": "array",
          "items": { "$ref": "#/$defs/usCaFreshnessSource" }
        },
        "status": {
          "enum": [
            "fresh_live_feeds_with_production_blockers",
            "production_ready",
            "stale_required_live_sources"
          ]
        }
      }
    },
    "usCaProductionEnvironment": {
      "type": "object",
      "required": [
        "deploymentTarget",
        "environmentVersion",
        "generatedAt",
        "github",
        "productionReady",
        "sourcePolicy",
        "sources",
        "status",
        "summary",
        "verificationCommands"
      ],
      "properties": {
        "deploymentTarget": { "const": "github_actions" },
        "environmentVersion": { "const": 1 },
        "generatedAt": { "type": "string" },
        "github": { "type": "object" },
        "productionReady": { "type": "boolean" },
        "sourcePolicy": { "const": "first_party_only" },
        "sources": {
          "type": "array",
          "items": { "$ref": "#/$defs/usCaProductionEnvironmentSource" }
        },
        "status": { "enum": ["blocked_external_setup", "production_ready"] },
        "summary": { "type": "object" },
        "verificationCommands": { "type": "object" }
      }
    },
    "usCaProductionEnvironmentSource": {
      "type": "object",
      "required": [
        "actionRequired",
        "billable",
        "category",
        "implemented",
        "inputs",
        "missingRequiredSecrets",
        "missingRequiredVariables",
        "ready",
        "setupId",
        "sourceFreshness",
        "sourceId",
        "sourceName",
        "status",
        "verificationCommands"
      ],
      "properties": {
        "accountUrl": { "type": "string" },
        "actionRequired": { "type": "string" },
        "billable": { "type": "boolean" },
        "budgetGuard": { "type": "object" },
        "category": { "type": "string" },
        "implemented": { "type": "boolean" },
        "inputs": { "type": "array" },
        "missingRequiredSecrets": {
          "type": "array",
          "items": { "type": "string" }
        },
        "missingRequiredVariables": {
          "type": "array",
          "items": { "type": "string" }
        },
        "ready": { "type": "boolean" },
        "setupId": { "type": "string" },
        "sourceFreshness": { "type": "string" },
        "sourceId": { "type": "string" },
        "sourceName": { "type": "string" },
        "status": { "type": "string" },
        "verificationCommands": {
          "type": "array",
          "items": { "type": "string" }
        }
      }
    },
    "usCaProductionRunbook": {
      "type": "object",
      "required": [
        "artifacts",
        "generatedAt",
        "github",
        "importHandoff",
        "productionReady",
        "releaseChecklist",
        "runbookVersion",
        "sequence",
        "sourceDecisionLedger",
        "sourcePolicy",
        "sources",
        "status",
        "summary",
        "targetCountries",
        "verificationCommands"
      ],
      "properties": {
        "artifacts": { "type": "object" },
        "generatedAt": { "type": "string" },
        "github": { "type": "object" },
        "importHandoff": { "type": "object" },
        "productionReady": { "type": "boolean" },
        "releaseChecklist": { "type": "array", "items": { "type": "object" } },
        "runbookVersion": { "const": 1 },
        "sequence": { "type": "array", "items": { "type": "object" } },
        "sourceDecisionLedger": { "type": "object" },
        "sourcePolicy": { "const": "first_party_only" },
        "sources": { "type": "array", "items": { "type": "object" } },
        "status": { "enum": ["blocked_external_setup", "production_ready"] },
        "summary": { "type": "object" },
        "targetCountries": {
          "type": "array",
          "items": { "enum": ["US", "CA"] }
        },
        "verificationCommands": { "type": "object" }
      }
    },
    "usCaReleaseAuditCompanyRef": {
      "type": "object",
      "required": [
        "canonicalName",
        "caseId",
        "companyId",
        "country",
        "filingDate",
        "isLive",
        "petitionDate",
        "primarySourceId",
        "procedure",
        "score",
        "stage"
      ],
      "properties": {
        "canonicalName": { "type": "string" },
        "caseId": { "type": "string" },
        "companyId": { "type": "string" },
        "country": { "enum": ["US", "CA"] },
        "filingDate": { "type": ["string", "null"] },
        "isLive": { "type": "boolean" },
        "petitionDate": { "type": ["string", "null"] },
        "primarySourceId": { "type": ["string", "null"] },
        "procedure": { "type": "string" },
        "score": { "type": "integer" },
        "stage": { "type": "string" }
      }
    },
    "usCaReleaseAudit": {
      "type": "object",
      "required": [
        "artifacts",
        "changeStatus",
        "comparison",
        "coverage",
        "current",
        "deltaCounts",
        "generatedAt",
        "previous",
        "releaseAuditVersion",
        "sourcePolicy",
        "stream",
        "summary",
        "targetCountries"
      ],
      "properties": {
        "artifacts": { "type": "object" },
        "changeStatus": {
          "enum": ["changed", "initial_snapshot", "no_stable_company_changes"]
        },
        "comparison": {
          "type": "object",
          "required": [
            "addedCompanies",
            "changedCompanies",
            "ignoredFields",
            "previousArtifactAvailable",
            "removedCompanies",
            "stableFields"
          ],
          "properties": {
            "addedCompanies": {
              "type": "array",
              "items": { "$ref": "#/$defs/usCaReleaseAuditCompanyRef" }
            },
            "changedCompanies": { "type": "array" },
            "ignoredFields": { "type": "array", "items": { "type": "string" } },
            "previousArtifactAvailable": { "type": "boolean" },
            "removedCompanies": {
              "type": "array",
              "items": { "$ref": "#/$defs/usCaReleaseAuditCompanyRef" }
            },
            "stableFields": { "type": "array", "items": { "type": "string" } }
          }
        },
        "coverage": { "$ref": "#/$defs/usCaCoverage" },
        "current": { "type": "object" },
        "deltaCounts": { "type": "object" },
        "generatedAt": { "type": "string" },
        "previous": { "type": "object" },
        "releaseAuditVersion": { "const": 1 },
        "sourcePolicy": { "const": "first_party_only" },
        "stream": { "type": "object" },
        "summary": { "type": "object" },
        "targetCountries": {
          "type": "array",
          "items": { "enum": ["US", "CA"] }
        }
      }
    },
    "usCaReleaseHistory": {
      "type": "object",
      "required": [
        "artifacts",
        "generatedAt",
        "historyVersion",
        "latestRelease",
        "releases",
        "retention",
        "sourcePolicy",
        "summary",
        "targetCountries"
      ],
      "properties": {
        "artifacts": { "type": "object" },
        "generatedAt": { "type": "string" },
        "historyVersion": { "const": 1 },
        "latestRelease": { "$ref": "#/$defs/usCaReleaseHistoryLatestEntry" },
        "releases": {
          "type": "array",
          "items": { "$ref": "#/$defs/usCaReleaseHistoryEntry" }
        },
        "retention": { "$ref": "#/$defs/usCaReleaseHistoryRetention" },
        "sourcePolicy": { "const": "first_party_only" },
        "summary": { "$ref": "#/$defs/usCaReleaseHistorySummary" },
        "targetCountries": {
          "type": "array",
          "items": { "enum": ["US", "CA"] }
        }
      }
    },
    "usCaReleaseHistoryEntry": {
      "type": "object",
      "required": [
        "blockedSourceIds",
        "changeStatus",
        "countryCounts",
        "coverageAsOfDate",
        "generatedAt",
        "highWatermark",
        "liveCases",
        "liveCompanies",
        "liveSourceCounts",
        "lowWatermark",
        "productionReady",
        "releaseAuditArtifact",
        "releaseDelta",
        "sourcePolicy",
        "status",
        "totalCases",
        "totalCompanies",
        "totalEvents"
      ],
      "properties": {
        "blockedSourceIds": { "type": "array", "items": { "type": "string" } },
        "changeStatus": {
          "enum": ["changed", "initial_snapshot", "no_stable_company_changes"]
        },
        "countryCounts": { "type": "object" },
        "coverageAsOfDate": { "type": "string" },
        "generatedAt": { "type": "string" },
        "highWatermark": { "type": "object" },
        "liveCases": { "type": "integer" },
        "liveCompanies": { "type": "integer" },
        "liveSourceCounts": { "type": "object" },
        "lowWatermark": { "type": "object" },
        "productionReady": { "type": "boolean" },
        "releaseAuditArtifact": {
          "const": "public/data/receivership/us-ca-release-audit.json"
        },
        "releaseDelta": { "$ref": "#/$defs/usCaReleaseHistoryDelta" },
        "sourceHealthSummary": {
          "$ref": "#/$defs/usCaReleaseHistorySourceHealthSummary"
        },
        "sourcePolicy": { "const": "first_party_only" },
        "status": {
          "enum": [
            "fresh_live_feeds_with_production_blockers",
            "production_ready"
          ]
        },
        "totalCases": { "type": "integer" },
        "totalCompanies": { "type": "integer" },
        "totalEvents": { "type": "integer" }
      }
    },
    "usCaReleaseHistoryLatestEntry": {
      "type": "object",
      "required": [
        "blockedSourceIds",
        "changeStatus",
        "countryCounts",
        "coverageAsOfDate",
        "generatedAt",
        "highWatermark",
        "liveCases",
        "liveCompanies",
        "liveSourceCounts",
        "lowWatermark",
        "productionReady",
        "releaseAuditArtifact",
        "releaseDelta",
        "sourceHealthSummary",
        "sourcePolicy",
        "status",
        "totalCases",
        "totalCompanies",
        "totalEvents"
      ],
      "properties": {
        "blockedSourceIds": { "type": "array", "items": { "type": "string" } },
        "changeStatus": {
          "enum": ["changed", "initial_snapshot", "no_stable_company_changes"]
        },
        "countryCounts": { "type": "object" },
        "coverageAsOfDate": { "type": "string" },
        "generatedAt": { "type": "string" },
        "highWatermark": { "type": "object" },
        "liveCases": { "type": "integer" },
        "liveCompanies": { "type": "integer" },
        "liveSourceCounts": { "type": "object" },
        "lowWatermark": { "type": "object" },
        "productionReady": { "type": "boolean" },
        "releaseAuditArtifact": {
          "const": "public/data/receivership/us-ca-release-audit.json"
        },
        "releaseDelta": { "$ref": "#/$defs/usCaReleaseHistoryDelta" },
        "sourceHealthSummary": {
          "$ref": "#/$defs/usCaReleaseHistorySourceHealthSummary"
        },
        "sourcePolicy": { "const": "first_party_only" },
        "status": {
          "enum": [
            "fresh_live_feeds_with_production_blockers",
            "production_ready"
          ]
        },
        "totalCases": { "type": "integer" },
        "totalCompanies": { "type": "integer" },
        "totalEvents": { "type": "integer" }
      }
    },
    "usCaReleaseHistoryDelta": {
      "type": "object",
      "required": ["addedCompanies", "changedCompanies", "removedCompanies"],
      "properties": {
        "addedCompanies": { "type": "integer" },
        "changedCompanies": { "type": "integer" },
        "removedCompanies": { "type": "integer" }
      }
    },
    "usCaReleaseHistoryRetention": {
      "type": "object",
      "required": ["maxReleases", "sort"],
      "properties": {
        "maxReleases": { "const": 100 },
        "sort": { "const": "generatedAt_desc" }
      }
    },
    "usCaReleaseHistorySummary": {
      "type": "object",
      "required": [
        "earliestGeneratedAt",
        "latestGeneratedAt",
        "latestStatus",
        "productionReadyReleases",
        "retainedReleases",
        "totalAddedCompanies",
        "totalChangedCompanies",
        "totalRemovedCompanies"
      ],
      "properties": {
        "earliestGeneratedAt": { "type": ["string", "null"] },
        "latestGeneratedAt": { "type": "string" },
        "latestStatus": {
          "enum": [
            "fresh_live_feeds_with_production_blockers",
            "production_ready"
          ]
        },
        "productionReadyReleases": { "type": "integer" },
        "retainedReleases": { "type": "integer" },
        "totalAddedCompanies": { "type": "integer" },
        "totalChangedCompanies": { "type": "integer" },
        "totalRemovedCompanies": { "type": "integer" }
      }
    },
    "usCaReleaseHistorySourceHealthSummary": {
      "type": "object",
      "required": [
        "blockedSourceIds",
        "blockedSources",
        "byStatus",
        "freshLiveSourceIds",
        "freshLiveSources",
        "liveSourcesFresh",
        "productionCriticalSourceIds",
        "requiredLiveSourceIds",
        "sources",
        "totalSources"
      ],
      "properties": {
        "blockedSourceIds": { "type": "array", "items": { "type": "string" } },
        "blockedSources": { "type": "integer" },
        "byStatus": { "type": "object" },
        "freshLiveSourceIds": {
          "type": "array",
          "items": { "type": "string" }
        },
        "freshLiveSources": { "type": "integer" },
        "liveSourcesFresh": { "type": "boolean" },
        "productionCriticalSourceIds": {
          "type": "array",
          "items": { "type": "string" }
        },
        "requiredLiveSourceIds": {
          "type": "array",
          "items": { "type": "string" }
        },
        "sources": {
          "type": "array",
          "items": { "$ref": "#/$defs/usCaReleaseHistorySourceHealthSource" }
        },
        "totalSources": { "type": "integer" }
      }
    },
    "usCaReleaseHistorySourceHealthSource": {
      "type": "object",
      "required": [
        "detailMetrics",
        "fetchedRows",
        "freshnessStatus",
        "observedAt",
        "rawSnapshotPath",
        "sourceId",
        "status"
      ],
      "properties": {
        "detailMetrics": {
          "$ref": "#/$defs/usCaReleaseHistorySourceHealthDetailMetrics"
        },
        "fetchedRows": { "type": "integer" },
        "freshnessStatus": { "type": "string" },
        "observedAt": { "type": "string" },
        "rawSnapshotPath": { "type": ["string", "null"] },
        "sourceId": { "type": "string" },
        "status": { "type": "string" }
      }
    },
    "usCaReleaseHistorySourceHealthDetailMetrics": {
      "type": "object",
      "required": [
        "failedFeeds",
        "feedRuns",
        "itemsRead",
        "latestPublishedAt",
        "duplicateOpeningPetitionCandidates",
        "openingPetitionCandidates",
        "successfulFeeds",
        "windowedItems"
      ],
      "properties": {
        "failedFeeds": { "type": ["number", "null"] },
        "feedRuns": { "type": ["number", "null"] },
        "itemsRead": { "type": ["number", "null"] },
        "latestPublishedAt": { "type": ["string", "null"] },
        "duplicateOpeningPetitionCandidates": { "type": ["number", "null"] },
        "openingPetitionCandidates": { "type": ["number", "null"] },
        "successfulFeeds": { "type": ["number", "null"] },
        "windowedItems": { "type": ["number", "null"] }
      }
    },
    "usCaManifest": {
      "type": "object",
      "required": [
        "artifacts",
        "blockers",
        "consumerChecks",
        "coverage",
        "coverageSegments",
        "database",
        "generatedAt",
        "liveCases",
        "productionReady",
        "refreshScope",
        "release",
        "sourcePolicy",
        "status",
        "stream",
        "totalCases"
      ],
      "properties": {
        "artifacts": { "type": "object" },
        "blockers": { "type": "array" },
        "consumerChecks": { "$ref": "#/$defs/usCaManifestConsumerChecks" },
        "coverage": { "$ref": "#/$defs/usCaCoverage" },
        "coverageSegments": {
          "type": "array",
          "items": { "$ref": "#/$defs/usCaCoverageSegment" }
        },
        "database": { "$ref": "#/$defs/usCaManifestDatabase" },
        "generatedAt": { "type": "string" },
        "liveCases": { "type": "integer" },
        "productionReady": { "type": "boolean" },
        "refreshScope": { "enum": ["global", "us-ca"] },
        "release": { "$ref": "#/$defs/usCaManifestRelease" },
        "sourcePolicy": { "const": "first_party_only" },
        "status": { "type": "string" },
        "stream": { "$ref": "#/$defs/usCaManifestStream" },
        "totalCases": { "type": "integer" }
      }
    },
    "usCaManifestConsumerChecks": {
      "type": "object",
      "required": [
        "acceptanceAudit",
        "artifactHashes",
        "artifactSchemas",
        "bcCso",
        "config",
        "countryGuide",
        "dozr",
        "export",
        "freshness",
        "githubEnvironment",
        "importTemplates",
        "lineage",
        "onboarding",
        "preflight",
        "productionBlockers",
        "productionBlockerIssue",
        "productionEnvironment",
        "productionRunbook",
        "rawSnapshots",
        "releaseAudit",
        "releaseHistory",
        "search",
        "setupPacket",
        "sourceDecisionLedger",
        "sourceDecisionLedgerTemplate",
        "sourceDecisionPacket",
        "sqlite",
        "sourceActivation",
        "sourceHealth",
        "stream",
        "verifier"
      ],
      "properties": {
        "acceptanceAudit": {
          "const": "npm run check:receivership:us-ca:acceptance"
        },
        "artifactHashes": {
          "const": "npm run check:receivership:us-ca:artifact-hashes"
        },
        "artifactSchemas": {
          "const": "npm run check:receivership:us-ca:artifact-schemas"
        },
        "bcCso": { "const": "npm run check:receivership:us-ca:bc-cso" },
        "config": { "const": "npm run check:receivership:us-ca:config" },
        "countryGuide": { "const": "npm run check:receivership:country-guide" },
        "dozr": { "const": "npm run check:receivership:us-ca:dozr" },
        "export": { "const": "npm run check:receivership:us-ca:export" },
        "freshness": { "const": "npm run check:receivership:us-ca:freshness" },
        "githubEnvironment": {
          "const": "npm run check:receivership:us-ca:github-env"
        },
        "importTemplates": {
          "const": "npm run check:receivership:us-ca:import-templates"
        },
        "lineage": { "const": "npm run check:receivership:us-ca:lineage" },
        "onboarding": {
          "const": "npm run check:receivership:us-ca:onboarding"
        },
        "preflight": { "const": "npm run check:receivership:us-ca" },
        "productionBlockers": {
          "const": "npm run check:receivership:us-ca:blockers"
        },
        "productionBlockerIssue": {
          "const": "npm run check:receivership:us-ca:production-blocker-issue"
        },
        "productionEnvironment": {
          "const": "npm run check:receivership:us-ca:production-env"
        },
        "productionRunbook": {
          "const": "npm run check:receivership:us-ca:runbook"
        },
        "rawSnapshots": {
          "const": "npm run check:receivership:us-ca:raw-snapshots"
        },
        "releaseAudit": {
          "const": "npm run check:receivership:us-ca:release-audit"
        },
        "releaseHistory": {
          "const": "npm run check:receivership:us-ca:release-history"
        },
        "search": { "const": "npm run check:receivership:us-ca:search" },
        "setupPacket": {
          "const": "npm run check:receivership:us-ca:setup-packet"
        },
        "sourceDecisionLedger": {
          "const": "npm run check:receivership:us-ca:source-decision-ledger"
        },
        "sourceDecisionLedgerTemplate": {
          "const": "npm run check:receivership:us-ca:source-decision-ledger-template"
        },
        "sourceDecisionPacket": {
          "const": "npm run check:receivership:us-ca:source-decision-packet"
        },
        "sqlite": { "const": "npm run check:receivership:us-ca:sqlite" },
        "sourceActivation": {
          "const": "npm run check:receivership:us-ca:source-activation"
        },
        "sourceHealth": {
          "const": "npm run check:receivership:us-ca:source-health"
        },
        "stream": { "const": "npm run check:receivership:us-ca:stream" },
        "verifier": { "const": "npm run verify:receivership:us-ca" }
      }
    },
    "usCaManifestDatabase": {
      "type": "object",
      "required": [
        "artifact",
        "ftsTable",
        "generatedFrom",
        "primaryTable",
        "schemaVersion",
        "sourcePolicy"
      ],
      "properties": {
        "artifact": {
          "const": "public/data/receivership/us-ca-current.sqlite"
        },
        "ftsTable": { "const": "company_search_fts" },
        "generatedFrom": {
          "const": "public/data/receivership/us-ca-current.json"
        },
        "primaryTable": { "const": "companies" },
        "schemaVersion": { "const": 21 },
        "sourcePolicy": { "const": "first_party_only" }
      }
    },
    "usCaManifestRelease": {
      "type": "object",
      "required": [
        "coverageAsOfDate",
        "generatedFrom",
        "minCoverageDate",
        "phase",
        "releaseAuditArtifact",
        "releaseHistoryArtifact",
        "refreshScope",
        "sourcePolicy",
        "status",
        "targetCountries"
      ],
      "properties": {
        "coverageAsOfDate": { "type": "string" },
        "generatedFrom": {
          "const": "public/data/receivership/us-ca-current.json"
        },
        "minCoverageDate": { "const": "2026-07-05" },
        "phase": { "const": "us_ca_phase_one" },
        "releaseAuditArtifact": {
          "const": "public/data/receivership/us-ca-release-audit.json"
        },
        "releaseHistoryArtifact": {
          "const": "public/data/receivership/us-ca-release-history.json"
        },
        "refreshScope": { "enum": ["global", "us-ca"] },
        "sourcePolicy": { "const": "first_party_only" },
        "status": { "type": "string" },
        "targetCountries": {
          "type": "array",
          "items": { "enum": ["US", "CA"] }
        }
      }
    },
    "usCaManifestStream": {
      "type": "object",
      "required": [
        "apiArtifact",
        "artifact",
        "cadenceSeconds",
        "checkpointArtifact",
        "deltaArtifact",
        "deltaEventTypes",
        "deltaEvents",
        "deltaJsonArtifact",
        "eventsJsonArtifact",
        "eventsPagesArtifact",
        "eventTypes",
        "eventSequenceScope",
        "feedVersion",
        "pageSize",
        "releaseAuditArtifact",
        "releaseHistoryArtifact",
        "resume",
        "sort",
        "sourceArtifact"
      ],
      "properties": {
        "apiArtifact": {
          "const": "public/data/receivership/us-ca-stream-api.json"
        },
        "artifact": { "const": "public/data/receivership/us-ca-events.ndjson" },
        "cadenceSeconds": { "const": 3600 },
        "checkpointArtifact": {
          "const": "public/data/receivership/us-ca-stream-checkpoint.json"
        },
        "deltaArtifact": {
          "const": "public/data/receivership/us-ca-delta-events.ndjson"
        },
        "deltaEventTypes": {
          "type": "array",
          "items": {
            "enum": [
              "receivership_company_added",
              "receivership_company_changed",
              "receivership_company_removed"
            ]
          }
        },
        "deltaEvents": { "type": "integer" },
        "deltaJsonArtifact": {
          "const": "public/data/receivership/us-ca-delta-events.json"
        },
        "eventsJsonArtifact": {
          "const": "public/data/receivership/us-ca-events.json"
        },
        "eventsPagesArtifact": {
          "const": "public/data/receivership/us-ca-events-pages.json"
        },
        "eventTypes": {
          "type": "array",
          "items": { "const": "receivership_company_snapshot" }
        },
        "eventSequenceScope": { "const": "per_snapshot_newest_first_position" },
        "feedVersion": { "const": 1 },
        "pageSize": { "const": 50 },
        "releaseAuditArtifact": {
          "const": "public/data/receivership/us-ca-release-audit.json"
        },
        "releaseHistoryArtifact": {
          "const": "public/data/receivership/us-ca-release-history.json"
        },
        "resume": { "type": "string" },
        "sort": { "const": "eventTime_desc_caseId_asc" },
        "sourceArtifact": {
          "const": "public/data/receivership/us-ca-companies.json"
        }
      }
    },
    "usCaProductionSetup": {
      "type": "object",
      "required": [
        "coverage",
        "coverageSegments",
        "generatedAt",
        "productionReady",
        "setupRequirements",
        "sourcePolicy",
        "status",
        "summary"
      ],
      "properties": {
        "coverage": { "$ref": "#/$defs/usCaCoverage" },
        "coverageSegments": {
          "type": "array",
          "items": { "$ref": "#/$defs/usCaCoverageSegment" }
        },
        "generatedAt": { "type": "string" },
        "productionReady": { "type": "boolean" },
        "setupRequirements": {
          "type": "array",
          "items": { "$ref": "#/$defs/usCaSetupRequirement" }
        },
        "sourcePolicy": { "const": "first_party_only" },
        "status": { "enum": ["blocked_external_setup", "production_ready"] },
        "summary": { "type": "object" }
      }
    },
    "usCaProductionBlocker": {
      "type": "object",
      "required": [
        "affectedSegments",
        "billable",
        "blockerId",
        "category",
        "implemented",
        "legalReviewRequired",
        "missingRequiredEnv",
        "nextActions",
        "ready",
        "readyWhen",
        "setupId",
        "sourceId",
        "sourceFreshness",
        "status",
        "unblocksProductionCoverage",
        "verificationCommands"
      ],
      "properties": {
        "accountUrl": { "type": "string" },
        "actionRequired": { "type": "string" },
        "affectedSegments": { "type": "array" },
        "billable": { "type": "boolean" },
        "blockerId": { "type": "string" },
        "budgetGuard": { "$ref": "#/$defs/usCaBudgetGuard" },
        "category": { "type": "string" },
        "configuredEnv": { "type": "object" },
        "env": { "type": "object" },
        "implemented": { "type": "boolean" },
        "legalReviewRequired": { "type": "boolean" },
        "missingRequiredEnv": {
          "type": "array",
          "items": { "type": "string" }
        },
        "nextActions": { "type": "array", "items": { "type": "string" } },
        "onboarding": { "$ref": "#/$defs/usCaSourceOnboarding" },
        "ready": { "type": "boolean" },
        "readyWhen": { "type": "array", "items": { "type": "string" } },
        "setupId": { "type": "string" },
        "sourceHealth": { "type": "object" },
        "sourceId": { "type": "string" },
        "sourceFreshness": { "type": "string" },
        "sourceName": { "type": "string" },
        "sourceStatus": { "type": "string" },
        "status": { "type": "string" },
        "unblocksProductionCoverage": { "type": "boolean" },
        "verificationCommands": {
          "type": "array",
          "items": { "type": "string" }
        }
      }
    },
    "usCaProductionBlockers": {
      "type": "object",
      "required": [
        "blockers",
        "coverage",
        "generatedAt",
        "productionReady",
        "remediationVersion",
        "sourcePolicy",
        "status",
        "summary"
      ],
      "properties": {
        "blockers": {
          "type": "array",
          "items": { "$ref": "#/$defs/usCaProductionBlocker" }
        },
        "coverage": { "$ref": "#/$defs/usCaCoverage" },
        "generatedAt": { "type": "string" },
        "productionReady": { "type": "boolean" },
        "remediationVersion": { "const": 1 },
        "sourcePolicy": { "const": "first_party_only" },
        "status": { "enum": ["blocked_external_setup", "production_ready"] },
        "summary": { "type": "object" }
      }
    },
    "usCaSourceActivation": {
      "type": "object",
      "required": [
        "activationQueue",
        "activationVersion",
        "coverage",
        "deploymentTarget",
        "finalGate",
        "generatedAt",
        "productionReady",
        "sourcePolicy",
        "sources",
        "status",
        "summary",
        "targetCountries",
        "verificationCommands"
      ],
      "properties": {
        "activationQueue": {
          "type": "array",
          "items": { "$ref": "#/$defs/usCaSourceActivationQueueItem" }
        },
        "activationVersion": { "const": 1 },
        "coverage": { "$ref": "#/$defs/usCaCoverage" },
        "deploymentTarget": { "const": "github_actions" },
        "finalGate": { "type": "object" },
        "generatedAt": { "type": "string" },
        "productionReady": { "type": "boolean" },
        "sourcePolicy": { "const": "first_party_only" },
        "sources": {
          "type": "array",
          "items": { "$ref": "#/$defs/usCaSourceActivationSource" }
        },
        "status": { "enum": ["blocked_external_setup", "production_ready"] },
        "summary": { "type": "object" },
        "targetCountries": {
          "type": "array",
          "items": { "enum": ["US", "CA"] }
        },
        "verificationCommands": { "type": "object" }
      }
    },
    "usCaSourceActivationQueueItem": {
      "type": "object",
      "required": [
        "actionRequired",
        "billable",
        "importHandoffRequired",
        "legalReviewRequired",
        "missingRequiredEnv",
        "order",
        "owner",
        "priorityReason",
        "ready",
        "requiresUserControlledAccountOrPayment",
        "setupId",
        "sourceId",
        "sourceName",
        "status",
        "termsReviewRequired",
        "verificationCommands",
        "workstream"
      ],
      "properties": {
        "actionRequired": { "type": "string" },
        "billable": { "type": "boolean" },
        "importHandoffRequired": { "type": "boolean" },
        "legalReviewRequired": { "type": "boolean" },
        "missingRequiredEnv": {
          "type": "array",
          "items": { "type": "string" }
        },
        "order": { "type": "integer" },
        "owner": { "type": "string" },
        "priorityReason": { "type": "string" },
        "ready": { "type": "boolean" },
        "requiresUserControlledAccountOrPayment": { "type": "boolean" },
        "setupId": { "type": "string" },
        "sourceId": { "type": "string" },
        "sourceName": { "type": "string" },
        "status": { "type": "string" },
        "termsReviewRequired": { "type": "boolean" },
        "verificationCommands": {
          "type": "array",
          "items": { "type": "string" }
        },
        "workstream": { "type": "string" }
      }
    },
    "usCaSourceActivationSource": {
      "type": "object",
      "required": [
        "activationSteps",
        "affectedSegments",
        "billable",
        "blockerId",
        "category",
        "implemented",
        "legalReviewRequired",
        "missingRequiredEnv",
        "missingRequiredSecrets",
        "missingRequiredVariables",
        "officialReferences",
        "optionalInputs",
        "ready",
        "readyWhen",
        "requiredInputs",
        "sourceId",
        "sourceFreshness",
        "status",
        "unblocksProductionCoverage",
        "verificationCommands"
      ],
      "properties": {
        "accountUrl": { "type": "string" },
        "activationSteps": { "type": "array", "items": { "type": "string" } },
        "affectedSegments": { "type": "array" },
        "billable": { "type": "boolean" },
        "blockerId": { "type": "string" },
        "budgetGuard": { "$ref": "#/$defs/usCaBudgetGuard" },
        "category": { "type": "string" },
        "feeNotes": { "type": "string" },
        "implemented": { "type": "boolean" },
        "legalReviewRequired": { "type": "boolean" },
        "missingRequiredEnv": {
          "type": "array",
          "items": { "type": "string" }
        },
        "missingRequiredSecrets": {
          "type": "array",
          "items": { "type": "string" }
        },
        "missingRequiredVariables": {
          "type": "array",
          "items": { "type": "string" }
        },
        "officialReferences": {
          "type": "array",
          "items": { "$ref": "#/$defs/usCaOfficialReference" }
        },
        "optionalInputs": { "type": "array" },
        "ready": { "type": "boolean" },
        "readyWhen": { "type": "array", "items": { "type": "string" } },
        "requiredInputs": { "type": "array" },
        "setupId": { "type": "string" },
        "sourceHealth": { "type": "object" },
        "sourceId": { "type": "string" },
        "sourceFreshness": { "type": "string" },
        "sourceName": { "type": "string" },
        "sourceStatus": { "type": "string" },
        "status": { "type": "string" },
        "unblocksProductionCoverage": { "type": "boolean" },
        "verificationCommands": {
          "type": "array",
          "items": { "type": "string" }
        }
      }
    },
    "usCaSourceDecisionLedgerTemplate": {
      "type": "object",
      "required": [
        "artifacts",
        "finalVerificationCommands",
        "generatedAt",
        "guardrails",
        "githubCommandsToRun",
        "ledgerTemplateVersion",
        "productionReady",
        "sourcePolicy",
        "sources",
        "status",
        "summary",
        "targetCountries"
      ],
      "properties": {
        "artifacts": { "type": "object" },
        "finalVerificationCommands": {
          "type": "array",
          "items": { "type": "string" }
        },
        "generatedAt": { "type": "string" },
        "guardrails": { "type": "array", "items": { "type": "string" } },
        "githubCommandsToRun": {
          "type": "array",
          "items": { "type": "object" }
        },
        "ledgerTemplateVersion": { "const": 1 },
        "productionReady": { "type": "boolean" },
        "sourcePolicy": { "const": "first_party_only" },
        "sources": {
          "type": "array",
          "items": { "$ref": "#/$defs/usCaSourceDecisionLedgerTemplateSource" }
        },
        "status": { "type": "string" },
        "summary": { "type": "object" },
        "targetCountries": {
          "type": "array",
          "items": { "enum": ["US", "CA"] }
        }
      }
    },
    "usCaSourceDecisionLedgerTemplateSource": {
      "type": "object",
      "required": [
        "accountPayment",
        "actionRequired",
        "blockerId",
        "decisionStatus",
        "githubCommandsToRun",
        "githubInputsToSet",
        "importHandoff",
        "legalTerms",
        "missingRequiredEnv",
        "notes",
        "order",
        "owner",
        "priorityReason",
        "ready",
        "readyWhen",
        "setupId",
        "sourceId",
        "sourceName",
        "status",
        "verificationEvidence",
        "verificationCommands",
        "workstream"
      ],
      "properties": {
        "accountPayment": {
          "$ref": "#/$defs/usCaSourceDecisionLedgerAccountPayment"
        },
        "actionRequired": { "type": ["string", "null"] },
        "blockerId": { "type": ["string", "null"] },
        "decisionStatus": {
          "enum": ["approved", "declined", "pending", "ready"]
        },
        "githubCommandsToRun": {
          "type": "array",
          "items": { "type": "string" }
        },
        "githubInputsToSet": {
          "type": "array",
          "items": { "$ref": "#/$defs/usCaSourceDecisionLedgerGithubInput" }
        },
        "importHandoff": {
          "$ref": "#/$defs/usCaSourceDecisionLedgerImportHandoff"
        },
        "legalTerms": { "$ref": "#/$defs/usCaSourceDecisionLedgerLegalTerms" },
        "missingRequiredEnv": {
          "type": "array",
          "items": { "type": "string" }
        },
        "notes": { "type": ["string", "null"] },
        "order": { "type": ["integer", "null"] },
        "owner": { "type": "string" },
        "priorityReason": { "type": "string" },
        "ready": { "type": "boolean" },
        "readyWhen": { "type": "array", "items": { "type": "string" } },
        "setupId": { "type": ["string", "null"] },
        "sourceId": { "type": ["string", "null"] },
        "sourceName": { "type": ["string", "null"] },
        "status": { "type": "string" },
        "verificationEvidence": {
          "$ref": "#/$defs/usCaSourceDecisionLedgerVerificationEvidence"
        },
        "verificationCommands": {
          "type": "array",
          "items": { "type": "string" }
        },
        "workstream": { "type": "string" }
      }
    },
    "usCaSourceDecisionLedgerAccountPayment": {
      "type": "object",
      "required": [
        "accountConfirmed",
        "accountUrl",
        "approvalStatus",
        "approvedAt",
        "approver",
        "billable",
        "budgetApproved",
        "costControls",
        "paidSearchApproved",
        "required"
      ],
      "properties": {
        "accountConfirmed": { "type": ["boolean", "null"] },
        "accountUrl": { "type": ["string", "null"] },
        "approvalStatus": {
          "enum": ["approved", "declined", "not_required", "pending"]
        },
        "approvedAt": { "type": ["string", "null"] },
        "approver": { "type": ["string", "null"] },
        "billable": { "type": "boolean" },
        "budgetApproved": { "type": ["boolean", "null"] },
        "costControls": {
          "type": "array",
          "items": { "$ref": "#/$defs/usCaSourceDecisionLedgerCostControl" }
        },
        "paidSearchApproved": { "type": ["boolean", "null"] },
        "required": { "type": "boolean" }
      }
    },
    "usCaSourceDecisionLedgerCostControl": {
      "type": "object",
      "required": [
        "approvedValue",
        "configured",
        "githubKind",
        "name",
        "purpose",
        "required"
      ],
      "properties": {
        "approvedValue": { "type": ["string", "number", "boolean", "null"] },
        "configured": { "type": "boolean" },
        "githubKind": { "enum": ["secret", "variable"] },
        "name": { "type": "string" },
        "purpose": { "type": ["string", "null"] },
        "required": { "type": "boolean" }
      }
    },
    "usCaSourceDecisionLedgerGithubInput": {
      "type": "object",
      "required": [
        "approvedValue",
        "command",
        "configured",
        "githubKind",
        "name",
        "placeholder",
        "purpose",
        "required"
      ],
      "properties": {
        "approvedValue": { "type": ["string", "number", "boolean", "null"] },
        "command": { "type": ["string", "null"] },
        "configured": { "type": "boolean" },
        "githubKind": { "enum": ["secret", "variable"] },
        "name": { "type": "string" },
        "placeholder": { "type": ["string", "null"] },
        "purpose": { "type": ["string", "null"] },
        "required": { "type": "boolean" }
      }
    },
    "usCaSourceDecisionLedgerImportHandoff": {
      "type": "object",
      "required": [
        "acceptedFormats",
        "authorizedImportPath",
        "exampleFiles",
        "importPathEnv",
        "importSha256",
        "parserCheck",
        "redistributionAllowed",
        "required",
        "sourceExportedAt",
        "status",
        "title"
      ],
      "properties": {
        "acceptedFormats": { "type": "array", "items": { "type": "string" } },
        "authorizedImportPath": { "type": ["string", "null"] },
        "exampleFiles": { "type": "object" },
        "importPathEnv": { "type": ["string", "null"] },
        "importSha256": { "type": ["string", "null"] },
        "parserCheck": { "type": ["string", "null"] },
        "redistributionAllowed": { "type": ["boolean", "null"] },
        "required": { "type": "boolean" },
        "sourceExportedAt": { "type": ["string", "null"] },
        "status": {
          "enum": ["approved", "declined", "not_required", "pending"]
        },
        "title": { "type": ["string", "null"] }
      }
    },
    "usCaSourceDecisionLedgerLegalTerms": {
      "type": "object",
      "required": [
        "approvalStatus",
        "approvedAt",
        "legalReviewRequired",
        "officialReferencesReviewed",
        "reviewer",
        "termsReviewRequired"
      ],
      "properties": {
        "approvalStatus": {
          "enum": ["approved", "declined", "not_required", "pending"]
        },
        "approvedAt": { "type": ["string", "null"] },
        "legalReviewRequired": { "type": "boolean" },
        "officialReferencesReviewed": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/usCaSourceDecisionLedgerOfficialReference"
          }
        },
        "reviewer": { "type": ["string", "null"] },
        "termsReviewRequired": { "type": "boolean" }
      }
    },
    "usCaSourceDecisionLedgerOfficialReference": {
      "type": "object",
      "required": ["label", "reviewed", "url"],
      "properties": {
        "label": { "type": "string" },
        "reviewed": { "type": "boolean" },
        "url": { "type": ["string", "null"] }
      }
    },
    "usCaSourceDecisionLedgerVerificationEvidence": {
      "type": "object",
      "required": ["checkedAt", "checkedBy", "commandResults"],
      "properties": {
        "checkedAt": { "type": ["string", "null"] },
        "checkedBy": { "type": ["string", "null"] },
        "commandResults": {
          "type": "array",
          "items": { "$ref": "#/$defs/usCaSourceDecisionLedgerCommandResult" }
        }
      }
    },
    "usCaSourceDecisionLedgerCommandResult": {
      "type": "object",
      "required": ["command", "notes", "runUrl", "status"],
      "properties": {
        "command": { "type": "string" },
        "notes": { "type": ["string", "null"] },
        "runUrl": { "type": ["string", "null"] },
        "status": { "enum": ["failed", "passed", "pending", "skipped"] }
      }
    },
    "usCaSourceHealth": {
      "type": "object",
      "required": [
        "coverage",
        "generatedAt",
        "sourceHealth",
        "sourceHealthVersion",
        "sourcePolicy",
        "summary",
        "targetCountries"
      ],
      "properties": {
        "coverage": { "$ref": "#/$defs/usCaCoverage" },
        "generatedAt": { "type": "string" },
        "sourceHealth": { "type": "array" },
        "sourceHealthVersion": { "const": 1 },
        "sourcePolicy": { "const": "first_party_only" },
        "summary": {
          "type": "object",
          "required": [
            "blockedSources",
            "byStatus",
            "freshLiveSources",
            "liveSourcesFresh",
            "totalSources"
          ],
          "properties": {
            "blockedSources": { "type": "integer" },
            "byStatus": { "type": "object" },
            "freshLiveSources": { "type": "integer" },
            "liveSourcesFresh": { "type": "boolean" },
            "totalSources": { "type": "integer" }
          }
        },
        "targetCountries": {
          "type": "array",
          "items": { "enum": ["US", "CA"] }
        }
      }
    },
    "usCaSearchIndex": {
      "type": "object",
      "required": [
        "entries",
        "generatedAt",
        "indexVersion",
        "sourceArtifact",
        "sourcePolicy",
        "totalEntries"
      ],
      "properties": {
        "entries": {
          "type": "array",
          "items": { "$ref": "#/$defs/usCaSearchEntry" }
        },
        "generatedAt": { "type": "string" },
        "indexVersion": { "const": 1 },
        "sourceArtifact": {
          "const": "public/data/receivership/us-ca-companies.json"
        },
        "sourcePolicy": { "const": "first_party_only" },
        "totalEntries": { "type": "integer" }
      }
    },
    "usCaSearchEntry": {
      "type": "object",
      "required": [
        "aliases",
        "canonicalName",
        "caseId",
        "companyId",
        "country",
        "isLive",
        "normalizedName",
        "searchText"
      ],
      "properties": {
        "aliases": { "type": "array", "items": { "type": "string" } },
        "canonicalName": { "type": "string" },
        "caseId": { "type": "string" },
        "companyId": { "type": "string" },
        "country": { "enum": ["US", "CA"] },
        "isLive": { "type": "boolean" },
        "normalizedName": { "type": "string" },
        "searchText": { "type": "string" }
      }
    },
    "usCaSetupRequirement": {
      "type": "object",
      "required": [
        "accountUrl",
        "actionRequired",
        "billable",
        "category",
        "configuredEnv",
        "env",
        "implemented",
        "missingRequiredEnv",
        "nextActions",
        "onboarding",
        "ready",
        "readyWhen",
        "setupId",
        "sourceId",
        "sourceFreshness",
        "status",
        "verificationCommands"
      ],
      "properties": {
        "accountUrl": { "type": "string" },
        "actionRequired": { "type": "string" },
        "billable": { "type": "boolean" },
        "budgetGuard": { "$ref": "#/$defs/usCaBudgetGuard" },
        "category": { "type": "string" },
        "configuredEnv": { "type": "object" },
        "env": { "type": "object" },
        "implemented": { "type": "boolean" },
        "missingRequiredEnv": {
          "type": "array",
          "items": { "type": "string" }
        },
        "nextActions": { "type": "array", "items": { "type": "string" } },
        "onboarding": { "$ref": "#/$defs/usCaSourceOnboarding" },
        "ready": { "type": "boolean" },
        "readyWhen": { "type": "array", "items": { "type": "string" } },
        "setupId": { "type": "string" },
        "sourceId": { "type": "string" },
        "sourceFreshness": { "type": "string" },
        "status": { "type": "string" },
        "verificationCommands": {
          "type": "array",
          "items": { "type": "string" }
        }
      }
    },
    "usCaSourceCoverage": {
      "type": "object",
      "required": [
        "coverageDate",
        "fetchedRows",
        "freshness",
        "liveCases",
        "liveCompanyRows",
        "observedAt",
        "sourceId",
        "status",
        "windowEndDate",
        "windowStartDate"
      ],
      "properties": {
        "coverageDate": { "type": "string" },
        "fetchedRows": { "type": "integer" },
        "freshness": { "type": "string" },
        "liveCases": { "type": "integer" },
        "liveCompanyRows": { "type": "integer" },
        "observedAt": { "type": "string" },
        "sourceId": { "type": "string" },
        "status": { "type": "string" },
        "windowEndDate": { "type": "string" },
        "windowStartDate": { "type": "string" }
      }
    },
    "usCaSourceOnboarding": {
      "type": "object",
      "required": [
        "activationSteps",
        "feeNotes",
        "legalReviewRequired",
        "officialReferences"
      ],
      "properties": {
        "activationSteps": { "type": "array", "items": { "type": "string" } },
        "feeNotes": { "type": "string" },
        "legalReviewRequired": { "type": "boolean" },
        "officialReferences": {
          "type": "array",
          "items": { "$ref": "#/$defs/usCaOfficialReference" }
        }
      }
    },
    "usCaOfficialReference": {
      "type": "object",
      "required": ["label", "url"],
      "properties": {
        "label": { "type": "string" },
        "url": { "type": "string" }
      }
    },
    "usCaStreamWatermark": {
      "type": "object",
      "required": ["eventId", "eventSequence", "eventTime", "generatedAt"],
      "properties": {
        "eventId": { "type": "string" },
        "eventSequence": { "type": "integer" },
        "eventTime": { "type": "string" },
        "generatedAt": { "type": "string" }
      }
    },
    "usCaStreamCheckpoint": {
      "type": "object",
      "required": [
        "checkpointVersion",
        "coverage",
        "deltaEventJsonArtifact",
        "deltaEventNdjsonArtifact",
        "eventJsonArtifact",
        "eventPagesArtifact",
        "eventTypes",
        "eventSequenceScope",
        "feedVersion",
        "generatedAt",
        "highWatermark",
        "liveEvents",
        "lowWatermark",
        "releaseAuditArtifact",
        "releaseHistoryArtifact",
        "sourceArtifact",
        "sourcePolicy",
        "sqliteArtifact",
        "streamApiArtifact",
        "totalEvents"
      ],
      "properties": {
        "checkpointVersion": { "const": 1 },
        "coverage": { "$ref": "#/$defs/usCaCoverage" },
        "deltaEventJsonArtifact": {
          "const": "public/data/receivership/us-ca-delta-events.json"
        },
        "deltaEventNdjsonArtifact": {
          "const": "public/data/receivership/us-ca-delta-events.ndjson"
        },
        "eventJsonArtifact": {
          "const": "public/data/receivership/us-ca-events.json"
        },
        "eventPagesArtifact": {
          "const": "public/data/receivership/us-ca-events-pages.json"
        },
        "eventTypes": { "type": "array", "items": { "type": "string" } },
        "eventSequenceScope": { "const": "per_snapshot_newest_first_position" },
        "feedVersion": { "const": 1 },
        "generatedAt": { "type": "string" },
        "highWatermark": { "$ref": "#/$defs/usCaStreamWatermark" },
        "liveEvents": { "type": "integer" },
        "lowWatermark": { "$ref": "#/$defs/usCaStreamWatermark" },
        "releaseAuditArtifact": {
          "const": "public/data/receivership/us-ca-release-audit.json"
        },
        "releaseHistoryArtifact": {
          "const": "public/data/receivership/us-ca-release-history.json"
        },
        "sourceArtifact": {
          "const": "public/data/receivership/us-ca-events.ndjson"
        },
        "sourcePolicy": { "const": "first_party_only" },
        "sqliteArtifact": {
          "const": "public/data/receivership/us-ca-current.sqlite"
        },
        "streamApiArtifact": {
          "const": "public/data/receivership/us-ca-stream-api.json"
        },
        "totalEvents": { "type": "integer" }
      }
    },
    "usCaStreamEndpoint": {
      "type": "object",
      "required": [
        "artifactPath",
        "description",
        "githubRawHref",
        "href",
        "mediaType"
      ],
      "properties": {
        "artifactPath": { "type": "string" },
        "description": { "type": "string" },
        "githubRawHref": { "type": "string" },
        "href": { "type": "string" },
        "mediaType": { "type": "string" }
      }
    },
    "usCaStreamDataMirrors": {
      "type": "object",
      "required": [
        "githubRawBaseUrl",
        "productionBranch",
        "repository",
        "staticExportBasePath",
        "strategy"
      ],
      "properties": {
        "githubRawBaseUrl": {
          "const": "https://raw.githubusercontent.com/charliecf/charts.fyi/main/public/data/receivership/"
        },
        "productionBranch": { "const": "main" },
        "repository": { "const": "charliecf/charts.fyi" },
        "staticExportBasePath": { "const": "/data/receivership/" },
        "strategy": { "type": "string" }
      }
    },
    "usCaStreamEndpoints": {
      "type": "object",
      "required": [
        "acceptanceAudit",
        "artifactHashes",
        "checkpoint",
        "companies",
        "companiesCsv",
        "currentCases",
        "dataDictionary",
        "deltaEventsJson",
        "deltaEventsNdjson",
        "eventsJson",
        "eventsNdjson",
        "eventsPages",
        "freshness",
        "importTemplates",
        "manifest",
        "productionBlockers",
        "productionEnvironment",
        "productionRunbook",
        "releaseAudit",
        "releaseHistory",
        "schemas",
        "search",
        "setup",
        "setupPacket",
        "sourceDecisionLedgerTemplate",
        "sourceDecisionPacket",
        "sourceActivation",
        "sourceHealth",
        "sqlite"
      ],
      "properties": {
        "acceptanceAudit": { "$ref": "#/$defs/usCaStreamEndpoint" },
        "artifactHashes": { "$ref": "#/$defs/usCaStreamEndpoint" },
        "checkpoint": { "$ref": "#/$defs/usCaStreamEndpoint" },
        "companies": { "$ref": "#/$defs/usCaStreamEndpoint" },
        "companiesCsv": { "$ref": "#/$defs/usCaStreamEndpoint" },
        "currentCases": { "$ref": "#/$defs/usCaStreamEndpoint" },
        "dataDictionary": { "$ref": "#/$defs/usCaStreamEndpoint" },
        "deltaEventsJson": { "$ref": "#/$defs/usCaStreamEndpoint" },
        "deltaEventsNdjson": { "$ref": "#/$defs/usCaStreamEndpoint" },
        "eventsJson": { "$ref": "#/$defs/usCaStreamEndpoint" },
        "eventsNdjson": { "$ref": "#/$defs/usCaStreamEndpoint" },
        "eventsPages": { "$ref": "#/$defs/usCaStreamEndpoint" },
        "freshness": { "$ref": "#/$defs/usCaStreamEndpoint" },
        "importTemplates": { "$ref": "#/$defs/usCaStreamEndpoint" },
        "manifest": { "$ref": "#/$defs/usCaStreamEndpoint" },
        "productionBlockers": { "$ref": "#/$defs/usCaStreamEndpoint" },
        "productionEnvironment": { "$ref": "#/$defs/usCaStreamEndpoint" },
        "productionRunbook": { "$ref": "#/$defs/usCaStreamEndpoint" },
        "releaseAudit": { "$ref": "#/$defs/usCaStreamEndpoint" },
        "releaseHistory": { "$ref": "#/$defs/usCaStreamEndpoint" },
        "schemas": { "$ref": "#/$defs/usCaStreamEndpoint" },
        "search": { "$ref": "#/$defs/usCaStreamEndpoint" },
        "setup": { "$ref": "#/$defs/usCaStreamEndpoint" },
        "setupPacket": { "$ref": "#/$defs/usCaStreamEndpoint" },
        "sourceDecisionLedgerTemplate": {
          "$ref": "#/$defs/usCaStreamEndpoint"
        },
        "sourceDecisionPacket": { "$ref": "#/$defs/usCaStreamEndpoint" },
        "sourceActivation": { "$ref": "#/$defs/usCaStreamEndpoint" },
        "sourceHealth": { "$ref": "#/$defs/usCaStreamEndpoint" },
        "sqlite": { "$ref": "#/$defs/usCaStreamEndpoint" }
      }
    },
    "usCaStreamPolling": {
      "type": "object",
      "required": ["cadenceSeconds", "maxExpectedLagSeconds", "strategy"],
      "properties": {
        "cadenceSeconds": { "const": 3600 },
        "maxExpectedLagSeconds": { "const": 10800 },
        "strategy": { "type": "string" }
      }
    },
    "usCaStreamDelta": {
      "type": "object",
      "required": [
        "eventTypes",
        "jsonArtifact",
        "ndjsonArtifact",
        "releaseAuditArtifact",
        "releaseChangeStatus",
        "totalEvents"
      ],
      "properties": {
        "eventTypes": {
          "type": "array",
          "items": {
            "enum": [
              "receivership_company_added",
              "receivership_company_changed",
              "receivership_company_removed"
            ]
          }
        },
        "jsonArtifact": {
          "const": "public/data/receivership/us-ca-delta-events.json"
        },
        "ndjsonArtifact": {
          "const": "public/data/receivership/us-ca-delta-events.ndjson"
        },
        "releaseAuditArtifact": {
          "const": "public/data/receivership/us-ca-release-audit.json"
        },
        "releaseChangeStatus": { "type": "string" },
        "totalEvents": { "type": "integer" }
      }
    },
    "usCaStreamPagination": {
      "type": "object",
      "required": [
        "indexArtifact",
        "pageArtifactTemplate",
        "pageSize",
        "totalPages"
      ],
      "properties": {
        "indexArtifact": {
          "const": "public/data/receivership/us-ca-events-pages.json"
        },
        "pageArtifactTemplate": {
          "const": "public/data/receivership/us-ca-events-page-{pageNumber:000}.json"
        },
        "pageSize": { "const": 50 },
        "totalPages": { "type": "integer" }
      }
    },
    "usCaStreamResume": {
      "type": "object",
      "required": [
        "cursorFields",
        "eventSequenceScope",
        "newestFirst",
        "noServerSideFiltering",
        "persist",
        "sort"
      ],
      "properties": {
        "cursorFields": {
          "type": "array",
          "items": { "enum": ["eventId", "eventTime", "eventSequence"] }
        },
        "eventSequenceScope": { "const": "per_snapshot_newest_first_position" },
        "newestFirst": { "const": true },
        "noServerSideFiltering": { "type": "string" },
        "persist": { "type": "string" },
        "sort": { "const": "eventTime_desc_caseId_asc" }
      }
    },
    "usCaStreamApi": {
      "type": "object",
      "required": [
        "apiVersion",
        "coverage",
        "dataMirrors",
        "delta",
        "endpoints",
        "eventTypes",
        "eventSequenceScope",
        "feedVersion",
        "generatedAt",
        "highWatermark",
        "liveEvents",
        "lowWatermark",
        "pagination",
        "polling",
        "resume",
        "sourcePolicy",
        "staticExport",
        "targetCountries",
        "totalEvents"
      ],
      "properties": {
        "apiVersion": { "const": 1 },
        "coverage": { "$ref": "#/$defs/usCaCoverage" },
        "dataMirrors": { "$ref": "#/$defs/usCaStreamDataMirrors" },
        "delta": { "$ref": "#/$defs/usCaStreamDelta" },
        "endpoints": { "$ref": "#/$defs/usCaStreamEndpoints" },
        "eventTypes": {
          "type": "array",
          "items": { "const": "receivership_company_snapshot" }
        },
        "eventSequenceScope": { "const": "per_snapshot_newest_first_position" },
        "feedVersion": { "const": 1 },
        "generatedAt": { "type": "string" },
        "highWatermark": { "$ref": "#/$defs/usCaStreamWatermark" },
        "liveEvents": { "type": "integer" },
        "lowWatermark": { "$ref": "#/$defs/usCaStreamWatermark" },
        "pagination": { "$ref": "#/$defs/usCaStreamPagination" },
        "polling": { "$ref": "#/$defs/usCaStreamPolling" },
        "resume": { "$ref": "#/$defs/usCaStreamResume" },
        "sampleCursor": { "$ref": "#/$defs/usCaStreamWatermark" },
        "sourcePolicy": { "const": "first_party_only" },
        "staticExport": { "const": true },
        "targetCountries": {
          "type": "array",
          "items": { "enum": ["US", "CA"] }
        },
        "totalEvents": { "type": "integer" }
      }
    }
  }
}
