{
  "schema_version": "1.3.0",
  "slug": "what-invariants-must-survive-a-retry-after-a-partial-failure-that-was-not-observed-at-the-source",
  "title": "What invariants must survive a retry after a partial failure that was not observed at the source?",
  "date_of_record": "2026 October 20",
  "scope": "* **Applies when:** The source can experience unobserved partial failures, the operations are non-idempotent by default, and duplicates have material consequences. * **Does not apply when:** The source provides a native idempotency key mech",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-invariants-must-survive-a-retry-after-a-partial-failure-that-was-not-observed-at-the-source.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-invariants-must-survive-a-retry-after-a-partial-failure-that-was-not-observed-at-the-source.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-invariants-must-survive-a-retry-after-a-partial-failure-that-was-not-observed-at-the-source.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1032,
    "python_slice_tokens": 305,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The separation between **client-side failure** (the client did not receive a response) and **source-side state** (the external system may have applied the request partially, fully, or not at all). Relying on client-side failure creates the **Retry Duplication Hazard**: the client retries, the source has already applied the original request, and the retry cre...",
    "what_was_observed": "In agent architectures using non-idempotent external APIs, failing to handle unobserved partial failures produces three primary failure modes: 1. **Duplicate Transaction:** The agent sends a payment, times out, and retries. Both payments commit, double-charging the customer. 2. **Over-Write:** The agent sends a state update, times out, and retries. The first update committed, but the retry's payload was different (e....",
    "condition_of_validity": "* **Applies when:** The source can experience unobserved partial failures, the operations are non-idempotent by default, and duplicates have material consequences. * **Does not apply when:** The source provides a native idempotency key mechanism, or the operations are provably idempotent.",
    "decision_boundary": "1. **Did the request fail without a clear success or failure signal?** If no, standard error handling applies. If yes, proceed. 2. **Is the source's state queryable before retry (`source_query_predicate`)?** If yes, query first. If no, the retry must use the `original_request_idempotency_key` to prevent duplication. 3. **Does the source support idempotency k...",
    "operational_effect": "1. **Duplicate Prevention:** Uses idempotency keys or query-first to prevent duplicate side effects. 2. **Partial Failure Detection:** Detects partial applications, allowing targeted remediation rather than retrying from scratch. 3. **Deterministic Recovery:** Provides cryptographic proof that the retry is safe."
  },
  "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": "49ac39f67d71148e5abada00951892093e56ed17d2ac370a91209559cea0b49e",
    "verified_classes": [
      "RetryVerdict",
      "RetryState",
      "RetryPolicy",
      "RetryManifest",
      "PartialFailureRetryGuard"
    ],
    "verified_functions": [
      "_hash",
      "evaluate_retry"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 0,
    "raised_exceptions": [],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
