{
 "use_case": "virtual-staging",
 "title": "Disclosed virtual staging: a doctored window view, an honest staging, and a refused request",
 "about": "An empty old room with arched windows (CC0, Poly Haven) and two images staged from it. In one, the view out of the arched window was swapped for a beach: the check must refuse to label it and name the view. The other only adds furniture: it must pass, get the burned-in 'Virtually staged' label (read back by OCR), a C2PA credential and a signed pair record that verifies, and fails once the original's hash is changed. A request to 'remove the power lines' must be refused before any model call or render.",
 "licence": "Old Room by Sergej Majboroda and Fish Hoek Beach by Greg Zaal and Rico Cilliers (Poly Haven, CC0 1.0); the furniture was drawn by Wan2.2-VACE-Fun-A14B in decosa-api. Part of decosa-api, AGPL-3.0-or-later.",
 "inputs": [
  {
   "file": "inputs/original.jpg",
   "what": "The unaltered empty room (1344x896 perspective view cut from the CC0 panorama)."
  },
  {
   "file": "inputs/view-replaced.jpg",
   "what": "A staged image of it whose left arched window now shows a beach."
  },
  {
   "file": "inputs/staged.jpg",
   "what": "A staged image of it with only a sofa, a coffee table and an armchair added."
  }
 ],
 "steps": [
  {
   "id": "doctored",
   "method": "POST",
   "path": "/staging/runs",
   "timeout": 180,
   "body": {
    "mode": "check",
    "image_b64": {
     "$b64": "inputs/original.jpg"
    },
    "staged_b64": {
     "$b64": "inputs/view-replaced.jpg"
    },
    "stream": false
   }
  },
  {
   "id": "honest",
   "method": "POST",
   "path": "/staging/runs",
   "timeout": 180,
   "body": {
    "mode": "check",
    "image_b64": {
     "$b64": "inputs/original.jpg"
    },
    "staged_b64": {
     "$b64": "inputs/staged.jpg"
    },
    "stream": false
   }
  },
  {
   "id": "verify",
   "method": "POST",
   "path": "/record/verify",
   "auth": false,
   "body": {
    "record": {
     "$ref": "honest.report.record"
    }
   }
  },
  {
   "id": "tampered",
   "method": "POST",
   "path": "/record/verify",
   "auth": false,
   "body": {
    "record": {
     "$ref": "honest.report.record"
    }
   },
   "tamper": {
    "at": "record.statement.original_sha256",
    "set": "0000000000000000000000000000000000000000000000000000000000000000"
   }
  },
  {
   "id": "refused",
   "method": "POST",
   "path": "/staging/runs",
   "expect_status": 422,
   "body": {
    "mode": "stage",
    "image_b64": {
     "$b64": "inputs/original.jpg"
    },
    "instructions": "Add a sofa and remove the power lines outside the window.",
    "stream": false
   }
  }
 ],
 "checks": [
  {
   "says": "the doctored image is not labelled",
   "path": "doctored.status",
   "equals": "not_disclosed"
  },
  {
   "says": "the check fails it",
   "path": "doctored.verdict",
   "equals": "fail"
  },
  {
   "says": "the changed view is named",
   "path": "doctored.report.check.violations.category",
   "contains": [
    "view"
   ]
  },
  {
   "says": "no pair is made for it",
   "path": "doctored.pair_id",
   "equals": null
  },
  {
   "says": "the honest staging is labelled and paired",
   "path": "honest.status",
   "equals": "disclosed"
  },
  {
   "says": "the check passes it",
   "path": "honest.verdict",
   "equals": "pass"
  },
  {
   "says": "the burned-in label reads back",
   "path": "honest.report.label_readback.ok",
   "equals": true
  },
  {
   "says": "it carries a C2PA credential",
   "path": "honest.report.credential.kind",
   "equals": "c2pa"
  },
  {
   "says": "the pair record verifies",
   "path": "verify.ok",
   "equals": true
  },
  {
   "says": "a record with the original's hash changed no longer verifies",
   "path": "tampered.ok",
   "equals": false
  },
  {
   "says": "'remove the power lines' is refused by the word patterns",
   "path": "refused.category",
   "equals": "surroundings"
  },
  {
   "says": "the refusal happens before any model call",
   "path": "refused.layer",
   "equals": "patterns"
  },
  {
   "says": "every model call has a signed receipt",
   "receipts": "signed",
   "min": 4
  }
 ]
}