{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://objectcanon.com/schema/v2/resolve.json",
  "title": "ObjectCanon resolve response v2",
  "description": "Versioned receipts that preserve unresolved disagreement.",
  "type": "object",
  "oneOf": [
    {
      "type": "object",
      "required": [
        "view",
        "schema_version",
        "resolver_version",
        "dataset_fingerprint",
        "id",
        "type",
        "name",
        "synthetic",
        "attributes",
        "claims_ledger",
        "provenance",
        "policy",
        "applied_policy",
        "resolution_warnings",
        "resolution_warning_count",
        "reliance_warnings",
        "reliance_warning_count"
      ],
      "properties": {
        "view": {
          "const": "resolved"
        },
        "id": {
          "type": "string",
          "pattern": "^oc_[0-9a-hjkmnp-tv-z]{10}$"
        },
        "requested_id": {
          "type": "string"
        },
        "deprecation": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "synthetic": {
          "type": "boolean"
        },
        "provenance": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "event",
              "where",
              "when",
              "source_kind",
              "confidence"
            ],
            "properties": {
              "event": {
                "type": "string"
              },
              "where": {
                "type": "string"
              },
              "when": {
                "type": "string"
              },
              "source_kind": {
                "type": "string",
                "enum": [
                  "owner",
                  "appraiser",
                  "third_party",
                  "ai"
                ]
              },
              "confidence": {
                "type": "string",
                "enum": [
                  "high",
                  "medium",
                  "low"
                ]
              }
            },
            "additionalProperties": false
          }
        },
        "schema_version": {
          "type": "string",
          "const": "2"
        },
        "resolver_version": {
          "type": "string"
        },
        "dataset_fingerprint": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "resolution_policy": {
          "const": "substantive claims grouped by structural JSON value equality; no winner"
        },
        "policy": {
          "const": "disputed_v1"
        },
        "applied_policy": {
          "const": "disputed_v1"
        },
        "attributes": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "required": [
              "status",
              "value",
              "contested",
              "claim_count",
              "substantive_claim_count",
              "claim_ids",
              "supporting_claim_ids",
              "price_moving"
            ],
            "properties": {
              "status": {
                "type": "string",
                "enum": [
                  "unknown",
                  "single_claim",
                  "agreement",
                  "disputed"
                ]
              },
              "value": {},
              "contested": {
                "type": "boolean"
              },
              "claim_count": {
                "type": "integer",
                "minimum": 0
              },
              "substantive_claim_count": {
                "type": "integer",
                "minimum": 0
              },
              "claim_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "supporting_claim_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "alternatives": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "value",
                    "claim_ids",
                    "claims"
                  ],
                  "properties": {
                    "value": {},
                    "claim_ids": {
                      "type": "array",
                      "minItems": 1,
                      "items": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "claims": {
                      "type": "array",
                      "minItems": 1,
                      "items": {
                        "type": "object",
                        "required": [
                          "claim_id",
                          "attribute",
                          "value",
                          "source_kind",
                          "interest",
                          "asserted_at"
                        ],
                        "properties": {
                          "claim_id": {
                            "type": "string",
                            "minLength": 1
                          },
                          "attribute": {
                            "type": "string"
                          },
                          "value": {},
                          "source_kind": {
                            "type": "string",
                            "enum": [
                              "owner",
                              "appraiser",
                              "third_party",
                              "ai"
                            ]
                          },
                          "interest": {
                            "type": "string",
                            "enum": [
                              "owner",
                              "seller",
                              "buyer",
                              "heir",
                              "fiduciary",
                              "none",
                              "unknown"
                            ]
                          },
                          "confidence": {
                            "type": "string",
                            "enum": [
                              "high",
                              "medium",
                              "low"
                            ]
                          },
                          "source": {
                            "type": "string"
                          },
                          "source_attribution": {
                            "type": "object",
                            "required": [
                              "kind"
                            ],
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "owner",
                                  "appraiser",
                                  "third_party",
                                  "ai"
                                ]
                              },
                              "name": {
                                "type": "string"
                              },
                              "reference": {
                                "type": "string"
                              }
                            },
                            "additionalProperties": false
                          },
                          "evidence": {
                            "type": "object",
                            "required": [
                              "type"
                            ],
                            "properties": {
                              "type": {
                                "type": "string"
                              },
                              "reference": {
                                "type": "string"
                              },
                              "basis": {
                                "type": "string"
                              }
                            },
                            "additionalProperties": false
                          },
                          "asserted_at": {
                            "type": "string"
                          },
                          "reason": {
                            "type": "string"
                          },
                          "partial": {
                            "type": "boolean",
                            "const": true
                          },
                          "searchable": {
                            "type": "boolean",
                            "const": false
                          }
                        },
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": false
                }
              },
              "abstentions": {
                "type": "array",
                "items": {
                  "type": "object",
                  "required": [
                    "claim_id",
                    "attribute",
                    "value",
                    "source_kind",
                    "interest",
                    "asserted_at",
                    "reason"
                  ],
                  "properties": {
                    "claim_id": {
                      "type": "string",
                      "minLength": 1
                    },
                    "attribute": {
                      "type": "string"
                    },
                    "value": {
                      "type": "null"
                    },
                    "source_kind": {
                      "type": "string",
                      "enum": [
                        "owner",
                        "appraiser",
                        "third_party",
                        "ai"
                      ]
                    },
                    "interest": {
                      "type": "string",
                      "enum": [
                        "owner",
                        "seller",
                        "buyer",
                        "heir",
                        "fiduciary",
                        "none",
                        "unknown"
                      ]
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "high",
                        "medium",
                        "low"
                      ]
                    },
                    "source": {
                      "type": "string"
                    },
                    "source_attribution": {
                      "type": "object",
                      "required": [
                        "kind"
                      ],
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "owner",
                            "appraiser",
                            "third_party",
                            "ai"
                          ]
                        },
                        "name": {
                          "type": "string"
                        },
                        "reference": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    },
                    "evidence": {
                      "type": "object",
                      "required": [
                        "type"
                      ],
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "reference": {
                          "type": "string"
                        },
                        "basis": {
                          "type": "string"
                        }
                      },
                      "additionalProperties": false
                    },
                    "asserted_at": {
                      "type": "string"
                    },
                    "reason": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "additionalProperties": false
                }
              },
              "price_moving": {
                "type": "boolean"
              },
              "reason": {
                "type": "string"
              },
              "risk_flags": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "ai_only",
                    "unknown_interest",
                    "interested_assertion",
                    "interested_without_declared_none_support",
                    "redacted",
                    "partial_identifier"
                  ]
                }
              },
              "context_flags": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "interested_assertion",
                    "unknown_interest"
                  ]
                }
              },
              "triage_flags": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "ai_only",
                    "interested_without_declared_none_support",
                    "redacted",
                    "partial_identifier"
                  ]
                }
              },
              "redacted": {
                "type": "boolean",
                "const": true
              },
              "searchable": {
                "type": "boolean",
                "const": false
              },
              "partial": {
                "type": "boolean",
                "const": true
              }
            },
            "additionalProperties": false,
            "allOf": [
              {
                "if": {
                  "required": [
                    "status"
                  ],
                  "properties": {
                    "status": {
                      "const": "unknown"
                    }
                  }
                },
                "then": {
                  "properties": {
                    "value": {
                      "type": "null"
                    },
                    "contested": {
                      "const": false
                    },
                    "claim_count": {
                      "const": 0
                    },
                    "substantive_claim_count": {
                      "const": 0
                    },
                    "claim_ids": {
                      "type": "array",
                      "maxItems": 0
                    },
                    "supporting_claim_ids": {
                      "type": "array",
                      "maxItems": 0
                    },
                    "alternatives": false,
                    "selected_claim_id": false,
                    "selected_over_higher_confidence_claim": false,
                    "contested_by": false
                  }
                }
              },
              {
                "if": {
                  "required": [
                    "status"
                  ],
                  "properties": {
                    "status": {
                      "const": "single_claim"
                    }
                  }
                },
                "then": {
                  "properties": {
                    "contested": {
                      "const": false
                    },
                    "claim_count": {
                      "const": 1
                    },
                    "substantive_claim_count": {
                      "const": 1
                    },
                    "claim_ids": {
                      "type": "array",
                      "minItems": 1,
                      "maxItems": 1
                    },
                    "supporting_claim_ids": {
                      "type": "array",
                      "minItems": 1,
                      "maxItems": 1
                    },
                    "alternatives": false
                  }
                }
              },
              {
                "if": {
                  "required": [
                    "status"
                  ],
                  "properties": {
                    "status": {
                      "const": "agreement"
                    }
                  }
                },
                "then": {
                  "properties": {
                    "contested": {
                      "const": false
                    },
                    "claim_count": {
                      "type": "integer",
                      "minimum": 2
                    },
                    "substantive_claim_count": {
                      "type": "integer",
                      "minimum": 2
                    },
                    "claim_ids": {
                      "type": "array",
                      "minItems": 2
                    },
                    "supporting_claim_ids": {
                      "type": "array",
                      "minItems": 2
                    },
                    "alternatives": {
                      "type": "array",
                      "maxItems": 0
                    }
                  }
                }
              },
              {
                "if": {
                  "required": [
                    "status"
                  ],
                  "properties": {
                    "status": {
                      "const": "disputed"
                    }
                  }
                },
                "then": {
                  "required": [
                    "alternatives",
                    "reason"
                  ],
                  "properties": {
                    "value": {
                      "type": "null"
                    },
                    "contested": {
                      "const": true
                    },
                    "reason": {
                      "const": "multiple_distinct_values"
                    },
                    "supporting_claim_ids": {
                      "type": "array",
                      "maxItems": 0
                    },
                    "alternatives": {
                      "type": "array",
                      "minItems": 2
                    },
                    "selected_claim_id": false,
                    "selected_over_higher_confidence_claim": false,
                    "contested_by": false
                  }
                }
              }
            ]
          }
        },
        "claims_ledger": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "claim_id",
              "attribute",
              "value",
              "source_kind",
              "interest",
              "asserted_at"
            ],
            "properties": {
              "claim_id": {
                "type": "string",
                "minLength": 1
              },
              "attribute": {
                "type": "string"
              },
              "value": {},
              "source_kind": {
                "type": "string",
                "enum": [
                  "owner",
                  "appraiser",
                  "third_party",
                  "ai"
                ]
              },
              "interest": {
                "type": "string",
                "enum": [
                  "owner",
                  "seller",
                  "buyer",
                  "heir",
                  "fiduciary",
                  "none",
                  "unknown"
                ]
              },
              "confidence": {
                "type": "string",
                "enum": [
                  "high",
                  "medium",
                  "low"
                ]
              },
              "source": {
                "type": "string"
              },
              "source_attribution": {
                "type": "object",
                "required": [
                  "kind"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "owner",
                      "appraiser",
                      "third_party",
                      "ai"
                    ]
                  },
                  "name": {
                    "type": "string"
                  },
                  "reference": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              },
              "evidence": {
                "type": "object",
                "required": [
                  "type"
                ],
                "properties": {
                  "type": {
                    "type": "string"
                  },
                  "reference": {
                    "type": "string"
                  },
                  "basis": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              },
              "asserted_at": {
                "type": "string"
              },
              "reason": {
                "type": "string"
              },
              "partial": {
                "type": "boolean",
                "const": true
              },
              "searchable": {
                "type": "boolean",
                "const": false
              }
            },
            "additionalProperties": false
          }
        },
        "contested_attributes": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "resolution_warnings": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "reliance_warnings": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "attribute",
              "reason"
            ],
            "properties": {
              "attribute": {
                "type": "string"
              },
              "reason": {
                "const": "redacted"
              }
            },
            "additionalProperties": false
          }
        },
        "reliance_warning_count": {
          "type": "integer",
          "minimum": 0
        },
        "resolution_warning_count": {
          "type": "integer",
          "minimum": 0,
          "description": "Number of entries in resolution_warnings."
        },
        "note": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "title": "ObjectCanon disputed_v1 resolved receipt"
    },
    {
      "type": "object",
      "required": [
        "view",
        "schema_version",
        "resolver_version",
        "dataset_fingerprint",
        "id",
        "type",
        "name",
        "synthetic",
        "claims",
        "provenance",
        "policy",
        "applied_policy"
      ],
      "properties": {
        "view": {
          "const": "claims"
        },
        "id": {
          "type": "string",
          "pattern": "^oc_[0-9a-hjkmnp-tv-z]{10}$"
        },
        "requested_id": {
          "type": "string"
        },
        "deprecation": {
          "type": "string"
        },
        "type": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "synthetic": {
          "type": "boolean"
        },
        "provenance": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "event",
              "where",
              "when",
              "source_kind",
              "confidence"
            ],
            "properties": {
              "event": {
                "type": "string"
              },
              "where": {
                "type": "string"
              },
              "when": {
                "type": "string"
              },
              "source_kind": {
                "type": "string",
                "enum": [
                  "owner",
                  "appraiser",
                  "third_party",
                  "ai"
                ]
              },
              "confidence": {
                "type": "string",
                "enum": [
                  "high",
                  "medium",
                  "low"
                ]
              }
            },
            "additionalProperties": false
          }
        },
        "schema_version": {
          "type": "string",
          "const": "2"
        },
        "resolver_version": {
          "type": "string"
        },
        "dataset_fingerprint": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "resolution_policy": {
          "const": "none"
        },
        "policy": {
          "type": "null"
        },
        "applied_policy": {
          "type": "null"
        },
        "claims": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "claim_id",
              "attribute",
              "value",
              "source_kind",
              "interest",
              "asserted_at"
            ],
            "properties": {
              "claim_id": {
                "type": "string",
                "minLength": 1
              },
              "attribute": {
                "type": "string"
              },
              "value": {},
              "source_kind": {
                "type": "string",
                "enum": [
                  "owner",
                  "appraiser",
                  "third_party",
                  "ai"
                ]
              },
              "interest": {
                "type": "string",
                "enum": [
                  "owner",
                  "seller",
                  "buyer",
                  "heir",
                  "fiduciary",
                  "none",
                  "unknown"
                ]
              },
              "confidence": {
                "type": "string",
                "enum": [
                  "high",
                  "medium",
                  "low"
                ]
              },
              "source": {
                "type": "string"
              },
              "source_attribution": {
                "type": "object",
                "required": [
                  "kind"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "owner",
                      "appraiser",
                      "third_party",
                      "ai"
                    ]
                  },
                  "name": {
                    "type": "string"
                  },
                  "reference": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              },
              "evidence": {
                "type": "object",
                "required": [
                  "type"
                ],
                "properties": {
                  "type": {
                    "type": "string"
                  },
                  "reference": {
                    "type": "string"
                  },
                  "basis": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              },
              "asserted_at": {
                "type": "string"
              },
              "reason": {
                "type": "string"
              },
              "partial": {
                "type": "boolean",
                "const": true
              },
              "searchable": {
                "type": "boolean",
                "const": false
              }
            },
            "additionalProperties": false
          }
        }
      },
      "additionalProperties": false,
      "title": "ObjectCanon claims receipt"
    }
  ]
}
