{
  "engine": "ironparse",
  "layer": "deterministic-verification",
  "copybook": "ACORD_MINI_NIGHTMARE.CPY",
  "verdict": "PASS",
  "inputSha256": "51a20e49ae1b300607d6e2bddfe7fbdea6bd9aee4cad3e1eab1cbdf8c87e8be6",
  "outputSha256": "d82c6b39aa03825c5369ddbe1255a2fda42d32f5bb0ee196fd959392fd32bd32",
  "counts": {
    "records": 8,
    "elementaryFields": 25,
    "redefines": 2,
    "occursDependingOn": 3,
    "fixedOccurs": 0
  },
  "gates": [
    {
      "id": "01",
      "name": "PARSER",
      "detail": "Deterministic AST extraction yields a non-empty, field-bearing record set. No LLM involved.",
      "pass": true,
      "measure": "8 records · 25 elementary fields"
    },
    {
      "id": "02",
      "name": "SCHEMA_SANITY",
      "detail": "Candidate schema parses as valid Zod — balanced delimiters, no markdown fences, no prose.",
      "pass": true,
      "measure": "valid Zod module"
    },
    {
      "id": "03",
      "name": "FIELD_PARITY",
      "detail": "len(COBOL elementary fields) === len(emitted schema leaves). Off by one and the build fails.",
      "pass": true,
      "measure": "COBOL 25 ⇄ schema 25"
    },
    {
      "id": "04",
      "name": "DARK_CORNER",
      "detail": "Every REDEFINES overlay compiles to a union (discriminated where a record-type byte exists); every OCCURS to a dynamic array.",
      "pass": true,
      "measure": "2/2 overlays · 3/3 arrays"
    },
    {
      "id": "05",
      "name": "MOCK_STRUCTURE",
      "detail": "A mock document generated from the schema re-validates against it — the schema is internally consistent.",
      "pass": true,
      "measure": "28 nodes round-tripped"
    }
  ],
  "mappings": [
    {
      "cobol": "TRANSACTION-TYPE",
      "level": 2,
      "pic": "X(4)",
      "storage": "alphanumeric (4 chars)",
      "tsPath": "acordMiniRecord.transactionType",
      "tsType": "z.string().max(4)"
    },
    {
      "cobol": "MESSAGE-ID",
      "level": 2,
      "pic": "X(8)",
      "storage": "alphanumeric (8 chars)",
      "tsPath": "acordMiniRecord.messageId",
      "tsType": "z.string().max(8)"
    },
    {
      "cobol": "POLICY-NUMBER",
      "level": 2,
      "pic": "X(20)",
      "storage": "alphanumeric (20 chars)",
      "tsPath": "acordMiniRecord.policyNumber",
      "tsType": "z.string().max(20)"
    },
    {
      "cobol": "NAME-TYPE",
      "level": 2,
      "pic": "X(1)",
      "storage": "alphanumeric (1 chars)",
      "tsPath": "insuredNameData.nameType",
      "tsType": "z.string().max(1)"
    },
    {
      "cobol": "INSURED-LAST-NAME",
      "level": 2,
      "pic": "X(30)",
      "storage": "alphanumeric (30 chars)",
      "tsPath": "insuredNameData.insuredLastName",
      "tsType": "z.string().max(30)"
    },
    {
      "cobol": "INSURED-FIRST-NAME",
      "level": 2,
      "pic": "X(20)",
      "storage": "alphanumeric (20 chars)",
      "tsPath": "insuredNameData.insuredFirstName",
      "tsType": "z.string().max(20)"
    },
    {
      "cobol": "ADDR-INDICATOR",
      "level": 2,
      "pic": "X(1)",
      "storage": "alphanumeric (1 chars)",
      "tsPath": "insuredAddressData.addrIndicator",
      "tsType": "z.string().max(1)"
    },
    {
      "cobol": "ADDRESS-LINE-1",
      "level": 2,
      "pic": "X(35)",
      "storage": "alphanumeric (35 chars)",
      "tsPath": "insuredAddressData.addressLine1",
      "tsType": "z.string().max(35)"
    },
    {
      "cobol": "CITY",
      "level": 2,
      "pic": "X(25)",
      "storage": "alphanumeric (25 chars)",
      "tsPath": "insuredAddressData.city",
      "tsType": "z.string().max(25)"
    },
    {
      "cobol": "POLICY-EFF-DATE",
      "level": 2,
      "pic": "X(8)",
      "storage": "alphanumeric (8 chars)",
      "tsPath": "policyInfo.policyEffDate",
      "tsType": "z.string().max(8)"
    },
    {
      "cobol": "POLICY-EXP-DATE",
      "level": 2,
      "pic": "X(8)",
      "storage": "alphanumeric (8 chars)",
      "tsPath": "policyInfo.policyExpDate",
      "tsType": "z.string().max(8)"
    },
    {
      "cobol": "PREMIUM-AMOUNT",
      "level": 2,
      "pic": "S9(9)V99 COMP-3",
      "storage": "packed decimal (COMP-3, signed, scaled)",
      "tsPath": "policyInfo.premiumAmount",
      "tsType": "z.number()"
    },
    {
      "cobol": "VEHICLE-COUNT",
      "level": 2,
      "pic": "9(2)",
      "storage": "display numeric (2 digits)",
      "tsPath": "vehicleData.vehicleCount",
      "tsType": "z.string().regex(/^\\d{1,2}$/)"
    },
    {
      "cobol": "VIN",
      "level": 3,
      "pic": "X(17)",
      "storage": "alphanumeric (17 chars)",
      "tsPath": "vehicleData.vehicleEntry[].vin",
      "tsType": "z.string().max(17)"
    },
    {
      "cobol": "YEAR",
      "level": 3,
      "pic": "9(4)",
      "storage": "display numeric (4 digits)",
      "tsPath": "vehicleData.vehicleEntry[].year",
      "tsType": "z.string().regex(/^\\d{1,4}$/)"
    },
    {
      "cobol": "MAKE",
      "level": 3,
      "pic": "X(15)",
      "storage": "alphanumeric (15 chars)",
      "tsPath": "vehicleData.vehicleEntry[].make",
      "tsType": "z.string().max(15)"
    },
    {
      "cobol": "COVERAGE-IND",
      "level": 2,
      "pic": "X(1)",
      "storage": "alphanumeric (1 chars)",
      "tsPath": "coverageData.coverageInd",
      "tsType": "z.string().max(1)"
    },
    {
      "cobol": "COVERAGE-LINE-1",
      "level": 2,
      "pic": "X(40)",
      "storage": "alphanumeric (40 chars)",
      "tsPath": "coverageData.coverageLine1",
      "tsType": "z.string().max(40)"
    },
    {
      "cobol": "COVERAGE-LINE-2",
      "level": 2,
      "pic": "X(40)",
      "storage": "alphanumeric (40 chars)",
      "tsPath": "coverageData.coverageLine2",
      "tsType": "z.string().max(40)"
    },
    {
      "cobol": "DRIVER-COUNT",
      "level": 2,
      "pic": "9(1)",
      "storage": "display numeric (1 digits)",
      "tsPath": "driverInfo.driverCount",
      "tsType": "z.string().regex(/^\\d{1,1}$/)"
    },
    {
      "cobol": "DRIVER-NAME",
      "level": 3,
      "pic": "X(30)",
      "storage": "alphanumeric (30 chars)",
      "tsPath": "driverInfo.driverEntry[].driverName",
      "tsType": "z.string().max(30)"
    },
    {
      "cobol": "LICENSE-NUMBER",
      "level": 3,
      "pic": "X(20)",
      "storage": "alphanumeric (20 chars)",
      "tsPath": "driverInfo.driverEntry[].licenseNumber",
      "tsType": "z.string().max(20)"
    },
    {
      "cobol": "CLAIM-COUNT",
      "level": 2,
      "pic": "9(3)",
      "storage": "display numeric (3 digits)",
      "tsPath": "claimHistory.claimCount",
      "tsType": "z.string().regex(/^\\d{1,3}$/)"
    },
    {
      "cobol": "CLAIM-DATE",
      "level": 3,
      "pic": "X(8)",
      "storage": "alphanumeric (8 chars)",
      "tsPath": "claimHistory.claimEntry[].claimDate",
      "tsType": "z.string().max(8)"
    },
    {
      "cobol": "CLAIM-AMOUNT",
      "level": 3,
      "pic": "S9(7)V99 COMP-3",
      "storage": "packed decimal (COMP-3, signed, scaled)",
      "tsPath": "claimHistory.claimEntry[].claimAmount",
      "tsType": "z.number()"
    }
  ],
  "schema": "import { z } from \"zod\";\n\nexport const RecordSchema = z.object({\n  acordMiniRecord: z.object({\n    transactionType: z.string().max(4),\n    messageId: z.string().max(8),\n    policyNumber: z.string().max(20),\n  }),\n  // REDEFINES overlay: INSURED-NAME-DATA / INSURED-ADDRESS-DATA\n  insuredNameData: z.union([\n    z.object({\n      nameType: z.string().max(1),\n      insuredLastName: z.string().max(30),\n      insuredFirstName: z.string().max(20),\n    }),\n    z.object({\n      addrIndicator: z.string().max(1),\n      addressLine1: z.string().max(35),\n      city: z.string().max(25),\n    })\n  ]),\n  policyInfo: z.object({\n    policyEffDate: z.string().max(8),\n    policyExpDate: z.string().max(8),\n    premiumAmount: z.number(),\n  }),\n  // REDEFINES overlay: VEHICLE-DATA / COVERAGE-DATA\n  vehicleData: z.union([\n    z.object({\n      vehicleCount: z.string().regex(/^\\d{1,2}$/),\n      vehicleEntry: z.array(z.object({\n        vin: z.string().max(17),\n        year: z.string().regex(/^\\d{1,4}$/),\n        make: z.string().max(15),\n      })).max(5) /* OCCURS 0..5 DEPENDING ON VEHICLE-COUNT */,\n    }),\n    z.object({\n      coverageInd: z.string().max(1),\n      coverageLine1: z.string().max(40),\n      coverageLine2: z.string().max(40),\n    })\n  ]),\n  driverInfo: z.object({\n    driverCount: z.string().regex(/^\\d{1,1}$/),\n    driverEntry: z.array(z.object({\n      driverName: z.string().max(30),\n      licenseNumber: z.string().max(20),\n    })).max(3) /* OCCURS 0..3 DEPENDING ON DRIVER-COUNT */,\n  }),\n  claimHistory: z.object({\n    claimCount: z.string().regex(/^\\d{1,3}$/),\n    claimEntry: z.array(z.object({\n      claimDate: z.string().max(8),\n      claimAmount: z.number(),\n    })).max(10) /* OCCURS 0..10 DEPENDING ON CLAIM-COUNT */,\n  }),\n});\n\nexport type Record = z.infer<typeof RecordSchema>;"
}