{
  "id": "fix-2730",
  "title": "Outbound no longer fully blocked by pack-hash check",
  "kind": "hubspot_sync",
  "linkedIssues": [2730],
  "provenance": {
    "businessScenario": "FIX-2730 — re-prove #2730: outbound push is no longer fully blocked by the pack-hash check. Create a native Lead (default sync=true), poll HubSpot_Id__c writeback, then confirm the HubSpot contact was actually built (id exists = not blocked). PASS (verbatim NEW runbook H FIX-2730): outbound no longer fully blocked. HubSpot_Id__c not written back in budget = FAIL (#2730 reproduced).",
    "reportedBy": "HubSpot sync spec FIX-2730 (hubspot-nexuscrm-sync-CASE-EXEC-SELFCONTAINED)",
    "capturedAt": "2026-06-18",
    "calibrated": "[calibrated] verified native Lead outbound writeback on ksyun; Lead create carries required LastName/Company/Email."
  },
  "steps": [
    {
      "id": "create-lead",
      "system": "nexuscrm",
      "authRole": "admin",
      "method": "POST",
      "path": "/services/data/v63.0/sobjects/Lead",
      "body": {
        "LastName": "Fx2730-{{__runId}}",
        "Company": "C{{__runId}}",
        "Email": "fx2730-{{__runId}}@example.com",
        "HubSpot_Sync_Enabled__c": true
      },
      "expectStatusRange": [200, 299],
      "assertions": [
        { "path": "response.body.id", "exists": true }
      ]
    },
    {
      "id": "wait-hubspot-id",
      "system": "nexuscrm",
      "authRole": "admin",
      "method": "GET",
      "path": "/services/data/v63.0/query?q=SELECT HubSpot_Id__c FROM Lead WHERE Id='{{steps.create-lead.response.body.id}}' LIMIT 1",
      "expectStatus": 200,
      "poll": { "budgetMs": 90000, "intervalMs": 6000 },
      "onTimeout": "fail",
      "assertions": [
        { "path": "response.body.records[0].HubSpot_Id__c", "exists": true }
      ]
    },
    {
      "id": "assert-hubspot",
      "system": "hubspot",
      "method": "GET",
      "path": "/crm/v3/objects/contacts/{{steps.wait-hubspot-id.response.body.records[0].HubSpot_Id__c}}",
      "expectStatus": 200,
      "assertions": [
        { "path": "response.body.id", "exists": true }
      ]
    }
  ]
}
