{
  "id": "elig-01",
  "title": "HubSpot contact with no email still materializes a Lead",
  "kind": "hubspot_sync",
  "executionMode": "serial",
  "executionModeReason": "Inbound materialization can miss the 90s poll window under shared HubSpot webhook queue pressure; keep this no-email eligibility probe isolated while the rest of the 54-case suite runs in parallel.",
  "caseTimeoutMs": 240000,
  "linkedIssues": [],
  "provenance": {
    "businessScenario": "ELIG-01 — a HubSpot contact created without an email must still be eligible to materialize as a NexusCRM Lead; email is not an inbound eligibility gate.",
    "reportedBy": "HubSpot sync spec ELIG-01 (hubspot-nexuscrm-sync-CASE-EXEC-SELFCONTAINED)",
    "capturedAt": "2026-06-17"
  },
  "steps": [
    {
      "id": "hs",
      "system": "hubspot",
      "method": "POST",
      "path": "/crm/v3/objects/contacts",
      "body": {
        "properties": {
          "firstname": "NoEmail",
          "lastname": "Elig{{__runId}}"
        }
      },
      "expectStatusRange": [
        200,
        299
      ],
      "assertions": [
        {
          "path": "response.body.id",
          "exists": true
        }
      ]
    },
    {
      "id": "leadQ",
      "system": "nexuscrm",
      "authRole": "admin",
      "method": "GET",
      "path": "/services/data/v63.0/query?q=SELECT Id, FirstName, LastName FROM Lead WHERE HubSpot_Id__c = '{{steps.hs.response.body.id}}'",
      "expectStatus": 200,
      "poll": {
        "budgetMs": 180000,
        "intervalMs": 6000
      },
      "onTimeout": "blocked",
      "assertions": [
        {
          "path": "response.body.totalSize",
          "atLeast": 1
        },
        {
          "path": "response.body.records[0].FirstName",
          "equals": "NoEmail"
        }
      ],
      "timeoutMs": 8000
    }
  ]
}
