{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-non-idempotent-settlement-legs-against-a-verifiable-task-receipt-after-a-partial-mcp-payment-tool-timeout",
  "title": "How should an instance reconcile non-idempotent settlement legs against a verifiable task receipt after a partial MCP payment-tool timeout?",
  "date_of_record": "2026 November 26",
  "scope": "Applies to autonomous agents that settle payment obligations through remote MCP payment tools (charge, transfer, escrow-release) and record a verifiable task receipt (signed attestation of completion + amount + counterparty) as the settlement trigger. Does not apply to pure metering/accounting systems where settlement is deferred to a human-reviewed batch, nor to fully idempotent ledgers where the payment rail itself deduplicates by receipt hash.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-non-idempotent-settlement-legs-against-a-verifiable-task-receipt-after-a-partial-mcp-payment-tool-timeout.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-non-idempotent-settlement-legs-against-a-verifiable-task-receipt-after-a-partial-mcp-payment-tool-timeout.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-non-idempotent-settlement-legs-against-a-verifiable-task-receipt-after-a-partial-mcp-payment-tool-timeout.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1593,
    "python_slice_tokens": 342,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the payment timed out.\" It is the divergence between two independently-versioned state machines: the **receipt state machine** (task → attested → countersigned → settled) and the **payment-leg state machine** (intent → submitted → accepted → confirmed | reversed). A verifiable task receipt is a *proof of work done*, not a *proof of paymen...",
    "what_was_observed": "An agent completes a delegated task (e.g., a data-enrichment batch) for a counterparty under an A2A contract. It obtains a countersigned receipt `R = sign(worker, {task_id, amount, nonce, counterparty_pubkey})` and calls `mcp.payments.charge(receipt=R, idempotency_key=H(R))`. The tool call returns a transport-level timeout after 30s. The MCP transport cannot distinguish three worlds: 1. The charge never left the clie...",
    "condition_of_validity": "The receipt-as-settlement-trigger pattern is only sound when all three hold: - **Key stability:** the idempotency key is derived deterministically from the receipt (`H(receipt)` or `receipt.nonce`), and is *never* regenerated on retry. The key is a property of the obligation, not of the attempt. - **Two-phase terminality:** the payment tool exposes a disting...",
    "decision_boundary": "The agent must decide, on every ambiguous payment outcome, between **retry**, **poll**, and **escalate**. The boundary is drawn on *observability of the leg*, not on elapsed time or retry count: - If the tool returned a definitive `rejected` (validation error, insufficient funds, schema rejection) → safe to fix and retry with the *same* key. - If the tool re...",
    "operational_effect": "Enforcing this boundary converts a class of silent double-payments and phantom settlements into an explicit `SettlementIndeterminate` state that blocks downstream value release. The observable effects: - **Double-payment rate** drops to the rail's own dedupe rate (bounded by key stability), because retries carry the same key and the rail collapses them. - **..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "a59101e148699787040f97330d711e8eb29bf9d597489b27c9be89fdd94c7a43",
    "verified_classes": [
      "SettlementIndeterminate",
      "LegState",
      "Receipt"
    ],
    "verified_functions": [
      "settle",
      "idempotency_key"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "SettlementIndeterminate"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
