{
 "use_case": "disclosure-preflight",
 "title": "Disclosure pre-flight: a planted script and a raw AI presenter clip",
 "about": "A fictional oat-milk script with five planted issues (a hit song, a celebrity, another brand, a swear word, a dangerous stunt) and two enrolled fictional actors, one consented and one who withdrew consent; then a raw AI presenter clip declared synthetic. The script check must flag the five issues, grant Ava and refuse Ben, and the sign-off must seal an attestation that verifies and fails once edited. The clip must get the AI label burned in, read back on every sampled frame, and a valid C2PA marking.",
 "licence": "Fictional: the script, brands in the product slots, performers and consent entries were written for Decosa (CC0); the named celebrity, brand and song are the planted issues. raw-presenter.mp4: Decosa's own synthetic presenter render (no real person), CC0.",
 "inputs": [
  {
   "file": "inputs/script-planted.txt",
   "what": "The ad script or transcript, one line per line (screen directions and supers included)."
  },
  {
   "file": "inputs/performers.json",
   "what": "Who appears: [{label, kind: synthetic|human|replica, identity_id?}] where identity_id is a consent-ledger id enrolled on your server."
  },
  {
   "file": "inputs/raw-presenter.mp4",
   "what": "The video to label (MP4 or MOV); here a raw AI presenter clip with no label or credential."
  },
  {
   "file": "inputs/presenter-declared.json",
   "what": "The clip's performers, declared synthetic."
  },
  {
   "file": "inputs/presenter-script.txt",
   "what": "The clip's spoken line."
  }
 ],
 "steps": [
  {
   "id": "script",
   "method": "POST",
   "path": "/disclosure/check",
   "timeout": 240,
   "body": {
    "script": {
     "$file": "inputs/script-planted.txt"
    },
    "performers": {
     "$file": "inputs/performers.json"
    },
    "advertiser": "Brightwell",
    "product": "Brightwell Oat oat milk",
    "project": "lumo-spring-26",
    "stream": false
   }
  },
  {
   "id": "signoff",
   "method": "POST",
   "path": "/disclosure/runs/${script.run_id}/signoff",
   "body": {
    "name": "Rehearsal Reviewer",
    "role": "automated rehearsal",
    "confirm": true,
    "decisions": {}
   }
  },
  {
   "id": "verify",
   "method": "POST",
   "path": "/record/verify",
   "auth": false,
   "body": {
    "record": {
     "$ref": "signoff.attestation"
    }
   }
  },
  {
   "id": "tampered",
   "method": "POST",
   "path": "/record/verify",
   "auth": false,
   "body": {
    "record": {
     "$ref": "signoff.attestation"
    }
   },
   "tamper": {
    "at": "record.entries[1].kind",
    "set": "edited"
   }
  },
  {
   "id": "clip",
   "method": "POST",
   "path": "/disclosure/check",
   "timeout": 240,
   "body": {
    "video_b64": {
     "$b64": "inputs/raw-presenter.mp4"
    },
    "filename": "raw-presenter.mp4",
    "script": {
     "$file": "inputs/presenter-script.txt"
    },
    "performers": {
     "$file": "inputs/presenter-declared.json"
    },
    "advertiser": "Fernway",
    "product": "Fernway fold-flat canvas market tote",
    "stream": false
   }
  }
 ],
 "checks": [
  {
   "says": "the hit song is flagged",
   "path": "script.report.flags[category=music,text~Walking on Sunshine]",
   "count_min": 1
  },
  {
   "says": "the celebrity is flagged",
   "path": "script.report.flags[category=real_person,text~Serena Williams]",
   "count_min": 1
  },
  {
   "says": "the other brand is flagged",
   "path": "script.report.flags[category=trademark,text~Starbucks]",
   "count_min": 1
  },
  {
   "says": "the swear word is flagged",
   "path": "script.report.flags[category=profanity]",
   "count_min": 1
  },
  {
   "says": "the dangerous stunt is flagged",
   "path": "script.report.flags[category=rating]",
   "count_min": 1
  },
  {
   "says": "Ava's consent is granted",
   "path": "script.report.performers[label=Ava][0].consent_state",
   "equals": "granted"
  },
  {
   "says": "Ben's consent is refused (he withdrew it)",
   "path": "script.report.performers[label=Ben][0].consent_state",
   "equals": "refused"
  },
  {
   "says": "the ledger refuses Ben because his consent was revoked",
   "path": "script.report.performers[label=Ben][0].consent.code",
   "all_in": [
    "revoked"
   ]
  },
  {
   "says": "Ben's face and voice refusals each carry a ledger decision id",
   "path": "script.report.performers[label=Ben][0].consent.receipt_id",
   "count": 2
  },
  {
   "says": "the signed attestation verifies",
   "path": "verify.ok",
   "equals": true
  },
  {
   "says": "an attestation with one entry edited no longer verifies",
   "path": "tampered.ok",
   "equals": false
  },
  {
   "says": "the clip gets the AI label burned in",
   "path": "clip.report.disclosure.applied",
   "equals": true
  },
  {
   "says": "the label is read back on every sampled frame (6 of 6)",
   "path": "clip.report.disclosure.visible_label.read_back.frames_with_label",
   "equals": 6
  },
  {
   "says": "the clip carries a C2PA marking whose content hash checks",
   "path": "clip.report.disclosure.marking_check.content_intact",
   "equals": true
  },
  {
   "says": "the script's model calls have receipts (at least 4)",
   "path": "script.report.receipts",
   "count_min": 4
  },
  {
   "says": "every model call has a signed receipt (consent-ledger decision ids are not model receipts)",
   "receipts": "signed",
   "ignore_prefix": [
    "cd_"
   ],
   "min": 5
  }
 ]
}
