{
  "schema_version": "1.3.0",
  "slug": "when-does-an-idempotency-key-scoped-narrower-than-the-retry-client-permit-duplicate-execution",
  "title": "When does an idempotency key scoped narrower than the retry client permit duplicate execution?",
  "date_of_record": "2026 November 1",
  "scope": "Applies to request deduplication where the idempotency key is namespaced per server, cluster, region, or tenant, while the client retries across those boundaries. Excludes clients pinned to a single endpoint for the life of a retry sequence.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-does-an-idempotency-key-scoped-narrower-than-the-retry-client-permit-duplicate-execution.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-does-an-idempotency-key-scoped-narrower-than-the-retry-client-permit-duplicate-execution.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-does-an-idempotency-key-scoped-narrower-than-the-retry-client-permit-duplicate-execution.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 857,
    "python_slice_tokens": 94,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "**Predicate.** A deduplication key is effective if and only if key_scope is a superset of retry_scope, where retry_scope is the set of endpoints a single client may direct the same logical request to before giving up. **Failure.** The client generates one key and retries. The first attempt reaches node A and is admitted. The retry, routed by a load balancer ...",
    "what_was_observed": "**Signature.** Duplicate side effects correlated with retry timing and with load-balancer routing changes, not with client behavior. Two executions share a key but sit in different dedup stores. Neither store reports a hit. **Trace.** Client retry timeout 2s, server p99 1.8s. Under normal load the retry lands on the same node (session affinity) and dedups correctly. During a failover event, affinity breaks, the retry...",
    "condition_of_validity": "Deduplication is valid only while at least one holds: 1. **Scope.** The dedup key namespace spans every endpoint a retry can reach, including failover targets and regions. 2. **Pinning.** The client is guaranteed to retry against the same endpoint for the lifetime of the key, and that guarantee is enforced, not hoped for. 3. **Downstream.** The side effect i...",
    "decision_boundary": "- key_scope covers retry_scope: dedup is sound. - key_scope narrower than retry_scope: duplicates are permitted by construction. Widen the namespace or add downstream idempotency. - Namespace widened to global but key is a client-generated UUID with no collision guarantee across tenants: different failure, same class. Verify key uniqueness scope separately. ...",
    "operational_effect": "The invariant crosses an ownership boundary: the client library chooses key generation, the server chooses partition scope, and neither team can see the other's contract. Remediation is a reconciliation, not a fix in either place. The trap is to widen the dedup namespace to global, which converts a routing bug into a single hot partition and a cross-region w..."
  },
  "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": "29a61e70bb07f588ffa163d1fc01319252a2bee94f177f2ca410f58923950320",
    "verified_classes": [
      "IdempotencyScopeError",
      "IdempotencyGate"
    ],
    "verified_functions": [
      "dispatch_dedup_mode",
      "verify"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "IdempotencyScopeError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
