{
 "use_case": "kids-content-preflight",
 "title": "Made-for-kids pre-flight: a counting song set 'not made for kids', a parenting vlog, and a six-video back catalogue",
 "about": "A preschool counting song with a puppet, uploaded under a channel default of 'not made for kids', with comments and personalised ads on and a sign-up link. The pre-flight must call it made for kids, raise the setting mismatch as high (the channel-default pattern from the FTC's Disney case), and list the comments, personalised-ads and data-request flags. A parenting vlog with a toddler on screen must come back not made for kids and consistent. A reviewer signs; the review record must verify, and fail once the designation is changed. The back catalogue must find the unset video and at least one mismatch.",
 "licence": "Synthetic: every channel, person and product is fictional, written for Decosa from the FTC's factors (16 CFR 312.2) and YouTube's made-for-kids guidance. No minors' data. Part of decosa-api, AGPL-3.0-or-later.",
 "inputs": [
  {
   "file": "inputs/upload.json",
   "what": "One upload: title, description, tags, a timestamped transcript, on-screen text, the uploader's setting and which features are on."
  },
  {
   "file": "inputs/vlog.json",
   "what": "A parenting vlog with a toddler on screen, made for parents."
  },
  {
   "file": "inputs/catalogue.json",
   "what": "Six uploads from one channel's back catalogue, with their settings (one not set)."
  }
 ],
 "steps": [
  {
   "id": "check",
   "method": "POST",
   "path": "/kids/check",
   "body": {
    "$file": "inputs/upload.json"
   }
  },
  {
   "id": "vlog",
   "method": "POST",
   "path": "/kids/check",
   "body": {
    "$file": "inputs/vlog.json"
   }
  },
  {
   "id": "empty",
   "method": "POST",
   "path": "/kids/check",
   "expect_status": 400,
   "body": {
    "setting": {
     "made_for_kids": false
    }
   }
  },
  {
   "id": "signoff",
   "method": "POST",
   "path": "/kids/runs/${check.run_id}/signoff",
   "body": {
    "name": "Rehearsal Reviewer",
    "role": "trust and safety lead",
    "confirm": true,
    "designation": "made_for_kids",
    "setting_action": "will_change",
    "decisions": {
     "comments_on": "will_fix",
     "data_requests": "will_fix"
    }
   }
  },
  {
   "id": "verify",
   "method": "POST",
   "path": "/record/verify",
   "auth": false,
   "body": {
    "record": {
     "$ref": "signoff.record"
    }
   }
  },
  {
   "id": "tampered",
   "method": "POST",
   "path": "/record/verify",
   "auth": false,
   "body": {
    "record": {
     "$ref": "signoff.record"
    }
   },
   "tamper": {
    "at": "record.statement.designation",
    "set": "not_made_for_kids"
   }
  },
  {
   "id": "batch",
   "method": "POST",
   "path": "/kids/batch",
   "timeout": 240,
   "body": {
    "items": {
     "$file": "inputs/catalogue.json"
    }
   }
  }
 ],
 "checks": [
  {
   "says": "the counting song is assessed as made for kids",
   "path": "check.report.assessment.designation",
   "equals": "made_for_kids"
  },
  {
   "says": "the channel-default 'not made for kids' setting is a high-severity mismatch",
   "path": "check.report.consistency.status",
   "equals": "mismatch"
  },
  {
   "says": "the mismatch is rated high",
   "path": "check.report.consistency.severity",
   "equals": "high"
  },
  {
   "says": "comments, personalised ads and the request for names and ages are flagged",
   "path": "check.report.flags.id",
   "contains": [
    "comments_on",
    "personalized_ads",
    "data_requests"
   ]
  },
  {
   "says": "every factor answer carries a probability",
   "path": "check.report.factors[p_yes=null]",
   "count": 0
  },
  {
   "says": "the parenting vlog with a toddler on screen is not made for kids",
   "path": "vlog.report.assessment.designation",
   "equals": "not_made_for_kids"
  },
  {
   "says": "the vlog's setting is consistent",
   "path": "vlog.report.consistency.status",
   "equals": "consistent"
  },
  {
   "says": "an upload with nothing to read is refused",
   "path": "empty.error",
   "contains": "send something to check"
  },
  {
   "says": "the signed review record verifies",
   "path": "verify.ok",
   "equals": true
  },
  {
   "says": "a record with the designation changed no longer verifies",
   "path": "tampered.ok",
   "equals": false
  },
  {
   "says": "the back catalogue finds the video with no setting",
   "path": "batch.items[id=bb-006][0].setting_status",
   "equals": "not_set"
  },
  {
   "says": "the back catalogue finds at least one mismatch",
   "path": "batch.items[setting_status=mismatch]",
   "count_min": 1
  },
  {
   "says": "every model call has a signed receipt",
   "receipts": "signed",
   "min": 12
  }
 ]
}