{
 "use_case": "review-reply",
 "title": "Review reply: a dentist's 5-star review that names the dentist, the crown and a staff member",
 "about": "A synthetic review for a made-up dental practice. The reply must pass every check, never confirm the reviewer is a patient, never name the dentist, the staff member or the reviewer, never mention the crown or the insurance; every model call has a signed receipt; the signed record verifies and a tampered one fails.",
 "licence": "Synthetic: the practice, people and review are invented. Part of decosa-api.",
 "inputs": [
  {
   "file": "inputs/review.json",
   "what": "The review, the stars, the business name and type, and the reviewer's display name."
  }
 ],
 "steps": [
  {
   "id": "reply",
   "method": "POST",
   "path": "/reviews/reply",
   "body": {
    "$file": "inputs/review.json"
   }
  },
  {
   "id": "check",
   "method": "POST",
   "path": "/reviews/check",
   "body": {
    "review": "Dr. Alvarez fixed my cracked crown in one visit and it didn't hurt at all. Priya at the front desk even got my insurance sorted. Best dental office in town!",
    "rating": 5,
    "business_name": "Juniper Street Dental",
    "business_type": "Dentist",
    "reviewer_name": "Morgan T.",
    "reply": "Thanks Morgan! So glad Dr. Alvarez could fix your crown. See you at your next cleaning."
   }
  },
  {
   "id": "verify",
   "method": "POST",
   "path": "/record/verify",
   "auth": false,
   "body": {
    "record": {
     "$ref": "reply.record"
    }
   }
  },
  {
   "id": "tampered",
   "method": "POST",
   "path": "/record/verify",
   "auth": false,
   "body": {
    "record": {
     "$ref": "reply.record"
    }
   },
   "tamper": {
    "at": "record.statement.source",
    "set": "edited"
   }
  }
 ],
 "checks": [
  {
   "says": "the practice is treated as healthcare",
   "path": "reply.healthcare",
   "equals": true
  },
  {
   "says": "the final reply passes every check",
   "path": "reply.check.ok",
   "equals": true
  },
  {
   "says": "the reply never names the dentist",
   "path": "reply.reply",
   "not_contains": "Alvarez"
  },
  {
   "says": "the reply never names the staff member",
   "path": "reply.reply",
   "not_contains": "Priya"
  },
  {
   "says": "the reply never uses the reviewer's name",
   "path": "reply.reply",
   "not_contains": "Morgan"
  },
  {
   "says": "the reply never mentions the crown",
   "path": "reply.reply",
   "not_contains": "crown"
  },
  {
   "says": "the reply is signed off with the practice name",
   "path": "reply.reply",
   "contains": "– Juniper Street Dental"
  },
  {
   "says": "an owner's reply that confirms the visit is refused",
   "path": "check.ok",
   "equals": false
  },
  {
   "says": "the refusal names patient privacy",
   "path": "check.problems",
   "contains": "(patient privacy)"
  },
  {
   "says": "the signed record verifies",
   "path": "verify.ok",
   "equals": true
  },
  {
   "says": "a record with its source changed no longer verifies",
   "path": "tampered.ok",
   "equals": false
  },
  {
   "says": "every model call has a signed receipt",
   "receipts": "signed",
   "min": 1
  }
 ]
}