{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-a-replay-determinism-breach-when-idempotency-keys-collide-across-a-forked-agent-s-tool-call-ledger",
  "title": "What structural signals indicate a replay-determinism breach when idempotency keys collide across a forked agent's tool-call ledger",
  "date_of_record": "2026 November 28",
  "scope": "Applies to distributed agent workflows where a single logical task is executed by multiple agent instances (retries, forks, or swarm replicas) that share a tool-call ledger keyed by client-generated idempotency tokens. Does not apply to single-instance, non-retried agent loops where tool calls are never replayed against a shared side-effect store.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-replay-determinism-breach-when-idempotency-keys-collide-across-a-forked-agent-s-tool-call-ledger.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-replay-determinism-breach-when-idempotency-keys-collide-across-a-forked-agent-s-tool-call-ledger.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-a-replay-determinism-breach-when-idempotency-keys-collide-across-a-forked-agent-s-tool-call-ledger.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2226,
    "python_slice_tokens": 395,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode here is not \"the tool was called twice.\" That is the trivial duplicate-write case, and idempotency keys handle it. The non-obvious boundary is this: **an idempotency key that is deterministic over the *logical* call is not necessarily deterministic over the *materialized* call.** An agent generates a key by hashing its intended action — but ...",
    "what_was_observed": "A three-replica research agent (replicas A, B, C) was assigned a task with a `search_and_summarize` tool. The orchestrator issued the same task envelope to all three to hedge against replica failure, with a shared idempotency ledger fronting the tool. Keys were generated by `sha256(normalize(intent))` where `normalize` lowercased and sorted the tool name and a coarse \"intent class\" string. Trace: 1. Replica A calls `...",
    "condition_of_validity": "The deduplication-by-semantic-key strategy is only valid under the following invariant, which most systems do not enforce: > For any two calls sharing an idempotency key, the *materialized request payloads must be byte-identical*, or the ledger must refuse to absorb the second call and surface a collision to the orchestrator. This is the **payload-equivalenc...",
    "decision_boundary": "The decision boundary is the point at which a coarse-key ledger hit must be **escalated rather than absorbed**. Concretely, on a key hit the ledger must branch: - **Payload digests equal** → absorb, return cached side-effect. Safe. - **Payload digests differ, both within declared tolerance** (e.g., only field ordering or whitespace differs after canonicaliza...",
    "operational_effect": "When the boundary is crossed silently, the observable failure is **misattributed reasoning divergence**. The orchestrator sees replicas disagree and blames the model, retries with higher temperature or more context, and the disagreement persists or worsens because the root cause — input substitution — is untouched. Consensus thresholds never converge because..."
  },
  "matched_failure_symptoms": [
    "DUPLICATE_MUTATION_OR_BILLING"
  ],
  "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": "81c706691973848e8380a23905e4fa34a555e4f12f99d90b79a1c5425eb1e4bc",
    "verified_classes": [
      "ReplayDeterminismBreach",
      "LedgerEntry",
      "IdempotencyLedger"
    ],
    "verified_functions": [
      "replay_check",
      "_canonical",
      "payload_digest",
      "absorb_or_execute"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ReplayDeterminismBreach"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
