{
  "id": "LC-INVALID-LEADID",
  "name": "convertLead with a non-existent leadId returns SF-native MALFORMED_ID",
  "description": "Phase-1 Finding-3 regression: GetLead recordLookup with getFirstRecordOnly stamps $lead=nil when the id misses. Without the ValidateLeadExists decision added to Std_ConvertLead.flow.json, the next decision evaluates $lead.IsConverted against nil, falls through, and the first downstream recordCreate (which uses fieldMapping.sourceReference=$lead) raises the internal 'source is not an SObject' error — a leaky implementation detail instead of a clean SF-shaped MALFORMED_ID. This case sends a leadId that is syntactically valid but does not exist, and asserts the response carries statusCode=MALFORMED_ID with a message naming leadId. The legacy StandardActionsHandler (deleted in commit 372c6121) had this guard via h.persistence.Retrieve before any state mutation; the new flow must match.",
  "object": "LeadConvert",
  "method": "POST",
  "endpoint": "/services/data/v63.0/actions/standard/convertLead",
  "payload": {
    "inputs": [
      {
        "leadId": "00Q000000000000AAA",
        "convertedStatus": "Converted",
        "doNotCreateOpportunity": true
      }
    ]
  },
  "expects": {
    "status_code": 200
  },
  "response_assertions": [
    {"field": "0.isSuccess", "operator": "eq", "value": false},
    {"field": "0.errors.0.statusCode", "operator": "eq", "value": "MALFORMED_ID"}
  ],
  "priority": "P0",
  "scene": "lead_convert"
}
