{
  "schema_version": "d30-many-full-fixtures-v1",
  "cases": [
    {
      "id": "unique-2x2",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "ok",
        "code": "GROUP_SEARCH_COMPLETE",
        "coverage": {
          "internal": {
            "source_id": "SOURCE-I",
            "receipt_ref": "HEAD-I",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          },
          "external": {
            "source_id": "SOURCE-E",
            "receipt_ref": "HEAD-E",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          }
        },
        "selected": {
          "internal": [
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "120",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "180",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "external": [
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "140",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "160",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "withdrawn": {
            "internal": [],
            "external": []
          },
          "out_of_window_counts": {
            "internal": "0",
            "external": "0"
          }
        },
        "components": [
          {
            "component_id": "POOL-01",
            "status": "unique",
            "code": "UNIQUE_GROUP",
            "comparisons": "9",
            "exhaustive": true,
            "candidate_count_lower_bound": "1",
            "witnesses": [
              {
                "internal_row_refs": [
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  },
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-01",
                    "revision": "1",
                    "sequence": "2",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "external_row_refs": [
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  },
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-01",
                    "revision": "1",
                    "sequence": "2",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "internal_sum_minor": "300",
                "external_sum_minor": "300",
                "fee_minor": "0",
                "booking_date_span_days": 0,
                "cardinality": "many-to-many"
              }
            ],
            "unused_internal_row_refs": [],
            "unused_external_row_refs": []
          }
        ],
        "proposals": [
          {
            "component_id": "POOL-01",
            "status": "review-proposal",
            "witness": {
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "internal_sum_minor": "300",
              "external_sum_minor": "300",
              "fee_minor": "0",
              "booking_date_span_days": 0,
              "cardinality": "many-to-many"
            }
          }
        ],
        "unassigned": []
      }
    },
    {
      "id": "batched-2x1",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "100",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "200",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "300",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "1",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "ok",
        "code": "GROUP_SEARCH_COMPLETE",
        "coverage": {
          "internal": {
            "source_id": "SOURCE-I",
            "receipt_ref": "HEAD-I",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          },
          "external": {
            "source_id": "SOURCE-E",
            "receipt_ref": "HEAD-E",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "1",
            "validated_through_sequence": "1",
            "visible_through_sequence": "1"
          }
        },
        "selected": {
          "internal": [
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "100",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "200",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "external": [
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "300",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "withdrawn": {
            "internal": [],
            "external": []
          },
          "out_of_window_counts": {
            "internal": "0",
            "external": "0"
          }
        },
        "components": [
          {
            "component_id": "POOL-01",
            "status": "unique",
            "code": "UNIQUE_GROUP",
            "comparisons": "3",
            "exhaustive": true,
            "candidate_count_lower_bound": "1",
            "witnesses": [
              {
                "internal_row_refs": [
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  },
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-01",
                    "revision": "1",
                    "sequence": "2",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "external_row_refs": [
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "internal_sum_minor": "300",
                "external_sum_minor": "300",
                "fee_minor": "0",
                "booking_date_span_days": 0,
                "cardinality": "many-to-one"
              }
            ],
            "unused_internal_row_refs": [],
            "unused_external_row_refs": []
          }
        ],
        "proposals": [
          {
            "component_id": "POOL-01",
            "status": "review-proposal",
            "witness": {
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "internal_sum_minor": "300",
              "external_sum_minor": "300",
              "fee_minor": "0",
              "booking_date_span_days": 0,
              "cardinality": "many-to-one"
            }
          }
        ],
        "unassigned": []
      }
    },
    {
      "id": "split-1x2",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "300",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "100",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "200",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "1",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "ok",
        "code": "GROUP_SEARCH_COMPLETE",
        "coverage": {
          "internal": {
            "source_id": "SOURCE-I",
            "receipt_ref": "HEAD-I",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "1",
            "validated_through_sequence": "1",
            "visible_through_sequence": "1"
          },
          "external": {
            "source_id": "SOURCE-E",
            "receipt_ref": "HEAD-E",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          }
        },
        "selected": {
          "internal": [
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "300",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "external": [
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "100",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "200",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "withdrawn": {
            "internal": [],
            "external": []
          },
          "out_of_window_counts": {
            "internal": "0",
            "external": "0"
          }
        },
        "components": [
          {
            "component_id": "POOL-01",
            "status": "unique",
            "code": "UNIQUE_GROUP",
            "comparisons": "3",
            "exhaustive": true,
            "candidate_count_lower_bound": "1",
            "witnesses": [
              {
                "internal_row_refs": [
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "external_row_refs": [
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  },
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-01",
                    "revision": "1",
                    "sequence": "2",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "internal_sum_minor": "300",
                "external_sum_minor": "300",
                "fee_minor": "0",
                "booking_date_span_days": 0,
                "cardinality": "one-to-many"
              }
            ],
            "unused_internal_row_refs": [],
            "unused_external_row_refs": []
          }
        ],
        "proposals": [
          {
            "component_id": "POOL-01",
            "status": "review-proposal",
            "witness": {
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "internal_sum_minor": "300",
              "external_sum_minor": "300",
              "fee_minor": "0",
              "booking_date_span_days": 0,
              "cardinality": "one-to-many"
            }
          }
        ],
        "unassigned": []
      }
    },
    {
      "id": "fee-inflow",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": {
                "fee_id": "FEE-01",
                "amount_minor": "10",
                "available_at": "2026-10-09T08:00:00.000Z",
                "receipt_ref": "FEE-DOCUMENT-01"
              }
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "150",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "ok",
        "code": "GROUP_SEARCH_COMPLETE",
        "coverage": {
          "internal": {
            "source_id": "SOURCE-I",
            "receipt_ref": "HEAD-I",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          },
          "external": {
            "source_id": "SOURCE-E",
            "receipt_ref": "HEAD-E",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          }
        },
        "selected": {
          "internal": [
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "120",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "180",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "external": [
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "140",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "150",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "withdrawn": {
            "internal": [],
            "external": []
          },
          "out_of_window_counts": {
            "internal": "0",
            "external": "0"
          }
        },
        "components": [
          {
            "component_id": "POOL-01",
            "status": "unique",
            "code": "UNIQUE_GROUP",
            "comparisons": "9",
            "exhaustive": true,
            "candidate_count_lower_bound": "1",
            "witnesses": [
              {
                "internal_row_refs": [
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  },
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-01",
                    "revision": "1",
                    "sequence": "2",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "external_row_refs": [
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  },
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-01",
                    "revision": "1",
                    "sequence": "2",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "internal_sum_minor": "300",
                "external_sum_minor": "290",
                "fee_minor": "10",
                "booking_date_span_days": 0,
                "cardinality": "many-to-many"
              }
            ],
            "unused_internal_row_refs": [],
            "unused_external_row_refs": []
          }
        ],
        "proposals": [
          {
            "component_id": "POOL-01",
            "status": "review-proposal",
            "witness": {
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "internal_sum_minor": "300",
              "external_sum_minor": "290",
              "fee_minor": "10",
              "booking_date_span_days": 0,
              "cardinality": "many-to-many"
            }
          }
        ],
        "unassigned": []
      }
    },
    {
      "id": "fee-outflow",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "outflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": {
                "fee_id": "FEE-01",
                "amount_minor": "10",
                "available_at": "2026-10-09T08:00:00.000Z",
                "receipt_ref": "FEE-DOCUMENT-01"
              }
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "outflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "outflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "outflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "outflow",
                  "amount_minor": "170",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "ok",
        "code": "GROUP_SEARCH_COMPLETE",
        "coverage": {
          "internal": {
            "source_id": "SOURCE-I",
            "receipt_ref": "HEAD-I",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          },
          "external": {
            "source_id": "SOURCE-E",
            "receipt_ref": "HEAD-E",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          }
        },
        "selected": {
          "internal": [
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "outflow",
                "amount_minor": "120",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "outflow",
                "amount_minor": "180",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "external": [
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "outflow",
                "amount_minor": "140",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "outflow",
                "amount_minor": "170",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "withdrawn": {
            "internal": [],
            "external": []
          },
          "out_of_window_counts": {
            "internal": "0",
            "external": "0"
          }
        },
        "components": [
          {
            "component_id": "POOL-01",
            "status": "unique",
            "code": "UNIQUE_GROUP",
            "comparisons": "9",
            "exhaustive": true,
            "candidate_count_lower_bound": "1",
            "witnesses": [
              {
                "internal_row_refs": [
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  },
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-01",
                    "revision": "1",
                    "sequence": "2",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "external_row_refs": [
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  },
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-01",
                    "revision": "1",
                    "sequence": "2",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "internal_sum_minor": "300",
                "external_sum_minor": "310",
                "fee_minor": "10",
                "booking_date_span_days": 0,
                "cardinality": "many-to-many"
              }
            ],
            "unused_internal_row_refs": [],
            "unused_external_row_refs": []
          }
        ],
        "proposals": [
          {
            "component_id": "POOL-01",
            "status": "review-proposal",
            "witness": {
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "internal_sum_minor": "300",
              "external_sum_minor": "310",
              "fee_minor": "10",
              "booking_date_span_days": 0,
              "cardinality": "many-to-many"
            }
          }
        ],
        "unassigned": []
      }
    },
    {
      "id": "fee-not-a-plug",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "150",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "ok",
        "code": "GROUP_SEARCH_COMPLETE",
        "coverage": {
          "internal": {
            "source_id": "SOURCE-I",
            "receipt_ref": "HEAD-I",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          },
          "external": {
            "source_id": "SOURCE-E",
            "receipt_ref": "HEAD-E",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          }
        },
        "selected": {
          "internal": [
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "120",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "180",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "external": [
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "140",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "150",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "withdrawn": {
            "internal": [],
            "external": []
          },
          "out_of_window_counts": {
            "internal": "0",
            "external": "0"
          }
        },
        "components": [
          {
            "component_id": "POOL-01",
            "status": "no-match",
            "code": "NO_GROUP_MATCH",
            "comparisons": "9",
            "exhaustive": true,
            "candidate_count_lower_bound": "0",
            "witnesses": [],
            "unused_internal_row_refs": [
              {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              {
                "source_id": "SOURCE-I",
                "row_id": "I-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              }
            ],
            "unused_external_row_refs": [
              {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              {
                "source_id": "SOURCE-E",
                "row_id": "E-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              }
            ]
          }
        ],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "one-to-one",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "100",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "100",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "1",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "1",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "ok",
        "code": "GROUP_SEARCH_COMPLETE",
        "coverage": {
          "internal": {
            "source_id": "SOURCE-I",
            "receipt_ref": "HEAD-I",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "1",
            "validated_through_sequence": "1",
            "visible_through_sequence": "1"
          },
          "external": {
            "source_id": "SOURCE-E",
            "receipt_ref": "HEAD-E",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "1",
            "validated_through_sequence": "1",
            "visible_through_sequence": "1"
          }
        },
        "selected": {
          "internal": [
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "100",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "external": [
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "100",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "withdrawn": {
            "internal": [],
            "external": []
          },
          "out_of_window_counts": {
            "internal": "0",
            "external": "0"
          }
        },
        "components": [
          {
            "component_id": "POOL-01",
            "status": "unique",
            "code": "UNIQUE_GROUP",
            "comparisons": "1",
            "exhaustive": true,
            "candidate_count_lower_bound": "1",
            "witnesses": [
              {
                "internal_row_refs": [
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "external_row_refs": [
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "internal_sum_minor": "100",
                "external_sum_minor": "100",
                "fee_minor": "0",
                "booking_date_span_days": 0,
                "cardinality": "one-to-one"
              }
            ],
            "unused_internal_row_refs": [],
            "unused_external_row_refs": []
          }
        ],
        "proposals": [
          {
            "component_id": "POOL-01",
            "status": "review-proposal",
            "witness": {
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "internal_sum_minor": "100",
              "external_sum_minor": "100",
              "fee_minor": "0",
              "booking_date_span_days": 0,
              "cardinality": "one-to-one"
            }
          }
        ],
        "unassigned": []
      }
    },
    {
      "id": "one-cent-difference",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "100",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "99",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "1",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "1",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "ok",
        "code": "GROUP_SEARCH_COMPLETE",
        "coverage": {
          "internal": {
            "source_id": "SOURCE-I",
            "receipt_ref": "HEAD-I",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "1",
            "validated_through_sequence": "1",
            "visible_through_sequence": "1"
          },
          "external": {
            "source_id": "SOURCE-E",
            "receipt_ref": "HEAD-E",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "1",
            "validated_through_sequence": "1",
            "visible_through_sequence": "1"
          }
        },
        "selected": {
          "internal": [
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "100",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "external": [
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "99",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "withdrawn": {
            "internal": [],
            "external": []
          },
          "out_of_window_counts": {
            "internal": "0",
            "external": "0"
          }
        },
        "components": [
          {
            "component_id": "POOL-01",
            "status": "no-match",
            "code": "NO_GROUP_MATCH",
            "comparisons": "1",
            "exhaustive": true,
            "candidate_count_lower_bound": "0",
            "witnesses": [],
            "unused_internal_row_refs": [
              {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              }
            ],
            "unused_external_row_refs": [
              {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              }
            ]
          }
        ],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "duplicate-amount-ambiguity",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "100",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "100",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "100",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "1",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "ok",
        "code": "GROUP_SEARCH_COMPLETE",
        "coverage": {
          "internal": {
            "source_id": "SOURCE-I",
            "receipt_ref": "HEAD-I",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          },
          "external": {
            "source_id": "SOURCE-E",
            "receipt_ref": "HEAD-E",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "1",
            "validated_through_sequence": "1",
            "visible_through_sequence": "1"
          }
        },
        "selected": {
          "internal": [
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "100",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "100",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "external": [
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "100",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "withdrawn": {
            "internal": [],
            "external": []
          },
          "out_of_window_counts": {
            "internal": "0",
            "external": "0"
          }
        },
        "components": [
          {
            "component_id": "POOL-01",
            "status": "ambiguous",
            "code": "MULTIPLE_GROUPINGS",
            "comparisons": "2",
            "exhaustive": false,
            "candidate_count_lower_bound": "2",
            "witnesses": [
              {
                "internal_row_refs": [
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "external_row_refs": [
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "internal_sum_minor": "100",
                "external_sum_minor": "100",
                "fee_minor": "0",
                "booking_date_span_days": 0,
                "cardinality": "one-to-one"
              },
              {
                "internal_row_refs": [
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-01",
                    "revision": "1",
                    "sequence": "2",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "external_row_refs": [
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "internal_sum_minor": "100",
                "external_sum_minor": "100",
                "fee_minor": "0",
                "booking_date_span_days": 0,
                "cardinality": "one-to-one"
              }
            ],
            "unused_internal_row_refs": [],
            "unused_external_row_refs": []
          }
        ],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "two-distinct-groups",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "100",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "200",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "100",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "200",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "ok",
        "code": "GROUP_SEARCH_COMPLETE",
        "coverage": {
          "internal": {
            "source_id": "SOURCE-I",
            "receipt_ref": "HEAD-I",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          },
          "external": {
            "source_id": "SOURCE-E",
            "receipt_ref": "HEAD-E",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          }
        },
        "selected": {
          "internal": [
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "100",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "200",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "external": [
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "100",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "200",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "withdrawn": {
            "internal": [],
            "external": []
          },
          "out_of_window_counts": {
            "internal": "0",
            "external": "0"
          }
        },
        "components": [
          {
            "component_id": "POOL-01",
            "status": "ambiguous",
            "code": "MULTIPLE_GROUPINGS",
            "comparisons": "5",
            "exhaustive": false,
            "candidate_count_lower_bound": "2",
            "witnesses": [
              {
                "internal_row_refs": [
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "external_row_refs": [
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "internal_sum_minor": "100",
                "external_sum_minor": "100",
                "fee_minor": "0",
                "booking_date_span_days": 0,
                "cardinality": "one-to-one"
              },
              {
                "internal_row_refs": [
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-01",
                    "revision": "1",
                    "sequence": "2",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "external_row_refs": [
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-01",
                    "revision": "1",
                    "sequence": "2",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "internal_sum_minor": "200",
                "external_sum_minor": "200",
                "fee_minor": "0",
                "booking_date_span_days": 0,
                "cardinality": "one-to-one"
              }
            ],
            "unused_internal_row_refs": [],
            "unused_external_row_refs": []
          }
        ],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "same-fee-different-groups",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": {
                "fee_id": "FEE-01",
                "amount_minor": "10",
                "available_at": "2026-10-09T08:00:00.000Z",
                "receipt_ref": "FEE-DOCUMENT-01"
              }
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "100",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "200",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "90",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "190",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "ok",
        "code": "GROUP_SEARCH_COMPLETE",
        "coverage": {
          "internal": {
            "source_id": "SOURCE-I",
            "receipt_ref": "HEAD-I",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          },
          "external": {
            "source_id": "SOURCE-E",
            "receipt_ref": "HEAD-E",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          }
        },
        "selected": {
          "internal": [
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "100",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "200",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "external": [
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "90",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "190",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "withdrawn": {
            "internal": [],
            "external": []
          },
          "out_of_window_counts": {
            "internal": "0",
            "external": "0"
          }
        },
        "components": [
          {
            "component_id": "POOL-01",
            "status": "ambiguous",
            "code": "MULTIPLE_GROUPINGS",
            "comparisons": "5",
            "exhaustive": false,
            "candidate_count_lower_bound": "2",
            "witnesses": [
              {
                "internal_row_refs": [
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "external_row_refs": [
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "internal_sum_minor": "100",
                "external_sum_minor": "90",
                "fee_minor": "10",
                "booking_date_span_days": 0,
                "cardinality": "one-to-one"
              },
              {
                "internal_row_refs": [
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-01",
                    "revision": "1",
                    "sequence": "2",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "external_row_refs": [
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-01",
                    "revision": "1",
                    "sequence": "2",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "internal_sum_minor": "200",
                "external_sum_minor": "190",
                "fee_minor": "10",
                "booking_date_span_days": 0,
                "cardinality": "one-to-one"
              }
            ],
            "unused_internal_row_refs": [],
            "unused_external_row_refs": []
          }
        ],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "fee-larger-than-inflow",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": {
                "fee_id": "FEE-01",
                "amount_minor": "200",
                "available_at": "2026-10-09T08:00:00.000Z",
                "receipt_ref": "FEE-DOCUMENT-01"
              }
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "100",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "100",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "1",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "1",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "ok",
        "code": "GROUP_SEARCH_COMPLETE",
        "coverage": {
          "internal": {
            "source_id": "SOURCE-I",
            "receipt_ref": "HEAD-I",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "1",
            "validated_through_sequence": "1",
            "visible_through_sequence": "1"
          },
          "external": {
            "source_id": "SOURCE-E",
            "receipt_ref": "HEAD-E",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "1",
            "validated_through_sequence": "1",
            "visible_through_sequence": "1"
          }
        },
        "selected": {
          "internal": [
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "100",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "external": [
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "100",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "withdrawn": {
            "internal": [],
            "external": []
          },
          "out_of_window_counts": {
            "internal": "0",
            "external": "0"
          }
        },
        "components": [
          {
            "component_id": "POOL-01",
            "status": "no-match",
            "code": "NO_GROUP_MATCH",
            "comparisons": "1",
            "exhaustive": true,
            "candidate_count_lower_bound": "0",
            "witnesses": [],
            "unused_internal_row_refs": [
              {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              }
            ],
            "unused_external_row_refs": [
              {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              }
            ]
          }
        ],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "date-span-equality",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-02",
                  "value_date": "2026-10-02",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-02",
                  "value_date": "2026-10-02",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-03",
                  "value_date": "2026-10-03",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "ok",
        "code": "GROUP_SEARCH_COMPLETE",
        "coverage": {
          "internal": {
            "source_id": "SOURCE-I",
            "receipt_ref": "HEAD-I",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          },
          "external": {
            "source_id": "SOURCE-E",
            "receipt_ref": "HEAD-E",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          }
        },
        "selected": {
          "internal": [
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "120",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-02",
                "value_date": "2026-10-02",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "180",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "external": [
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-02",
                "value_date": "2026-10-02",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "140",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-03",
                "value_date": "2026-10-03",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "160",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "withdrawn": {
            "internal": [],
            "external": []
          },
          "out_of_window_counts": {
            "internal": "0",
            "external": "0"
          }
        },
        "components": [
          {
            "component_id": "POOL-01",
            "status": "unique",
            "code": "UNIQUE_GROUP",
            "comparisons": "9",
            "exhaustive": true,
            "candidate_count_lower_bound": "1",
            "witnesses": [
              {
                "internal_row_refs": [
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  },
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-01",
                    "revision": "1",
                    "sequence": "2",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "external_row_refs": [
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  },
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-01",
                    "revision": "1",
                    "sequence": "2",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "internal_sum_minor": "300",
                "external_sum_minor": "300",
                "fee_minor": "0",
                "booking_date_span_days": 2,
                "cardinality": "many-to-many"
              }
            ],
            "unused_internal_row_refs": [],
            "unused_external_row_refs": []
          }
        ],
        "proposals": [
          {
            "component_id": "POOL-01",
            "status": "review-proposal",
            "witness": {
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "internal_sum_minor": "300",
              "external_sum_minor": "300",
              "fee_minor": "0",
              "booking_date_span_days": 2,
              "cardinality": "many-to-many"
            }
          }
        ],
        "unassigned": []
      }
    },
    {
      "id": "date-span-outside",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-02",
                  "value_date": "2026-10-02",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-02",
                  "value_date": "2026-10-02",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-04",
                  "value_date": "2026-10-04",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "ok",
        "code": "GROUP_SEARCH_COMPLETE",
        "coverage": {
          "internal": {
            "source_id": "SOURCE-I",
            "receipt_ref": "HEAD-I",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          },
          "external": {
            "source_id": "SOURCE-E",
            "receipt_ref": "HEAD-E",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          }
        },
        "selected": {
          "internal": [
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "120",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-02",
                "value_date": "2026-10-02",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "180",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "external": [
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-02",
                "value_date": "2026-10-02",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "140",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-04",
                "value_date": "2026-10-04",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "160",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "withdrawn": {
            "internal": [],
            "external": []
          },
          "out_of_window_counts": {
            "internal": "0",
            "external": "0"
          }
        },
        "components": [
          {
            "component_id": "POOL-01",
            "status": "no-match",
            "code": "NO_GROUP_MATCH",
            "comparisons": "9",
            "exhaustive": true,
            "candidate_count_lower_bound": "0",
            "witnesses": [],
            "unused_internal_row_refs": [
              {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              {
                "source_id": "SOURCE-I",
                "row_id": "I-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              }
            ],
            "unused_external_row_refs": [
              {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              {
                "source_id": "SOURCE-E",
                "row_id": "E-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              }
            ]
          }
        ],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "zero-day-span",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "0",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "ok",
        "code": "GROUP_SEARCH_COMPLETE",
        "coverage": {
          "internal": {
            "source_id": "SOURCE-I",
            "receipt_ref": "HEAD-I",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          },
          "external": {
            "source_id": "SOURCE-E",
            "receipt_ref": "HEAD-E",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          }
        },
        "selected": {
          "internal": [
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "120",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "180",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "external": [
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "140",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "160",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "withdrawn": {
            "internal": [],
            "external": []
          },
          "out_of_window_counts": {
            "internal": "0",
            "external": "0"
          }
        },
        "components": [
          {
            "component_id": "POOL-01",
            "status": "unique",
            "code": "UNIQUE_GROUP",
            "comparisons": "9",
            "exhaustive": true,
            "candidate_count_lower_bound": "1",
            "witnesses": [
              {
                "internal_row_refs": [
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  },
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-01",
                    "revision": "1",
                    "sequence": "2",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "external_row_refs": [
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  },
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-01",
                    "revision": "1",
                    "sequence": "2",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "internal_sum_minor": "300",
                "external_sum_minor": "300",
                "fee_minor": "0",
                "booking_date_span_days": 0,
                "cardinality": "many-to-many"
              }
            ],
            "unused_internal_row_refs": [],
            "unused_external_row_refs": []
          }
        ],
        "proposals": [
          {
            "component_id": "POOL-01",
            "status": "review-proposal",
            "witness": {
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "internal_sum_minor": "300",
              "external_sum_minor": "300",
              "fee_minor": "0",
              "booking_date_span_days": 0,
              "cardinality": "many-to-many"
            }
          }
        ],
        "unassigned": []
      }
    },
    {
      "id": "zero-day-shift",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "0",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-02",
                  "value_date": "2026-10-02",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-02",
                  "value_date": "2026-10-02",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "ok",
        "code": "GROUP_SEARCH_COMPLETE",
        "coverage": {
          "internal": {
            "source_id": "SOURCE-I",
            "receipt_ref": "HEAD-I",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          },
          "external": {
            "source_id": "SOURCE-E",
            "receipt_ref": "HEAD-E",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          }
        },
        "selected": {
          "internal": [
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "120",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "180",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "external": [
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-02",
                "value_date": "2026-10-02",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "140",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-02",
                "value_date": "2026-10-02",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "160",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "withdrawn": {
            "internal": [],
            "external": []
          },
          "out_of_window_counts": {
            "internal": "0",
            "external": "0"
          }
        },
        "components": [
          {
            "component_id": "POOL-01",
            "status": "no-match",
            "code": "NO_GROUP_MATCH",
            "comparisons": "9",
            "exhaustive": true,
            "candidate_count_lower_bound": "0",
            "witnesses": [],
            "unused_internal_row_refs": [
              {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              {
                "source_id": "SOURCE-I",
                "row_id": "I-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              }
            ],
            "unused_external_row_refs": [
              {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              {
                "source_id": "SOURCE-E",
                "row_id": "E-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              }
            ]
          }
        ],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "budget-exact-completion",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "3"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "100",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "200",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "300",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "1",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "ok",
        "code": "GROUP_SEARCH_COMPLETE",
        "coverage": {
          "internal": {
            "source_id": "SOURCE-I",
            "receipt_ref": "HEAD-I",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          },
          "external": {
            "source_id": "SOURCE-E",
            "receipt_ref": "HEAD-E",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "1",
            "validated_through_sequence": "1",
            "visible_through_sequence": "1"
          }
        },
        "selected": {
          "internal": [
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "100",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "200",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "external": [
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "300",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "withdrawn": {
            "internal": [],
            "external": []
          },
          "out_of_window_counts": {
            "internal": "0",
            "external": "0"
          }
        },
        "components": [
          {
            "component_id": "POOL-01",
            "status": "unique",
            "code": "UNIQUE_GROUP",
            "comparisons": "3",
            "exhaustive": true,
            "candidate_count_lower_bound": "1",
            "witnesses": [
              {
                "internal_row_refs": [
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  },
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-01",
                    "revision": "1",
                    "sequence": "2",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "external_row_refs": [
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "internal_sum_minor": "300",
                "external_sum_minor": "300",
                "fee_minor": "0",
                "booking_date_span_days": 0,
                "cardinality": "many-to-one"
              }
            ],
            "unused_internal_row_refs": [],
            "unused_external_row_refs": []
          }
        ],
        "proposals": [
          {
            "component_id": "POOL-01",
            "status": "review-proposal",
            "witness": {
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "internal_sum_minor": "300",
              "external_sum_minor": "300",
              "fee_minor": "0",
              "booking_date_span_days": 0,
              "cardinality": "many-to-one"
            }
          }
        ],
        "unassigned": []
      }
    },
    {
      "id": "budget-before-answer",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "2"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "100",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "200",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "300",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "1",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "indeterminate",
        "code": "GROUP_SEARCH_INDETERMINATE",
        "coverage": {
          "internal": {
            "source_id": "SOURCE-I",
            "receipt_ref": "HEAD-I",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          },
          "external": {
            "source_id": "SOURCE-E",
            "receipt_ref": "HEAD-E",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "1",
            "validated_through_sequence": "1",
            "visible_through_sequence": "1"
          }
        },
        "selected": {
          "internal": [
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "100",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "200",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "external": [
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "300",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "withdrawn": {
            "internal": [],
            "external": []
          },
          "out_of_window_counts": {
            "internal": "0",
            "external": "0"
          }
        },
        "components": [
          {
            "component_id": "POOL-01",
            "status": "indeterminate",
            "code": "SEARCH_LIMIT",
            "comparisons": "2",
            "exhaustive": false,
            "candidate_count_lower_bound": "0",
            "witnesses": [],
            "unused_internal_row_refs": [],
            "unused_external_row_refs": []
          }
        ],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "budget-after-first-hit",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "1"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "100",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "200",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "100",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "350",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "indeterminate",
        "code": "GROUP_SEARCH_INDETERMINATE",
        "coverage": {
          "internal": {
            "source_id": "SOURCE-I",
            "receipt_ref": "HEAD-I",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          },
          "external": {
            "source_id": "SOURCE-E",
            "receipt_ref": "HEAD-E",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          }
        },
        "selected": {
          "internal": [
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "100",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "200",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "external": [
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "100",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "350",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "withdrawn": {
            "internal": [],
            "external": []
          },
          "out_of_window_counts": {
            "internal": "0",
            "external": "0"
          }
        },
        "components": [
          {
            "component_id": "POOL-01",
            "status": "indeterminate",
            "code": "SEARCH_LIMIT",
            "comparisons": "1",
            "exhaustive": false,
            "candidate_count_lower_bound": "1",
            "witnesses": [
              {
                "internal_row_refs": [
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "external_row_refs": [
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "internal_sum_minor": "100",
                "external_sum_minor": "100",
                "fee_minor": "0",
                "booking_date_span_days": 0,
                "cardinality": "one-to-one"
              }
            ],
            "unused_internal_row_refs": [],
            "unused_external_row_refs": []
          }
        ],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "ambiguity-proved-at-budget",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "2"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "100",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "100",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "100",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "1",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "ok",
        "code": "GROUP_SEARCH_COMPLETE",
        "coverage": {
          "internal": {
            "source_id": "SOURCE-I",
            "receipt_ref": "HEAD-I",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          },
          "external": {
            "source_id": "SOURCE-E",
            "receipt_ref": "HEAD-E",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "1",
            "validated_through_sequence": "1",
            "visible_through_sequence": "1"
          }
        },
        "selected": {
          "internal": [
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "100",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "100",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "external": [
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "100",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "withdrawn": {
            "internal": [],
            "external": []
          },
          "out_of_window_counts": {
            "internal": "0",
            "external": "0"
          }
        },
        "components": [
          {
            "component_id": "POOL-01",
            "status": "ambiguous",
            "code": "MULTIPLE_GROUPINGS",
            "comparisons": "2",
            "exhaustive": false,
            "candidate_count_lower_bound": "2",
            "witnesses": [
              {
                "internal_row_refs": [
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "external_row_refs": [
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "internal_sum_minor": "100",
                "external_sum_minor": "100",
                "fee_minor": "0",
                "booking_date_span_days": 0,
                "cardinality": "one-to-one"
              },
              {
                "internal_row_refs": [
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-01",
                    "revision": "1",
                    "sequence": "2",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "external_row_refs": [
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "internal_sum_minor": "100",
                "external_sum_minor": "100",
                "fee_minor": "0",
                "booking_date_span_days": 0,
                "cardinality": "one-to-one"
              }
            ],
            "unused_internal_row_refs": [],
            "unused_external_row_refs": []
          }
        ],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "limit-before-second-witness",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "1"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "100",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "100",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "100",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "1",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "indeterminate",
        "code": "GROUP_SEARCH_INDETERMINATE",
        "coverage": {
          "internal": {
            "source_id": "SOURCE-I",
            "receipt_ref": "HEAD-I",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          },
          "external": {
            "source_id": "SOURCE-E",
            "receipt_ref": "HEAD-E",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "1",
            "validated_through_sequence": "1",
            "visible_through_sequence": "1"
          }
        },
        "selected": {
          "internal": [
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "100",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "100",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "external": [
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "100",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "withdrawn": {
            "internal": [],
            "external": []
          },
          "out_of_window_counts": {
            "internal": "0",
            "external": "0"
          }
        },
        "components": [
          {
            "component_id": "POOL-01",
            "status": "indeterminate",
            "code": "SEARCH_LIMIT",
            "comparisons": "1",
            "exhaustive": false,
            "candidate_count_lower_bound": "1",
            "witnesses": [
              {
                "internal_row_refs": [
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "external_row_refs": [
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "internal_sum_minor": "100",
                "external_sum_minor": "100",
                "fee_minor": "0",
                "booking_date_span_days": 0,
                "cardinality": "one-to-one"
              }
            ],
            "unused_internal_row_refs": [],
            "unused_external_row_refs": []
          }
        ],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "unique-with-unused",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-02",
                  "revision": "1",
                  "sequence": "3",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "3",
                "row_id": "I-02",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "999",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "3",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "ok",
        "code": "GROUP_SEARCH_COMPLETE",
        "coverage": {
          "internal": {
            "source_id": "SOURCE-I",
            "receipt_ref": "HEAD-I",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "3",
            "validated_through_sequence": "3",
            "visible_through_sequence": "3"
          },
          "external": {
            "source_id": "SOURCE-E",
            "receipt_ref": "HEAD-E",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          }
        },
        "selected": {
          "internal": [
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "120",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "180",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-02",
                "revision": "1",
                "sequence": "3",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "999",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "external": [
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "140",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "160",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "withdrawn": {
            "internal": [],
            "external": []
          },
          "out_of_window_counts": {
            "internal": "0",
            "external": "0"
          }
        },
        "components": [
          {
            "component_id": "POOL-01",
            "status": "unique",
            "code": "UNIQUE_GROUP",
            "comparisons": "21",
            "exhaustive": true,
            "candidate_count_lower_bound": "1",
            "witnesses": [
              {
                "internal_row_refs": [
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  },
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-01",
                    "revision": "1",
                    "sequence": "2",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "external_row_refs": [
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  },
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-01",
                    "revision": "1",
                    "sequence": "2",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "internal_sum_minor": "300",
                "external_sum_minor": "300",
                "fee_minor": "0",
                "booking_date_span_days": 0,
                "cardinality": "many-to-many"
              }
            ],
            "unused_internal_row_refs": [
              {
                "source_id": "SOURCE-I",
                "row_id": "I-02",
                "revision": "1",
                "sequence": "3",
                "source_version_ref": "VERSION-01"
              }
            ],
            "unused_external_row_refs": []
          }
        ],
        "proposals": [
          {
            "component_id": "POOL-01",
            "status": "review-proposal",
            "witness": {
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "internal_sum_minor": "300",
              "external_sum_minor": "300",
              "fee_minor": "0",
              "booking_date_span_days": 0,
              "cardinality": "many-to-many"
            }
          }
        ],
        "unassigned": []
      }
    },
    {
      "id": "unique-3x2",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-02",
                  "revision": "1",
                  "sequence": "3",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "110",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "230",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "3",
                "row_id": "I-02",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "370",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "300",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "410",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "3",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "ok",
        "code": "GROUP_SEARCH_COMPLETE",
        "coverage": {
          "internal": {
            "source_id": "SOURCE-I",
            "receipt_ref": "HEAD-I",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "3",
            "validated_through_sequence": "3",
            "visible_through_sequence": "3"
          },
          "external": {
            "source_id": "SOURCE-E",
            "receipt_ref": "HEAD-E",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          }
        },
        "selected": {
          "internal": [
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "110",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "230",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-02",
                "revision": "1",
                "sequence": "3",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "370",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "external": [
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "300",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "410",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "withdrawn": {
            "internal": [],
            "external": []
          },
          "out_of_window_counts": {
            "internal": "0",
            "external": "0"
          }
        },
        "components": [
          {
            "component_id": "POOL-01",
            "status": "unique",
            "code": "UNIQUE_GROUP",
            "comparisons": "21",
            "exhaustive": true,
            "candidate_count_lower_bound": "1",
            "witnesses": [
              {
                "internal_row_refs": [
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  },
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-01",
                    "revision": "1",
                    "sequence": "2",
                    "source_version_ref": "VERSION-01"
                  },
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-02",
                    "revision": "1",
                    "sequence": "3",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "external_row_refs": [
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  },
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-01",
                    "revision": "1",
                    "sequence": "2",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "internal_sum_minor": "710",
                "external_sum_minor": "710",
                "fee_minor": "0",
                "booking_date_span_days": 0,
                "cardinality": "many-to-many"
              }
            ],
            "unused_internal_row_refs": [],
            "unused_external_row_refs": []
          }
        ],
        "proposals": [
          {
            "component_id": "POOL-01",
            "status": "review-proposal",
            "witness": {
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-02",
                  "revision": "1",
                  "sequence": "3",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "internal_sum_minor": "710",
              "external_sum_minor": "710",
              "fee_minor": "0",
              "booking_date_span_days": 0,
              "cardinality": "many-to-many"
            }
          }
        ],
        "unassigned": []
      }
    },
    {
      "id": "large-exact-2x2",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "999999999999999999999999999899",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "999999999999999999999999999799",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "999999999999999999999999999859",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "999999999999999999999999999839",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "ok",
        "code": "GROUP_SEARCH_COMPLETE",
        "coverage": {
          "internal": {
            "source_id": "SOURCE-I",
            "receipt_ref": "HEAD-I",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          },
          "external": {
            "source_id": "SOURCE-E",
            "receipt_ref": "HEAD-E",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          }
        },
        "selected": {
          "internal": [
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "999999999999999999999999999899",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "999999999999999999999999999799",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "external": [
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "999999999999999999999999999859",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "999999999999999999999999999839",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "withdrawn": {
            "internal": [],
            "external": []
          },
          "out_of_window_counts": {
            "internal": "0",
            "external": "0"
          }
        },
        "components": [
          {
            "component_id": "POOL-01",
            "status": "unique",
            "code": "UNIQUE_GROUP",
            "comparisons": "9",
            "exhaustive": true,
            "candidate_count_lower_bound": "1",
            "witnesses": [
              {
                "internal_row_refs": [
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  },
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-01",
                    "revision": "1",
                    "sequence": "2",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "external_row_refs": [
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  },
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-01",
                    "revision": "1",
                    "sequence": "2",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "internal_sum_minor": "1999999999999999999999999999698",
                "external_sum_minor": "1999999999999999999999999999698",
                "fee_minor": "0",
                "booking_date_span_days": 0,
                "cardinality": "many-to-many"
              }
            ],
            "unused_internal_row_refs": [],
            "unused_external_row_refs": []
          }
        ],
        "proposals": [
          {
            "component_id": "POOL-01",
            "status": "review-proposal",
            "witness": {
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "internal_sum_minor": "1999999999999999999999999999698",
              "external_sum_minor": "1999999999999999999999999999698",
              "fee_minor": "0",
              "booking_date_span_days": 0,
              "cardinality": "many-to-many"
            }
          }
        ],
        "unassigned": []
      }
    },
    {
      "id": "nine-row-resource",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-02",
                  "revision": "1",
                  "sequence": "3",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-03",
                  "revision": "1",
                  "sequence": "4",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-04",
                  "revision": "1",
                  "sequence": "5",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-05",
                  "revision": "1",
                  "sequence": "6",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-06",
                  "revision": "1",
                  "sequence": "7",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-07",
                  "revision": "1",
                  "sequence": "8",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-08",
                  "revision": "1",
                  "sequence": "9",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "10",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "20",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "3",
                "row_id": "I-02",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "30",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "4",
                "row_id": "I-03",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "40",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "5",
                "row_id": "I-04",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "50",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "6",
                "row_id": "I-05",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "60",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "7",
                "row_id": "I-06",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "70",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "8",
                "row_id": "I-07",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "80",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "9",
                "row_id": "I-08",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "90",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "999",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "9",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "1",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "indeterminate",
        "code": "GROUP_SEARCH_INDETERMINATE",
        "coverage": {
          "internal": {
            "source_id": "SOURCE-I",
            "receipt_ref": "HEAD-I",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "9",
            "validated_through_sequence": "9",
            "visible_through_sequence": "9"
          },
          "external": {
            "source_id": "SOURCE-E",
            "receipt_ref": "HEAD-E",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "1",
            "validated_through_sequence": "1",
            "visible_through_sequence": "1"
          }
        },
        "selected": {
          "internal": [
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "10",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "20",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-02",
                "revision": "1",
                "sequence": "3",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "30",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-03",
                "revision": "1",
                "sequence": "4",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "40",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-04",
                "revision": "1",
                "sequence": "5",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "50",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-05",
                "revision": "1",
                "sequence": "6",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "60",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-06",
                "revision": "1",
                "sequence": "7",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "70",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-07",
                "revision": "1",
                "sequence": "8",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "80",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-08",
                "revision": "1",
                "sequence": "9",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "90",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "external": [
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "999",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "withdrawn": {
            "internal": [],
            "external": []
          },
          "out_of_window_counts": {
            "internal": "0",
            "external": "0"
          }
        },
        "components": [
          {
            "component_id": "POOL-01",
            "status": "indeterminate",
            "code": "COMPONENT_LIMIT",
            "comparisons": "0",
            "exhaustive": false,
            "candidate_count_lower_bound": "0",
            "witnesses": [],
            "unused_internal_row_refs": [],
            "unused_external_row_refs": []
          }
        ],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "euro-same-units",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "EUR",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "EUR",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "EUR",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "EUR",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "EUR",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "ok",
        "code": "GROUP_SEARCH_COMPLETE",
        "coverage": {
          "internal": {
            "source_id": "SOURCE-I",
            "receipt_ref": "HEAD-I",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          },
          "external": {
            "source_id": "SOURCE-E",
            "receipt_ref": "HEAD-E",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          }
        },
        "selected": {
          "internal": [
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "EUR",
                "direction": "inflow",
                "amount_minor": "120",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "EUR",
                "direction": "inflow",
                "amount_minor": "180",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "external": [
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "EUR",
                "direction": "inflow",
                "amount_minor": "140",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "EUR",
                "direction": "inflow",
                "amount_minor": "160",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "withdrawn": {
            "internal": [],
            "external": []
          },
          "out_of_window_counts": {
            "internal": "0",
            "external": "0"
          }
        },
        "components": [
          {
            "component_id": "POOL-01",
            "status": "unique",
            "code": "UNIQUE_GROUP",
            "comparisons": "9",
            "exhaustive": true,
            "candidate_count_lower_bound": "1",
            "witnesses": [
              {
                "internal_row_refs": [
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  },
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-01",
                    "revision": "1",
                    "sequence": "2",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "external_row_refs": [
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  },
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-01",
                    "revision": "1",
                    "sequence": "2",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "internal_sum_minor": "300",
                "external_sum_minor": "300",
                "fee_minor": "0",
                "booking_date_span_days": 0,
                "cardinality": "many-to-many"
              }
            ],
            "unused_internal_row_refs": [],
            "unused_external_row_refs": []
          }
        ],
        "proposals": [
          {
            "component_id": "POOL-01",
            "status": "review-proposal",
            "witness": {
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "internal_sum_minor": "300",
              "external_sum_minor": "300",
              "fee_minor": "0",
              "booking_date_span_days": 0,
              "cardinality": "many-to-many"
            }
          }
        ],
        "unassigned": []
      }
    },
    {
      "id": "financial-reversal-movements",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "outflow",
              "is_reversal": true,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "outflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": true
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "outflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": true
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "outflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": true
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "outflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": true
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "ok",
        "code": "GROUP_SEARCH_COMPLETE",
        "coverage": {
          "internal": {
            "source_id": "SOURCE-I",
            "receipt_ref": "HEAD-I",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          },
          "external": {
            "source_id": "SOURCE-E",
            "receipt_ref": "HEAD-E",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          }
        },
        "selected": {
          "internal": [
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "outflow",
                "amount_minor": "120",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": true
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "outflow",
                "amount_minor": "180",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": true
              }
            }
          ],
          "external": [
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "outflow",
                "amount_minor": "140",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": true
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "outflow",
                "amount_minor": "160",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": true
              }
            }
          ],
          "withdrawn": {
            "internal": [],
            "external": []
          },
          "out_of_window_counts": {
            "internal": "0",
            "external": "0"
          }
        },
        "components": [
          {
            "component_id": "POOL-01",
            "status": "unique",
            "code": "UNIQUE_GROUP",
            "comparisons": "9",
            "exhaustive": true,
            "candidate_count_lower_bound": "1",
            "witnesses": [
              {
                "internal_row_refs": [
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  },
                  {
                    "source_id": "SOURCE-I",
                    "row_id": "I-01",
                    "revision": "1",
                    "sequence": "2",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "external_row_refs": [
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-00",
                    "revision": "1",
                    "sequence": "1",
                    "source_version_ref": "VERSION-01"
                  },
                  {
                    "source_id": "SOURCE-E",
                    "row_id": "E-01",
                    "revision": "1",
                    "sequence": "2",
                    "source_version_ref": "VERSION-01"
                  }
                ],
                "internal_sum_minor": "300",
                "external_sum_minor": "300",
                "fee_minor": "0",
                "booking_date_span_days": 0,
                "cardinality": "many-to-many"
              }
            ],
            "unused_internal_row_refs": [],
            "unused_external_row_refs": []
          }
        ],
        "proposals": [
          {
            "component_id": "POOL-01",
            "status": "review-proposal",
            "witness": {
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "internal_sum_minor": "300",
              "external_sum_minor": "300",
              "fee_minor": "0",
              "booking_date_span_days": 0,
              "cardinality": "many-to-many"
            }
          }
        ],
        "unassigned": []
      }
    },
    {
      "id": "extra-query",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ],
          "extra": true
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "INVALID_SCHEMA",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "missing-query",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "INVALID_SCHEMA",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "bad-algorithm",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "greedy",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "UNSUPPORTED_ALGORITHM",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "bad-window-2",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": 2,
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "INVALID_POLICY",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "bad-window-True",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": true,
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "INVALID_POLICY",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "bad-window-02",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "02",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "INVALID_POLICY",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "bad-window-8",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "8",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "INVALID_POLICY",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "bad-window--1",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "-1",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "INVALID_POLICY",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "bad-window-None",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": null,
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "INVALID_POLICY",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "bad-budget-0",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": 0
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "INVALID_AMOUNT",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "bad-budget-True",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": true
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "INVALID_AMOUNT",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "bad-budget-0",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "0"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "INVALID_AMOUNT",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "bad-budget-01",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "01"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "INVALID_AMOUNT",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "bad-budget-1.5",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "1.5"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "INVALID_AMOUNT",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "bad-budget-1000000000000000000000000000000",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "1000000000000000000000000000000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "INVALID_AMOUNT",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "oversized-budget",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100001"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "INVALID_POLICY",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "extra-policy",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000",
            "extra": "ignored"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "INVALID_SCHEMA",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "components-object",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": {}
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "INVALID_COMPONENTS",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "extra-component",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null,
              "extra": true
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "INVALID_SCHEMA",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "bad-component-id",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "unsafe space",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "INVALID_IDENTIFIER",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "duplicate-component-id",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            },
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "DUPLICATE_COMPONENT",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "cross-pool-row-reuse",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            },
            {
              "component_id": "POOL-02",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "ROW_REUSED_ACROSS_COMPONENTS",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "duplicate-pool-row",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "DUPLICATE_COMPONENT_ROW",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "empty-pool-side",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "INVALID_COMPONENTS",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "wrong-currency",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "EUR",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "COMPONENT_SCOPE_MISMATCH",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "unsupported-currency",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "JPY",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "UNSUPPORTED_CURRENCY",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "wrong-direction",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "outflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "COMPONENT_SCOPE_MISMATCH",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "bad-direction",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "credit",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "INVALID_DIRECTION",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "wrong-reversal-kind",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": true,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "COMPONENT_SCOPE_MISMATCH",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "bad-reversal-kind",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": 1,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "INVALID_REVERSAL_FLAG",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "extra-rowref",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01",
                  "extra": "ignored"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "INVALID_SCHEMA",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "bad-rowref-revision",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "01",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "INVALID_AMOUNT",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "zero-fee",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": {
                "fee_id": "FEE-01",
                "amount_minor": "0",
                "available_at": "2026-10-09T08:00:00.000Z",
                "receipt_ref": "RECEIPT-01"
              }
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "INVALID_AMOUNT",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "future-fee",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": {
                "fee_id": "FEE-01",
                "amount_minor": "10",
                "available_at": "2026-10-09T12:00:00.001Z",
                "receipt_ref": "RECEIPT-01"
              }
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "FUTURE_FEE",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "bad-fee-clock",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": {
                "fee_id": "FEE-01",
                "amount_minor": "10",
                "available_at": "2026-02-30T12:00:00.000Z",
                "receipt_ref": "RECEIPT-01"
              }
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "INVALID_TIMESTAMP",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "bad-fee-id",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": {
                "fee_id": "bad id",
                "amount_minor": "10",
                "available_at": "2026-10-09T08:00:00.000Z",
                "receipt_ref": "RECEIPT-01"
              }
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "INVALID_IDENTIFIER",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "extra-fee",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": {
                "fee_id": "FEE-01",
                "amount_minor": "10",
                "available_at": "2026-10-09T08:00:00.000Z",
                "receipt_ref": "RECEIPT-01",
                "unknown": true
              }
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "rejected",
        "code": "INVALID_SCHEMA",
        "coverage": null,
        "selected": null,
        "components": [],
        "proposals": [],
        "unassigned": []
      }
    },
    {
      "id": "no-offered-pools",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": []
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "ok",
        "code": "GROUP_SEARCH_COMPLETE",
        "coverage": {
          "internal": {
            "source_id": "SOURCE-I",
            "receipt_ref": "HEAD-I",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          },
          "external": {
            "source_id": "SOURCE-E",
            "receipt_ref": "HEAD-E",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          }
        },
        "selected": {
          "internal": [
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "120",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "180",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "external": [
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "140",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "160",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "withdrawn": {
            "internal": [],
            "external": []
          },
          "out_of_window_counts": {
            "internal": "0",
            "external": "0"
          }
        },
        "components": [],
        "proposals": [],
        "unassigned": [
          {
            "side": "internal",
            "row_ref": {
              "source_id": "SOURCE-I",
              "row_id": "I-00",
              "revision": "1",
              "sequence": "1",
              "source_version_ref": "VERSION-01"
            },
            "reason": "OUTSIDE_CANDIDATE_POOLS"
          },
          {
            "side": "internal",
            "row_ref": {
              "source_id": "SOURCE-I",
              "row_id": "I-01",
              "revision": "1",
              "sequence": "2",
              "source_version_ref": "VERSION-01"
            },
            "reason": "OUTSIDE_CANDIDATE_POOLS"
          },
          {
            "side": "external",
            "row_ref": {
              "source_id": "SOURCE-E",
              "row_id": "E-00",
              "revision": "1",
              "sequence": "1",
              "source_version_ref": "VERSION-01"
            },
            "reason": "OUTSIDE_CANDIDATE_POOLS"
          },
          {
            "side": "external",
            "row_ref": {
              "source_id": "SOURCE-E",
              "row_id": "E-01",
              "revision": "1",
              "sequence": "2",
              "source_version_ref": "VERSION-01"
            },
            "reason": "OUTSIDE_CANDIDATE_POOLS"
          }
        ]
      }
    },
    {
      "id": "unavailable-evidence-revision",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "2",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "indeterminate",
        "code": "GROUP_SEARCH_INDETERMINATE",
        "coverage": {
          "internal": {
            "source_id": "SOURCE-I",
            "receipt_ref": "HEAD-I",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          },
          "external": {
            "source_id": "SOURCE-E",
            "receipt_ref": "HEAD-E",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          }
        },
        "selected": {
          "internal": [
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "120",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "180",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "external": [
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "140",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "160",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "withdrawn": {
            "internal": [],
            "external": []
          },
          "out_of_window_counts": {
            "internal": "0",
            "external": "0"
          }
        },
        "components": [
          {
            "component_id": "POOL-01",
            "status": "indeterminate",
            "code": "COMPONENT_EVIDENCE_UNAVAILABLE",
            "comparisons": "0",
            "exhaustive": false,
            "candidate_count_lower_bound": "0",
            "witnesses": [],
            "unused_internal_row_refs": [],
            "unused_external_row_refs": []
          }
        ],
        "proposals": [],
        "unassigned": [
          {
            "side": "internal",
            "row_ref": {
              "source_id": "SOURCE-I",
              "row_id": "I-00",
              "revision": "1",
              "sequence": "1",
              "source_version_ref": "VERSION-01"
            },
            "reason": "OUTSIDE_CANDIDATE_POOLS"
          }
        ]
      }
    },
    {
      "id": "unavailable-evidence-row_id",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "UNKNOWN",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "indeterminate",
        "code": "GROUP_SEARCH_INDETERMINATE",
        "coverage": {
          "internal": {
            "source_id": "SOURCE-I",
            "receipt_ref": "HEAD-I",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          },
          "external": {
            "source_id": "SOURCE-E",
            "receipt_ref": "HEAD-E",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          }
        },
        "selected": {
          "internal": [
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "120",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "180",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "external": [
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "140",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "160",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "withdrawn": {
            "internal": [],
            "external": []
          },
          "out_of_window_counts": {
            "internal": "0",
            "external": "0"
          }
        },
        "components": [
          {
            "component_id": "POOL-01",
            "status": "indeterminate",
            "code": "COMPONENT_EVIDENCE_UNAVAILABLE",
            "comparisons": "0",
            "exhaustive": false,
            "candidate_count_lower_bound": "0",
            "witnesses": [],
            "unused_internal_row_refs": [],
            "unused_external_row_refs": []
          }
        ],
        "proposals": [],
        "unassigned": [
          {
            "side": "internal",
            "row_ref": {
              "source_id": "SOURCE-I",
              "row_id": "I-00",
              "revision": "1",
              "sequence": "1",
              "source_version_ref": "VERSION-01"
            },
            "reason": "OUTSIDE_CANDIDATE_POOLS"
          }
        ]
      }
    },
    {
      "id": "unavailable-evidence-source_version_ref",
      "input": {
        "query": {
          "schema_version": "d30-many-reconciliation-v1",
          "ledger_id": "CB-GENERAL",
          "entity_id": "CB-A",
          "reconciliation_account_id": "CEDAR-SETTLEMENT",
          "period_start": "2026-10-01",
          "period_end": "2026-10-08",
          "knowledge_cutoff": "2026-10-09T12:00:00.000Z",
          "reference_policy": "BYTE_EXACT_ASCII_V1",
          "policy": {
            "algorithm": "bounded-subset-pool-v1",
            "max_day_span": "2",
            "comparison_budget": "100000"
          },
          "components": [
            {
              "component_id": "POOL-01",
              "currency": "USD",
              "direction": "inflow",
              "is_reversal": false,
              "internal_row_refs": [
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "LATER-VERSION"
                },
                {
                  "source_id": "SOURCE-I",
                  "row_id": "I-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "external_row_refs": [
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-00",
                  "revision": "1",
                  "sequence": "1",
                  "source_version_ref": "VERSION-01"
                },
                {
                  "source_id": "SOURCE-E",
                  "row_id": "E-01",
                  "revision": "1",
                  "sequence": "2",
                  "source_version_ref": "VERSION-01"
                }
              ],
              "fee": null
            }
          ]
        },
        "internal_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-I",
            "source_id": "SOURCE-I",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "I-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "120",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "I-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "180",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "external_groups": [
          {
            "schema_version": "d30-reconciliation-group-v1",
            "group_id": "GROUP-E",
            "source_id": "SOURCE-E",
            "available_at": "2026-10-09T08:00:00.000Z",
            "events": [
              {
                "sequence": "1",
                "row_id": "E-00",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "140",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              },
              {
                "sequence": "2",
                "row_id": "E-01",
                "revision": "1",
                "source_version_ref": "VERSION-01",
                "supersedes_revision": null,
                "action": "upsert",
                "movement": {
                  "booking_status": "booked",
                  "booking_date": "2026-10-01",
                  "value_date": "2026-10-01",
                  "currency": "USD",
                  "direction": "inflow",
                  "amount_minor": "160",
                  "reference": null,
                  "description": "Synthetic settlement item",
                  "is_reversal": false
                }
              }
            ]
          }
        ],
        "context": {
          "internal_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-I",
            "side": "internal",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-I"
          },
          "external_head": {
            "schema_version": "d30-reconciliation-head-v1",
            "source_id": "SOURCE-E",
            "side": "external",
            "ledger_id": "CB-GENERAL",
            "entity_id": "CB-A",
            "reconciliation_account_id": "CEDAR-SETTLEMENT",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "head_sequence": "2",
            "receipt_ref": "HEAD-E"
          }
        }
      },
      "expected": {
        "status": "indeterminate",
        "code": "GROUP_SEARCH_INDETERMINATE",
        "coverage": {
          "internal": {
            "source_id": "SOURCE-I",
            "receipt_ref": "HEAD-I",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          },
          "external": {
            "source_id": "SOURCE-E",
            "receipt_ref": "HEAD-E",
            "observed_at": "2026-10-10T00:00:00.000Z",
            "coverage_start": "2026-10-01",
            "coverage_end": "2026-10-08",
            "head_sequence": "2",
            "validated_through_sequence": "2",
            "visible_through_sequence": "2"
          }
        },
        "selected": {
          "internal": [
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "120",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-I",
                "row_id": "I-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-I",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "180",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "external": [
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-00",
                "revision": "1",
                "sequence": "1",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "140",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            },
            {
              "row_ref": {
                "source_id": "SOURCE-E",
                "row_id": "E-01",
                "revision": "1",
                "sequence": "2",
                "source_version_ref": "VERSION-01"
              },
              "group_id": "GROUP-E",
              "available_at": "2026-10-09T08:00:00.000Z",
              "movement": {
                "booking_status": "booked",
                "booking_date": "2026-10-01",
                "value_date": "2026-10-01",
                "currency": "USD",
                "direction": "inflow",
                "amount_minor": "160",
                "reference": null,
                "description": "Synthetic settlement item",
                "is_reversal": false
              }
            }
          ],
          "withdrawn": {
            "internal": [],
            "external": []
          },
          "out_of_window_counts": {
            "internal": "0",
            "external": "0"
          }
        },
        "components": [
          {
            "component_id": "POOL-01",
            "status": "indeterminate",
            "code": "COMPONENT_EVIDENCE_UNAVAILABLE",
            "comparisons": "0",
            "exhaustive": false,
            "candidate_count_lower_bound": "0",
            "witnesses": [],
            "unused_internal_row_refs": [],
            "unused_external_row_refs": []
          }
        ],
        "proposals": [],
        "unassigned": [
          {
            "side": "internal",
            "row_ref": {
              "source_id": "SOURCE-I",
              "row_id": "I-00",
              "revision": "1",
              "sequence": "1",
              "source_version_ref": "VERSION-01"
            },
            "reason": "OUTSIDE_CANDIDATE_POOLS"
          }
        ]
      }
    }
  ]
}
