{
  "id": "AUDIT-GAP-003",
  "name": "Multi-field UPDATE populates ChangesJSON on head row",
  "description": "Regression case for the NULL ChangesJSON gap. A PATCH that changes Name+Description+Industry must produce a head row whose ChangesJSON field lists all three names. Before the fix, ChangesJSON was always NULL and forensic replay had to join the outbox row.",
  "scene": "audit_log",
  "object": "_System_AuditLog",
  "setup": [
    {
      "name": "create-account",
      "method": "POST",
      "endpoint": "/services/data/v63.0/sobjects/Account",
      "payload": {
        "Name": "Audit CHANGES {timestamp}",
        "Description": "before",
        "Industry": "ISV/SaaS-Software"
      },
      "expected_status": 201,
      "id_var": "acct_id"
    },
    {
      "name": "patch-multi-field",
      "method": "PATCH",
      "endpoint": "/services/data/v63.0/sobjects/Account/{acct_id}",
      "payload": {
        "Name": "Audit CHANGES patched {timestamp}",
        "Description": "after",
        "Industry": "FSI-Financial Service"
      },
      "expected_status": 204
    }
  ],
  "method": "GET",
  "endpoint": "/services/data/v63.0/admin/audit/log?object=Account&recordId={acct_id}&limit=50",
  "expects": {"status_code": 200},
  "response_assertions": [
    {"field": "records.0.Action", "operator": "eq", "value": "UPDATE"},
    {"field": "records.0.ChangesJSON", "operator": "contains", "value": "Name"},
    {"field": "records.0.ChangesJSON", "operator": "contains", "value": "Description"},
    {"field": "records.0.ChangesJSON", "operator": "contains", "value": "Industry"}
  ],
  "priority": "P1"
}
