{
 "use_case": "reg-e-dispute-file",
 "title": "Reg E dispute file: a generic card-not-present denial and a P2P scam",
 "about": "Two synthetic Regulation E disputes. The first: two online debit card charges, one reported more than 60 days after its statement; provisional credit on time but its notice four business days late; a 'no error' letter with no facts, no right to request documents and no documents listed. The file must mark the late notice, the missed clock and each letter gap, refuse to call the file complete, and keep the investigator's determination exactly as entered. The second: a consumer tricked into sending a P2P payment; the file must show the coverage question (with 12 CFR 1005.2(m)) instead of answering it, the claim held for an affidavit, and the determination on business day 13 with no provisional credit. The signed file must verify, and fail once the determination in it is changed.",
 "licence": "Synthetic cases (CC0): consumers, accounts, merchants, banks and investigators are invented (scripts/rege_cases.py). Part of decosa-api, AGPL-3.0-or-later.",
 "inputs": [
  {"file": "inputs/cnp-notice.json", "what": "The first notice: a secure-chat transcript, received 20 Aug 2026."},
  {"file": "inputs/cnp-transactions.csv", "what": "Its account transactions, with the statement dates."},
  {"file": "inputs/cnp-investigation.json", "what": "The investigation: notes, events, the determination entered by the investigator and the results letter."},
  {"file": "inputs/scam-notice.json", "what": "The second notice: a call transcript, received 28 Aug 2026."},
  {"file": "inputs/scam-transactions.csv", "what": "Its account transactions."},
  {"file": "inputs/scam-investigation.json", "what": "Its investigation."}
 ],
 "steps": [
  {"id": "clocks", "method": "POST", "path": "/rege/clocks", "auth": false,
   "body": {"notice": {"$file": "inputs/cnp-notice.json"}, "transactions_csv": {"$file": "inputs/cnp-transactions.csv"}, "disputed_ids": ["T-0512", "T-0714"],
            "investigation": {"$file": "inputs/cnp-investigation.json"}, "today": "2026-09-25"}},
  {"id": "cnp", "method": "POST", "path": "/rege/file",
   "body": {"notice": {"$file": "inputs/cnp-notice.json"}, "transactions_csv": {"$file": "inputs/cnp-transactions.csv"}, "disputed_ids": ["T-0512", "T-0714"],
            "investigation": {"$file": "inputs/cnp-investigation.json"}, "today": "2026-09-25", "title": "Rehearsal: card-not-present, generic denial"}},
  {"id": "verify", "method": "POST", "path": "/record/verify", "auth": false, "body": {"record": {"$ref": "cnp.record"}}},
  {"id": "tampered", "method": "POST", "path": "/record/verify", "auth": false, "body": {"record": {"$ref": "cnp.record"}},
   "tamper": {"at": "record.statement.determination", "set": "error_as_alleged"}},
  {"id": "scam", "method": "POST", "path": "/rege/file",
   "body": {"notice": {"$file": "inputs/scam-notice.json"}, "transactions_csv": {"$file": "inputs/scam-transactions.csv"}, "disputed_ids": ["T-84"],
            "investigation": {"$file": "inputs/scam-investigation.json"}, "today": "2026-09-25", "title": "Rehearsal: P2P scam"}}
 ],
 "checks": [
  {"says": "the provisional credit notice is due two business days after the credit (4 Sep 2026) and came late (no model)", "path": "clocks.rows[id=provisional_credit_notice][0].status", "equals": "missed"},
  {"says": "the May charge was reported more than 60 days after its statement", "path": "clocks.rows[id=notice:T-0512][0].status", "equals": "late_notice"},
  {"says": "a debit card online purchase gets the 90-day period", "path": "clocks.triggers.extended_days", "equals": 90},
  {"says": "the generic 'no error' letter is marked as a gap", "path": "cnp.checklist[id=explanation][0].status", "equals": "gap"},
  {"says": "the missing right-to-documents sentence is marked as a gap", "path": "cnp.checklist[id=right_to_documents][0].status", "equals": "gap"},
  {"says": "the file cannot be closed without the explanation and the documents relied on", "path": "cnp.file_status.cannot_close", "exists": true},
  {"says": "the determination is exactly what the investigator entered", "path": "cnp.determination.by", "equals": "Jordan Okafor"},
  {"says": "and it is recorded as a human decision", "path": "cnp.determination.actor", "equals": "human"},
  {"says": "the signed file verifies", "path": "verify.ok", "equals": true},
  {"says": "a file whose determination was changed no longer verifies", "path": "tampered.ok", "equals": false},
  {"says": "the scam case shows the coverage question instead of answering it", "path": "scam.coverage[id=consumer_sent]", "count": 1},
  {"says": "the determination on business day 13 without provisional credit is a missed clock", "path": "scam.clocks.rows[id=determination][0].status", "equals": "missed"},
  {"says": "holding the claim for an affidavit is marked", "path": "scam.checklist[id=no_delay][0].status", "equals": "gap"},
  {"says": "every model call has a signed receipt", "receipts": "signed", "min": 6}
 ]
}
