{
  "schemaVersion": "dxrg-trading-agent-execution-reconciliation-matrix/v1",
  "version": "1.0.0",
  "publishedAt": "2026-07-24",
  "title": "DXRG Trading-Agent Execution and Reconciliation Test Matrix",
  "description": "Eight failure fixtures for testing the path from a policy-valid typed action through final-payload validation, submission, acknowledgement, settlement, reconciliation, and controlled recovery.",
  "evidenceBoundary": "This is an engineering and evaluation framework. Passing the fixtures does not establish trading skill, profitability, universal safety, or transfer to another venue.",
  "source": {
    "title": "From a Typed Trading Action to Settlement",
    "url": "https://www.dxrg.ai/blogs/trading-agent-execution-settlement",
    "primaryResearch": "https://arxiv.org/abs/2604.26091"
  },
  "fixtures": [
    {
      "fixtureId": "final-payload-binding",
      "layer": "pre-submit-validation",
      "injectedBreak": "Change quantity or asset identity while serializing a policy-approved typed action.",
      "requiredFields": ["action_id", "mandate_version", "state_snapshot_id", "policy_version", "payload_hash"],
      "passCondition": "The runtime rejects the changed payload before submission and preserves both the proposed action and final payload.",
      "defaultResponse": "reject_and_recompile",
      "evidenceClass": "dxrg-engineering-framework"
    },
    {
      "fixtureId": "duplicate-request-identity",
      "layer": "submission",
      "injectedBreak": "Send the same stable action identifier through the execution adapter twice.",
      "requiredFields": ["action_id", "client_request_id", "payload_hash", "attempt_number", "venue_order_id"],
      "passCondition": "The adapter returns the first order identity or rejects the duplicate without creating a second venue order.",
      "defaultResponse": "deduplicate_request",
      "evidenceClass": "dxrg-engineering-framework"
    },
    {
      "fixtureId": "ambiguous-timeout",
      "layer": "acknowledgement",
      "injectedBreak": "Drop the client response after the venue may have accepted the order.",
      "requiredFields": ["client_request_id", "submitted_at", "transport_result", "venue_query_result", "resolution_state"],
      "passCondition": "The runtime queries authoritative order state before retry and keeps the order unresolved until evidence arrives.",
      "defaultResponse": "query_before_retry",
      "evidenceClass": "dxrg-engineering-framework"
    },
    {
      "fixtureId": "partial-fill-lifecycle",
      "layer": "order-lifecycle",
      "injectedBreak": "Fill part of the submitted quantity while leaving a live remainder.",
      "requiredFields": ["venue_order_id", "filled_quantity", "remaining_quantity", "order_state", "reserved_capital"],
      "passCondition": "The runtime reconciles the fill, preserves the open remainder, and keeps reserved capital visible.",
      "defaultResponse": "reconcile_and_monitor",
      "evidenceClass": "dxrg-engineering-framework"
    },
    {
      "fixtureId": "realized-fee-mismatch",
      "layer": "settlement",
      "injectedBreak": "Return a realized fee that differs from the pre-trade estimate.",
      "requiredFields": ["estimated_fee", "realized_fee", "fee_asset", "fill_id", "balance_effect"],
      "passCondition": "The reconciled portfolio uses the realized fee and records the estimate discrepancy as a separate diagnostic.",
      "defaultResponse": "apply_actual_and_flag",
      "evidenceClass": "dxrg-engineering-framework"
    },
    {
      "fixtureId": "finality-delay",
      "layer": "settlement",
      "injectedBreak": "Delay or reverse the settlement marker before the configured finality condition is met.",
      "requiredFields": ["transaction_id", "settlement_marker", "confirmation_state", "finality_policy", "dependent_actions"],
      "passCondition": "The runtime withholds dependent actions until the required finality state is authoritative.",
      "defaultResponse": "hold_until_final",
      "evidenceClass": "dxrg-engineering-framework"
    },
    {
      "fixtureId": "portfolio-ledger-disagreement",
      "layer": "reconciliation",
      "injectedBreak": "Make local balances or positions disagree with the authoritative venue or chain record.",
      "requiredFields": ["local_state_id", "authoritative_marker", "balance_delta", "position_delta", "reconciliation_status"],
      "passCondition": "The runtime stops new dependent exposure and preserves the mismatch until reconciliation completes.",
      "defaultResponse": "pause_and_reconcile",
      "evidenceClass": "dxrg-engineering-framework"
    },
    {
      "fixtureId": "controlled-recovery-restart",
      "layer": "recovery",
      "injectedBreak": "Restart the execution worker with an unresolved request and stale local portfolio state.",
      "requiredFields": ["incident_id", "unresolved_requests", "reconciled_state_id", "regression_case", "reauthorization"],
      "passCondition": "Execution authority remains revoked until requests are resolved, state is reconciled, the fixture passes, and reauthorization is recorded.",
      "defaultResponse": "recover_then_reauthorize",
      "evidenceClass": "dxrg-engineering-framework"
    }
  ]
}
