{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aidemos-com/json-schema/aidemos-com-recorded-evidence-in-schema.json",
  "title": "RecordedEvidenceIn",
  "description": "An assessment somebody ELSE already made, transcribed into the archive.\n\n`POST /runs/{id}/grade` queues our judge to read the output bytes and form a verdict. The binder\nhas no such option: the verdict it is carrying was reached in June by a harness, or in July by a\nresearcher writing prose, and the bytes that produced it are often gone. Re-judging what we can\nstill see and calling that the historical result would replace the record with our opinion of it.\n\nSo this endpoint transcribes rather than grades — and `source` is the whole point. `extracted`\nsays *a person or a program stated this and we are recording their words*. `captured` says\n*this verdict was measured from bytes this run actually produced*, which the June harness did\n(it compared result sets against a live database) and a researcher's write-up did not. The\ndatabase enforces the ordering either way: C12 refuses `captured` evidence over an `extracted`\nrun, so the stronger label cannot be attached to a reconstruction even by a caller trying to.",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aidemos-com-openapi.json#/components/schemas/RecordedEvidenceIn",
  "properties": {
    "idempotency_key": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Idempotency Key"
    },
    "scenario_id": {
      "type": "string",
      "title": "Scenario Id"
    },
    "test_case_version_id": {
      "type": "string",
      "title": "Test Case Version Id"
    },
    "rubric_version_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Rubric Version Id",
      "description": "the standard this verdict was reached under (C13). For a historical grade that is the rubric version recording the ORIGINAL standard, not today's"
    },
    "actor_id": {
      "type": "string",
      "title": "Actor Id",
      "description": "who judged it — the researcher or the harness, never the binder"
    },
    "verdict": {
      "type": "string",
      "title": "Verdict"
    },
    "reasoning": {
      "type": "string",
      "title": "Reasoning",
      "description": "the assessor's own words. Not a summary of them"
    },
    "source": {
      "type": "string",
      "title": "Source",
      "description": "captured | extracted"
    },
    "graded_at": {
      "type": "string",
      "title": "Graded At",
      "description": "when the assessment was made, not when it was transcribed"
    },
    "score": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Score"
    },
    "measured": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Measured",
      "description": "the numbers behind the verdict (C3). The gate checks these against the test case's stated expectations"
    },
    "grade_reason": {
      "type": "string",
      "title": "Grade Reason",
      "default": "initial"
    },
    "supersedes": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Supersedes"
    },
    "replicate_of": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Replicate Of"
    },
    "observations": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/ObservationIn"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Observations"
    },
    "proofs": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/EvidenceProofIn"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Proofs"
    }
  },
  "type": "object",
  "required": [
    "scenario_id",
    "test_case_version_id",
    "actor_id",
    "verdict",
    "reasoning",
    "source",
    "graded_at"
  ],
  "$defs": {
    "EvidenceProofIn": {
      "properties": {
        "artifact_id": {
          "type": "string",
          "title": "Artifact Id"
        },
        "role": {
          "type": "string",
          "title": "Role",
          "description": "input | output | capture — deliberate subset of artifact_kind: trace/log substantiate a run, not a verdict"
        },
        "span": {
          "anyOf": [
            {
              "additionalProperties": true,
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "title": "Span",
          "description": "closed locator contract: exactly one base of pages/start_ms/sheet/json_path/lines/turns + its qualifiers (bbox/end_ms/range)"
        },
        "anchor": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Anchor"
        },
        "note": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Note"
        },
        "ord": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Ord"
        }
      },
      "type": "object",
      "required": [
        "artifact_id",
        "role"
      ],
      "title": "EvidenceProofIn",
      "description": "#425 — the exact region that substantiates this evidence row. The durable proof is the\nNATIVE artifact + locator; a screenshot crop is `role='capture'`, supporting presentation\nonly, and must already be attached to the run (role='capture') or the database refuses it."
    },
    "ObservationIn": {
      "properties": {
        "text": {
          "type": "string",
          "title": "Text"
        },
        "verdict": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Verdict"
        },
        "ord": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Ord"
        }
      },
      "type": "object",
      "required": [
        "text"
      ],
      "title": "ObservationIn"
    }
  }
}