{
  "schema": "agents-by-task-fixture-result/1",
  "fixtureId": "pdf-to-crm-reference/1",
  "task": "turn-pdf-into-crm-record",
  "kind": "task_run",
  "outcome": "passed",
  "runner": "author-run local reference fixture (AgentsByTask build)",
  "recipe": "research/workflows.md#local-reference-run",
  "startedAt": "2026-11-08T23:08:03.464385Z",
  "finishedAt": "2026-11-08T23:08:03.467694Z",
  "environment": {
    "description": "Local synthetic born-digital PDF and in-memory SQLite table. No vendor account.",
    "python": "3.13.3",
    "pypdf": "6.14.2",
    "sqlite": "3.49.1",
    "platform": "macOS-26.6.2",
    "networkGuard": "socket.socket and socket.create_connection blocked during cases"
  },
  "inputs": {
    "completePdfSha256": "3f480190cb6e51cc2d1aefbce14ed5f6ff5465bdfb517f5afaed9b437b151111",
    "missingEmailPdfSha256": "2c21425bfc15ccbd7273e8161a1751693482fd7a5c2ace6970d77503b866a3a0",
    "completePdfBytes": 706,
    "missingEmailPdfBytes": 662,
    "syntheticData": "Taylor Reed, taylor@example.invalid, Example Design (reserved .invalid domain)"
  },
  "scriptSha256": "626ced2ca81a481e0d5f2fb786bb06858ccbd9e16c5450f0c4c10dbeb1ab4c2b",
  "approvalPoint": "Write only after explicit approval of the extracted fields; missing required fields go to review.",
  "cases": [
    {
      "id": "before-approval",
      "description": "Complete PDF, proposal shown, no approval given",
      "approved": false,
      "expectedStatus": "review_required",
      "observedStatus": "review_required",
      "rowsBefore": 0,
      "rowsAfter": 0,
      "extractedFieldNames": [
        "Company",
        "Email",
        "First name",
        "Last name"
      ],
      "passed": true
    },
    {
      "id": "approved-write",
      "description": "Same PDF after approval: upsert the contact",
      "approved": true,
      "expectedStatus": "upserted",
      "observedStatus": "upserted",
      "rowsBefore": 0,
      "rowsAfter": 1,
      "extractedFieldNames": [
        "Company",
        "Email",
        "First name",
        "Last name"
      ],
      "passed": true
    },
    {
      "id": "replay",
      "description": "Repeat the approved write (retry/replay)",
      "approved": true,
      "expectedStatus": "upserted",
      "observedStatus": "upserted",
      "rowsBefore": 1,
      "rowsAfter": 1,
      "extractedFieldNames": [
        "Company",
        "Email",
        "First name",
        "Last name"
      ],
      "passed": true
    },
    {
      "id": "missing-email",
      "description": "Second PDF without an email line, approved",
      "approved": true,
      "expectedStatus": "needs_review",
      "observedStatus": "needs_review",
      "rowsBefore": 1,
      "rowsAfter": 1,
      "extractedFieldNames": [
        "Company",
        "First name",
        "Last name"
      ],
      "passed": true
    }
  ],
  "checks": {
    "zeroRowsBeforeApproval": true,
    "oneRowAfterApproval": true,
    "replayDidNotDuplicate": true,
    "missingInputRoutedToReview": true,
    "destinationReadMatchesExpected": true,
    "noExternalCalls": true
  },
  "verification": {
    "method": "Independent SELECT of every row in the destination table after all cases",
    "expectedRows": [
      [
        "taylor@example.invalid",
        "Taylor",
        "Reed",
        "Example Design"
      ]
    ],
    "observedRows": [
      [
        "taylor@example.invalid",
        "Taylor",
        "Reed",
        "Example Design"
      ]
    ],
    "matches": true
  },
  "counts": {
    "cases": 4,
    "casesPassed": 4,
    "verifiedRecords": 1
  },
  "externalCallAttempts": 0,
  "meteredSpendUsd": 0,
  "costScope": "Metered external provider charges only. Local compute and operator time excluded.",
  "outOfScope": [
    "HubSpot, n8n, Docling, Mistral OCR, Power Automate and every live CRM",
    "Image-only or scanned PDFs",
    "Malformed email, ambiguous duplicate and unavailable destination cases"
  ]
}
