{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://fartbench.org/schemas/fartbench-core-r01-human-evaluation-v3.schema.json",
  "title": "FARTBench Core R01 Human Evaluation Record, instrument V3",
  "description": "One human review of one blind clip under instrument fartbench-core-r01-human-v3. Structurally identical to the V2 record: V3 changes only the plain-language wording the reviewer reads for the three ratings. Field names, the answer objects, the not-applicable state and every validation rule are exactly V2's. The V2 schema is untouched.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "schema",
    "instrument_version",
    "pool_version",
    "cohort_tag",
    "session_id",
    "run_id",
    "blind_sample_id",
    "scene_id",
    "primary_event_gate",
    "primary_causal_gate",
    "rating_scale",
    "factual",
    "ratings",
    "playback",
    "timing",
    "eligibility",
    "scoring",
    "submitted_utc",
    "locked_timestamp_utc"
  ],
  "properties": {
    "schema": {
      "type": "string",
      "const": "benchmark/schemas/fartbench-core-r01-human-evaluation-v3.schema.json"
    },
    "instrument_version": {
      "type": "string",
      "const": "fartbench-core-r01-human-v3"
    },
    "surface": {
      "type": "string"
    },
    "pool_version": {
      "type": "string"
    },
    "cohort_tag": {
      "type": "string",
      "const": "fartbench-core-r00-generation-cohort-v1-locked"
    },
    "session_id": {
      "type": "string",
      "minLength": 1
    },
    "run_id": {
      "type": "string",
      "minLength": 1
    },
    "rater_id": {
      "type": [
        "string",
        "null"
      ]
    },
    "blind_sample_id": {
      "type": "string",
      "pattern": "^[A-Z0-9]{5,}$",
      "description": "Opaque. Encodes nothing about model, configuration, route, resolution or origin."
    },
    "scene_id": {
      "type": "string",
      "enum": [
        "FB-C02",
        "FB-014",
        "FB-074",
        "FB-512"
      ]
    },
    "primary_event_gate": {
      "type": "string",
      "description": "The gate asking whether the scene's event happened. Instrument metadata fixed per scene. A No here is first-class benchmark evidence in its own right and is never translated into low quality ratings.",
      "enum": [
        "single_event_present",
        "separate_fart_event_present"
      ]
    },
    "primary_causal_gate": {
      "type": "string",
      "description": "The gate carrying the scene's causal question. Instrument metadata fixed per scene, recorded so a failure there stays separately reportable.",
      "enum": [
        "source_was_red_jacket_woman",
        "event_connected_to_lift",
        "creak_and_fart_distinguishable",
        "recovered_without_further_emission"
      ]
    },
    "rating_scale": {
      "type": "string",
      "const": "1-5"
    },
    "not_applicable_policy": {
      "type": "string",
      "description": "Optional restatement carried in the record for readers who meet it without the schema."
    },
    "factual": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "single_event_present": {
          "$ref": "#/$defs/gate_answer"
        },
        "source_was_red_jacket_woman": {
          "$ref": "#/$defs/gate_answer"
        },
        "bystanders_directed_attention": {
          "$ref": "#/$defs/gate_answer"
        },
        "event_connected_to_lift": {
          "$ref": "#/$defs/gate_answer"
        },
        "body_and_clothing_plausible": {
          "$ref": "#/$defs/gate_answer"
        },
        "chair_creak_present": {
          "$ref": "#/$defs/gate_answer"
        },
        "separate_fart_event_present": {
          "$ref": "#/$defs/gate_answer"
        },
        "creak_and_fart_distinguishable": {
          "$ref": "#/$defs/gate_answer"
        },
        "both_people_reacted": {
          "$ref": "#/$defs/gate_answer"
        },
        "recovered_without_further_emission": {
          "$ref": "#/$defs/gate_answer"
        }
      }
    },
    "ratings": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "acoustic_plausibility",
        "temporal_causal_coherence",
        "physical_social_plausibility"
      ],
      "properties": {
        "acoustic_plausibility": {
          "$ref": "#/$defs/rating_answer"
        },
        "temporal_causal_coherence": {
          "$ref": "#/$defs/rating_answer"
        },
        "physical_social_plausibility": {
          "$ref": "#/$defs/rating_answer"
        }
      }
    },
    "playback": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "completed",
        "replay_count",
        "clip_duration_seconds"
      ],
      "properties": {
        "completed": {
          "type": "boolean",
          "const": true
        },
        "replay_count": {
          "type": "integer",
          "minimum": 0
        },
        "active_playback_seconds": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0
        },
        "clip_duration_seconds": {
          "type": "number",
          "exclusiveMinimum": 0
        },
        "completion_fraction": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0,
          "maximum": 1
        },
        "ever_muted": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "muted_at_lock": {
          "type": [
            "boolean",
            "null"
          ]
        }
      }
    },
    "timing": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "elapsed_evaluation_seconds"
      ],
      "properties": {
        "elapsed_evaluation_seconds": {
          "type": "number",
          "minimum": 0
        },
        "first_interaction_offset_seconds": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0
        },
        "resumed_session": {
          "type": [
            "boolean",
            "null"
          ]
        }
      }
    },
    "eligibility": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "complete",
        "flags"
      ],
      "properties": {
        "complete": {
          "type": "boolean",
          "description": "Every one of the six fields carries an answer or an N/A, and playback completed. N/A counts as answered."
        },
        "flags": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "code",
              "label"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "label": {
                "type": "string"
              },
              "detail": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          }
        }
      }
    },
    "scoring": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "composite_formula_frozen_at_lock",
        "composite_class",
        "completeness"
      ],
      "properties": {
        "composite_formula_frozen_at_lock": {
          "type": "boolean",
          "const": false
        },
        "composite_class": {
          "type": "string",
          "const": "none"
        },
        "completeness": {
          "type": "string",
          "enum": [
            "complete",
            "incomplete"
          ]
        },
        "gates_reported_separately": {
          "type": "boolean",
          "const": true
        },
        "not_applicable_excluded_from_means": {
          "type": "boolean",
          "const": true
        }
      }
    },
    "notes": {
      "type": [
        "string",
        "null"
      ]
    },
    "submitted_utc": {
      "type": "string",
      "format": "date-time"
    },
    "locked_timestamp_utc": {
      "type": "string",
      "format": "date-time"
    }
  },
  "allOf": [
    {
      "if": {
        "properties": {
          "scene_id": {
            "const": "FB-C02"
          }
        },
        "required": [
          "scene_id"
        ]
      },
      "then": {
        "properties": {
          "primary_event_gate": {
            "const": "single_event_present"
          },
          "primary_causal_gate": {
            "const": "source_was_red_jacket_woman"
          },
          "factual": {
            "required": [
              "single_event_present",
              "source_was_red_jacket_woman",
              "bystanders_directed_attention"
            ],
            "maxProperties": 3,
            "properties": {
              "single_event_present": {
                "$ref": "#/$defs/answer_never_na"
              }
            }
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "scene_id": {
            "const": "FB-014"
          }
        },
        "required": [
          "scene_id"
        ]
      },
      "then": {
        "properties": {
          "primary_event_gate": {
            "const": "single_event_present"
          },
          "primary_causal_gate": {
            "const": "event_connected_to_lift"
          },
          "factual": {
            "required": [
              "single_event_present",
              "event_connected_to_lift",
              "body_and_clothing_plausible"
            ],
            "maxProperties": 3,
            "properties": {
              "single_event_present": {
                "$ref": "#/$defs/answer_never_na"
              }
            }
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "scene_id": {
            "const": "FB-074"
          }
        },
        "required": [
          "scene_id"
        ]
      },
      "then": {
        "properties": {
          "primary_event_gate": {
            "const": "separate_fart_event_present"
          },
          "primary_causal_gate": {
            "const": "creak_and_fart_distinguishable"
          },
          "factual": {
            "required": [
              "chair_creak_present",
              "separate_fart_event_present",
              "creak_and_fart_distinguishable"
            ],
            "maxProperties": 3,
            "properties": {
              "chair_creak_present": {
                "$ref": "#/$defs/answer_never_na"
              },
              "separate_fart_event_present": {
                "$ref": "#/$defs/answer_never_na"
              }
            }
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "scene_id": {
            "const": "FB-512"
          }
        },
        "required": [
          "scene_id"
        ]
      },
      "then": {
        "properties": {
          "primary_event_gate": {
            "const": "single_event_present"
          },
          "primary_causal_gate": {
            "const": "recovered_without_further_emission"
          },
          "factual": {
            "required": [
              "single_event_present",
              "both_people_reacted",
              "recovered_without_further_emission"
            ],
            "maxProperties": 3,
            "properties": {
              "single_event_present": {
                "$ref": "#/$defs/answer_never_na"
              }
            }
          }
        }
      }
    }
  ],
  "$defs": {
    "na_reason": {
      "type": "string",
      "enum": [
        "primary_event_absent",
        "required_sound_absent",
        "causal_prerequisite_absent",
        "not_observable"
      ]
    },
    "gate_answer": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "value"
      ],
      "properties": {
        "value": {
          "enum": [
            "yes",
            "no",
            "unclear",
            null
          ]
        },
        "not_applicable_reason": {
          "$ref": "#/$defs/na_reason"
        }
      },
      "oneOf": [
        {
          "properties": {
            "value": {
              "enum": [
                "yes",
                "no",
                "unclear"
              ]
            }
          },
          "not": {
            "required": [
              "not_applicable_reason"
            ]
          }
        },
        {
          "properties": {
            "value": {
              "const": null
            }
          },
          "required": [
            "not_applicable_reason"
          ]
        }
      ]
    },
    "rating_answer": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "value"
      ],
      "properties": {
        "value": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 1,
          "maximum": 5
        },
        "not_applicable_reason": {
          "$ref": "#/$defs/na_reason"
        }
      },
      "oneOf": [
        {
          "properties": {
            "value": {
              "type": "integer",
              "minimum": 1,
              "maximum": 5
            }
          },
          "not": {
            "required": [
              "not_applicable_reason"
            ]
          }
        },
        {
          "properties": {
            "value": {
              "type": "null"
            }
          },
          "required": [
            "not_applicable_reason"
          ]
        }
      ]
    },
    "answer_never_na": {
      "description": "A primary or independent gate. It is always answerable, so it never takes N/A.",
      "properties": {
        "value": {
          "enum": [
            "yes",
            "no",
            "unclear"
          ]
        }
      }
    }
  }
}
