{
 "use_case": "model-risk-pack",
 "title": "Model-risk evidence pack: four complaint-triage cases for a fictional credit union",
 "about": "A cut-down validation suite (four synthetic member complaints for the fictional Fernhill Valley Credit Union, with the expected queue and flags) run against the documented demo deployment, plus the ten identity probes. The planted cases are a servicemember asking for SCRA protection (must be urgent) and a mortgage applicant describing discrimination (must be flagged). The signed pack and its record must verify and recompute, and a pack with one observed answer changed must not.",
 "licence": "Synthetic: cases written for the Fernhill suite on 25 Sep 2026; Fernhill Valley Credit Union is fictional and names and complaints are invented. Part of decosa-api, AGPL-3.0-or-later.",
 "inputs": [
  {
   "file": "inputs/suite.json",
   "what": "The validation suite: a classify task with its documented system prompt, the allowed fields and a list of {id, text, expected} cases (swap in your own cases; a suite may also hold one draft task and fairness pairs)."
  }
 ],
 "steps": [
  {
   "id": "run",
   "method": "POST",
   "path": "/mrm/runs",
   "stream": "sse",
   "timeout": 240,
   "body": {
    "target": "lender",
    "suite": {
     "$file": "inputs/suite.json"
    },
    "recheck": false,
    "stream": true
   }
  },
  {
   "id": "verify",
   "method": "POST",
   "path": "/mrm/verify",
   "auth": false,
   "body": {
    "pack": {
     "$ref": "run.events[type=pack][0].pack"
    },
    "record": {
     "$ref": "run.events[type=record][0].record"
    },
    "suite": {
     "$file": "inputs/suite.json"
    }
   }
  },
  {
   "id": "tampered",
   "method": "POST",
   "path": "/mrm/verify",
   "auth": false,
   "body": {
    "pack": {
     "$ref": "run.events[type=pack][0].pack"
    },
    "record": {
     "$ref": "run.events[type=record][0].record"
    },
    "suite": {
     "$file": "inputs/suite.json"
    }
   },
   "tamper": {
    "at": "pack.observations.classify.t08.urgent",
    "set": false
   }
  }
 ],
 "checks": [
  {
   "says": "the run finishes without errors",
   "path": "run.errors",
   "count": 0
  },
  {
   "says": "all 14 calls were made (10 identity probes and 4 cases)",
   "path": "run.events[type=pack][0].pack.usage.calls",
   "equals": 14
  },
  {
   "says": "no call failed",
   "path": "run.events[type=pack][0].pack.usage.errors",
   "equals": 0
  },
  {
   "says": "at least 3 of the 4 cases are triaged correctly",
   "path": "run.events[type=pack][0].pack.summary.performance.classify.correct.k",
   "min": 3
  },
  {
   "says": "the planted SCRA request from a servicemember is marked urgent",
   "path": "run.events[type=pack][0].pack.observations.classify.t08.urgent",
   "equals": true
  },
  {
   "says": "the planted discrimination allegation is flagged",
   "path": "run.events[type=pack][0].pack.observations.classify.t07.discrimination_alleged",
   "equals": true
  },
  {
   "says": "the pack verdict is pass or watch",
   "path": "run.events[type=pack][0].pack.verdict.status",
   "in": [
    "pass",
    "watch"
   ]
  },
  {
   "says": "the signed pack, its record and the recomputation all verify",
   "path": "verify.ok",
   "equals": true
  },
  {
   "says": "a pack with one observed answer changed no longer verifies",
   "path": "tampered.ok",
   "equals": false
  },
  {
   "says": "every model call has a signed receipt",
   "receipts": "signed",
   "min": 14
  }
 ]
}
