{
  "tool_id": "art-466-dora-roi-builder",
  "note": "Vectors computed directly from the shipped kernel. clean-pass has zero findings; validation-failures exercises LEI-invalid, mandatory-field-missing, dangling-function-reference, dangling-contract-reference, and contract/function-provider-mismatch branches; empty-input exercises the finite empty-input path.",
  "vectors": [
    {
      "name": "clean-pass",
      "description": "Single provider/function/contract chain, all LEIs valid, all references resolve, all mandatory fields present.",
      "policy_parameters": {
        "entity": {
          "entity_name": "Test Bank NV",
          "entity_lei": "529900T8BM49AURSDO55"
        },
        "providers": [
          {
            "provider_id": "prov-1",
            "name": "CloudCo Ireland Ltd",
            "lei": "529900T8BM49AURSDO55",
            "country": "IE",
            "service_type": "cloud_iaas"
          }
        ],
        "functions": [
          {
            "function_id": "fn-1",
            "provider_id": "prov-1",
            "name": "Core banking hosting",
            "critical": true,
            "function_type": "ict_services"
          }
        ],
        "contracts": [
          {
            "contract_id": "ctr-1",
            "function_id": "fn-1",
            "provider_id": "prov-1",
            "contract_reference": "CTR-2026-001",
            "start_date": "2024-01-01",
            "governing_law": "Ireland"
          }
        ]
      },
      "output_payload": {
        "entity": {
          "entity_name": "Test Bank NV",
          "entity_lei": "529900T8BM49AURSDO55"
        },
        "providers": [
          {
            "provider_id": "prov-1",
            "name": "CloudCo Ireland Ltd",
            "lei": "529900T8BM49AURSDO55",
            "country": "IE",
            "service_type": "cloud_iaas"
          }
        ],
        "functions": [
          {
            "function_id": "fn-1",
            "provider_id": "prov-1",
            "name": "Core banking hosting",
            "critical": true,
            "function_type": "ict_services"
          }
        ],
        "contracts": [
          {
            "contract_id": "ctr-1",
            "function_id": "fn-1",
            "provider_id": "prov-1",
            "contract_reference": "CTR-2026-001",
            "start_date": "2024-01-01",
            "end_date": null,
            "governing_law": "Ireland"
          }
        ],
        "validation_report": {
          "summary": {
            "entity_count": 1,
            "provider_count": 1,
            "function_count": 1,
            "contract_count": 1,
            "checks": {
              "lei_validity": {
                "pass": 2,
                "fail": 0
              },
              "referential_integrity": {
                "pass": 4,
                "fail": 0
              },
              "mandatory_fields": {
                "pass": 4,
                "fail": 0
              }
            },
            "overall_pass": true
          },
          "findings": [
            {
              "record_type": "entity",
              "record_id": "entity",
              "check": "mandatory_fields",
              "status": "pass",
              "message": "Entity mandatory fields present."
            },
            {
              "record_type": "entity",
              "record_id": "entity",
              "check": "lei_validity",
              "status": "pass",
              "message": "Entity LEI passes ISO 17442 format + mod-97 check."
            },
            {
              "record_type": "provider",
              "record_id": "prov-1",
              "check": "mandatory_fields",
              "status": "pass",
              "message": "Provider mandatory fields present."
            },
            {
              "record_type": "provider",
              "record_id": "prov-1",
              "check": "lei_validity",
              "status": "pass",
              "message": "Provider prov-1 LEI passes ISO 17442 format + mod-97 check."
            },
            {
              "record_type": "function",
              "record_id": "fn-1",
              "check": "mandatory_fields",
              "status": "pass",
              "message": "Function mandatory fields present."
            },
            {
              "record_type": "function",
              "record_id": "fn-1",
              "check": "referential_integrity",
              "status": "pass",
              "message": "Function fn-1 provider_id resolves."
            },
            {
              "record_type": "contract",
              "record_id": "ctr-1",
              "check": "mandatory_fields",
              "status": "pass",
              "message": "Contract mandatory fields present."
            },
            {
              "record_type": "contract",
              "record_id": "ctr-1",
              "check": "referential_integrity",
              "status": "pass",
              "message": "Contract ctr-1 function_id resolves."
            },
            {
              "record_type": "contract",
              "record_id": "ctr-1",
              "check": "referential_integrity",
              "status": "pass",
              "message": "Contract ctr-1 provider_id resolves."
            },
            {
              "record_type": "contract",
              "record_id": "ctr-1",
              "check": "referential_integrity",
              "status": "pass",
              "message": "Contract ctr-1 provider_id agrees with function fn-1's provider."
            }
          ],
          "compliance_flags": [],
          "table_version": "DORA-ROI-TEMPLATES-STRUCTURAL-2026",
          "table_source": "DORA (EU) 2022/2554 Art. 28/30 (Register of Information); ESAs final RTS/ITS on standard templates for the register of information (JC 2023 85); ISO 17442:2020 + ISO 7064:2003 Mod 97-10 for LEI check-digit validation."
        },
        "note": "Form-shaped internal representation of the DORA Register of Information core template relationships (entity / ICT third-party providers / functions / contractual arrangements), OIM-report-model-shaped. This kernel does NOT emit xBRL-CSV (the RoI's official submission format); it validates LEI format, referential integrity across templates, and mandatory-field completeness only. Criticality designation of functions/providers is a caller-supplied input, not computed here, and is not an approval or sign-off record."
      },
      "golden_hash": "479b7c42cddbc413d147e420bace7b9d189ffbccaaa911aca53976377e8ef4ad"
    },
    {
      "name": "validation-failures",
      "description": "Invalid entity LEI, a provider missing mandatory fields, a function pointing at a non-existent provider, a contract/function provider mismatch, and a contract with a dangling function_id plus missing mandatory fields.",
      "policy_parameters": {
        "entity": {
          "entity_name": "Broken Bank NV",
          "entity_lei": "INVALIDLEI000000000X"
        },
        "providers": [
          {
            "provider_id": "prov-1",
            "name": "CloudCo Ireland Ltd",
            "lei": "529900T8BM49AURSDO55",
            "country": "IE"
          },
          {
            "provider_id": "prov-2",
            "name": "",
            "lei": ""
          }
        ],
        "functions": [
          {
            "function_id": "fn-1",
            "provider_id": "prov-9",
            "name": "Core banking hosting",
            "critical": true
          }
        ],
        "contracts": [
          {
            "contract_id": "ctr-1",
            "function_id": "fn-1",
            "provider_id": "prov-2",
            "contract_reference": "CTR-2026-001",
            "start_date": "2024-01-01",
            "governing_law": "Ireland"
          },
          {
            "contract_id": "ctr-2",
            "function_id": "fn-missing",
            "provider_id": "prov-1",
            "contract_reference": "",
            "start_date": "",
            "governing_law": ""
          }
        ]
      },
      "output_payload": {
        "entity": {
          "entity_name": "Broken Bank NV",
          "entity_lei": "INVALIDLEI000000000X"
        },
        "providers": [
          {
            "provider_id": "prov-1",
            "name": "CloudCo Ireland Ltd",
            "lei": "529900T8BM49AURSDO55",
            "country": "IE",
            "service_type": null
          },
          {
            "provider_id": "prov-2",
            "name": "",
            "lei": null,
            "country": null,
            "service_type": null
          }
        ],
        "functions": [
          {
            "function_id": "fn-1",
            "provider_id": "prov-9",
            "name": "Core banking hosting",
            "critical": true,
            "function_type": null
          }
        ],
        "contracts": [
          {
            "contract_id": "ctr-1",
            "function_id": "fn-1",
            "provider_id": "prov-2",
            "contract_reference": "CTR-2026-001",
            "start_date": "2024-01-01",
            "end_date": null,
            "governing_law": "Ireland"
          },
          {
            "contract_id": "ctr-2",
            "function_id": "fn-missing",
            "provider_id": "prov-1",
            "contract_reference": "",
            "start_date": "",
            "end_date": null,
            "governing_law": ""
          }
        ],
        "validation_report": {
          "summary": {
            "entity_count": 1,
            "provider_count": 2,
            "function_count": 1,
            "contract_count": 2,
            "checks": {
              "lei_validity": {
                "pass": 2,
                "fail": 1
              },
              "referential_integrity": {
                "pass": 3,
                "fail": 3
              },
              "mandatory_fields": {
                "pass": 4,
                "fail": 2
              }
            },
            "overall_pass": false
          },
          "findings": [
            {
              "record_type": "entity",
              "record_id": "entity",
              "check": "mandatory_fields",
              "status": "pass",
              "message": "Entity mandatory fields present."
            },
            {
              "record_type": "entity",
              "record_id": "entity",
              "check": "lei_validity",
              "status": "pass",
              "message": "Entity LEI passes ISO 17442 format + mod-97 check."
            },
            {
              "record_type": "provider",
              "record_id": "prov-1",
              "check": "mandatory_fields",
              "status": "pass",
              "message": "Provider mandatory fields present."
            },
            {
              "record_type": "provider",
              "record_id": "prov-1",
              "check": "lei_validity",
              "status": "pass",
              "message": "Provider prov-1 LEI passes ISO 17442 format + mod-97 check."
            },
            {
              "record_type": "provider",
              "record_id": "prov-2",
              "check": "mandatory_fields",
              "status": "fail",
              "message": "Provider prov-2 missing: name, lei."
            },
            {
              "record_type": "provider",
              "record_id": "prov-2",
              "check": "lei_validity",
              "status": "fail",
              "message": "Provider prov-2 LEI invalid: Not provided."
            },
            {
              "record_type": "function",
              "record_id": "fn-1",
              "check": "mandatory_fields",
              "status": "pass",
              "message": "Function mandatory fields present."
            },
            {
              "record_type": "function",
              "record_id": "fn-1",
              "check": "referential_integrity",
              "status": "fail",
              "message": "Function fn-1 provider_id \"prov-9\" does not resolve to a declared provider."
            },
            {
              "record_type": "contract",
              "record_id": "ctr-1",
              "check": "mandatory_fields",
              "status": "pass",
              "message": "Contract mandatory fields present."
            },
            {
              "record_type": "contract",
              "record_id": "ctr-1",
              "check": "referential_integrity",
              "status": "pass",
              "message": "Contract ctr-1 function_id resolves."
            },
            {
              "record_type": "contract",
              "record_id": "ctr-1",
              "check": "referential_integrity",
              "status": "pass",
              "message": "Contract ctr-1 provider_id resolves."
            },
            {
              "record_type": "contract",
              "record_id": "ctr-1",
              "check": "referential_integrity",
              "status": "fail",
              "message": "Contract ctr-1 declares provider_id \"prov-2\" but its function fn-1 links to provider \"prov-9\"."
            },
            {
              "record_type": "contract",
              "record_id": "ctr-2",
              "check": "mandatory_fields",
              "status": "fail",
              "message": "Contract ctr-2 missing: contract_reference, start_date, governing_law."
            },
            {
              "record_type": "contract",
              "record_id": "ctr-2",
              "check": "referential_integrity",
              "status": "fail",
              "message": "Contract ctr-2 function_id \"fn-missing\" does not resolve to a declared function."
            },
            {
              "record_type": "contract",
              "record_id": "ctr-2",
              "check": "referential_integrity",
              "status": "pass",
              "message": "Contract ctr-2 provider_id resolves."
            }
          ],
          "compliance_flags": [
            "MANDATORY_FIELD_MISSING",
            "LEI_INVALID",
            "DANGLING_FUNCTION_REFERENCE",
            "CONTRACT_FUNCTION_PROVIDER_MISMATCH",
            "DANGLING_CONTRACT_REFERENCE"
          ],
          "table_version": "DORA-ROI-TEMPLATES-STRUCTURAL-2026",
          "table_source": "DORA (EU) 2022/2554 Art. 28/30 (Register of Information); ESAs final RTS/ITS on standard templates for the register of information (JC 2023 85); ISO 17442:2020 + ISO 7064:2003 Mod 97-10 for LEI check-digit validation."
        },
        "note": "Form-shaped internal representation of the DORA Register of Information core template relationships (entity / ICT third-party providers / functions / contractual arrangements), OIM-report-model-shaped. This kernel does NOT emit xBRL-CSV (the RoI's official submission format); it validates LEI format, referential integrity across templates, and mandatory-field completeness only. Criticality designation of functions/providers is a caller-supplied input, not computed here, and is not an approval or sign-off record."
      },
      "golden_hash": "806f1d7cb47c2b86a98e94e9240a37ebbd9894ce4027920e60bcac52f08ac609"
    },
    {
      "name": "empty-input",
      "description": "Empty policy_parameters -- finite, deterministic empty-state output (empty-input finite gate).",
      "policy_parameters": {},
      "output_payload": {
        "entity": {
          "entity_name": null,
          "entity_lei": null
        },
        "providers": [],
        "functions": [],
        "contracts": [],
        "validation_report": {
          "summary": {
            "entity_count": 1,
            "provider_count": 0,
            "function_count": 0,
            "contract_count": 0,
            "checks": {
              "lei_validity": {
                "pass": 0,
                "fail": 1
              },
              "referential_integrity": {
                "pass": 0,
                "fail": 0
              },
              "mandatory_fields": {
                "pass": 0,
                "fail": 1
              }
            },
            "overall_pass": false
          },
          "findings": [
            {
              "record_type": "entity",
              "record_id": "entity",
              "check": "mandatory_fields",
              "status": "fail",
              "message": "Entity missing: entity_name, entity_lei."
            },
            {
              "record_type": "entity",
              "record_id": "entity",
              "check": "lei_validity",
              "status": "fail",
              "message": "Entity LEI not provided."
            }
          ],
          "compliance_flags": [
            "MANDATORY_FIELD_MISSING",
            "LEI_INVALID"
          ],
          "table_version": "DORA-ROI-TEMPLATES-STRUCTURAL-2026",
          "table_source": "DORA (EU) 2022/2554 Art. 28/30 (Register of Information); ESAs final RTS/ITS on standard templates for the register of information (JC 2023 85); ISO 17442:2020 + ISO 7064:2003 Mod 97-10 for LEI check-digit validation."
        },
        "note": "Form-shaped internal representation of the DORA Register of Information core template relationships (entity / ICT third-party providers / functions / contractual arrangements), OIM-report-model-shaped. This kernel does NOT emit xBRL-CSV (the RoI's official submission format); it validates LEI format, referential integrity across templates, and mandatory-field completeness only. Criticality designation of functions/providers is a caller-supplied input, not computed here, and is not an approval or sign-off record."
      },
      "golden_hash": "280436a2a9bb03343c87ba31fda6b083840ea0875afdbb2ff560c1bb111b11bd"
    }
  ]
}
