FAILURE MAP
← Case archive

FA-926 / Reliability / Open access

Admit a remote operation retry: A permanent rejection triggers another attempt · case 01

The retry admission operation is admitted even though a permanent rejection triggers another attempt.

Verified by executionVariant 1 · 9 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The admission path omits the retryable result invariant while validating the other operation preconditions.

VERIFIED REPAIR

Require r['retryable_result'] in [408,429,500,502,503,504] together with every other stated precondition before accepting the operation.

Unsuccessful approach: Adding the retryable result check repairs the reported defect, but replacing the adjacent attempt budget check loses that independent invariant.

Case contract

Return a Boolean admission decision for admit a remote operation retry. The record r must satisfy all of: r['retryable_result'] in [408,429,500,502,503,504]; r['attempt_budget'][0] < r['attempt_budget'][1]; r['remaining_deadline'][0]+r['remaining_deadline'][1] <= r['remaining_deadline'][2]; r['idempotency_safe'][0] or bool(r['idempotency_safe'][1]); r['retry_after'][0] >= r['retry_after'][1]. Extra tracing fields are ignored; validation does not mutate the record.

Why this case matters

A deterministic local contract for reliability. Each negative fixture violates exactly one invariant. No transport timing, persistence, cryptographic verification, or full protocol implementation is claimed.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (r['attempt_budget'][0] < r['attempt_budget'][1]) and (r['remaining_deadline'][0]+r['remaining_deadline'][1] <= r['remaining_deadline'][2]) and (r['idempotency_safe'][0] or bool(r['idempotency_safe'][1])) and (r['retry_after'][0] >= r['retry_after'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'retryable_result': 503, 'attempt_budget': [2, 3], 'remaining_deadline': [5, 3, 8], 'idempotency_safe': [False, 'op1'], 'retry_after': [10, 10]}
check('valid operation', solve(r), True)
check('A permanent rejection triggers another attempt', solve(dict(r, **{'retryable_result': 400})), False)
check('An exhausted attempt budget permits one more request', solve(dict(r, **{'attempt_budget': [3, 3]})), False)
check('A retry cannot finish within its remaining request deadline', solve(dict(r, **{'remaining_deadline': [5, 4, 8]})), False)
check('A non-idempotent write is retried without an identity key', solve(dict(r, **{'idempotency_safe': [False, '']})), False)
check('A retry ignores the server requested wait period', solve(dict(r, **{'retry_after': [9, 10]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'retryable_result': 400, 'attempt_budget': [3, 3], 'remaining_deadline': [5, 4, 8], 'idempotency_safe': [False, ''], 'retry_after': [9, 10]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
valid operationTrueTruePassed
A permanent rejection triggers another attemptTrueFalseFailed
An exhausted attempt budget permits one more requestFalseFalsePassed
A retry cannot finish within its remaining request deadlineFalseFalsePassed
A non-idempotent write is retried without an identity keyFalseFalsePassed
A retry ignores the server requested wait periodFalseFalsePassed
unrelated tracing metadataTrueTruePassed
repeat validation is pureTrueTruePassed
two independent violations in variantFalseFalsePassed

SHA-256 / 1b314f89b84568b8299fb39722e1b28477b0db9ae8a5f759e98f900f73a9ab62

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (r['retryable_result'] in [408,429,500,502,503,504]) and (r['remaining_deadline'][0]+r['remaining_deadline'][1] <= r['remaining_deadline'][2]) and (r['idempotency_safe'][0] or bool(r['idempotency_safe'][1])) and (r['retry_after'][0] >= r['retry_after'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'retryable_result': 503, 'attempt_budget': [2, 3], 'remaining_deadline': [5, 3, 8], 'idempotency_safe': [False, 'op1'], 'retry_after': [10, 10]}
check('valid operation', solve(r), True)
check('A permanent rejection triggers another attempt', solve(dict(r, **{'retryable_result': 400})), False)
check('An exhausted attempt budget permits one more request', solve(dict(r, **{'attempt_budget': [3, 3]})), False)
check('A retry cannot finish within its remaining request deadline', solve(dict(r, **{'remaining_deadline': [5, 4, 8]})), False)
check('A non-idempotent write is retried without an identity key', solve(dict(r, **{'idempotency_safe': [False, '']})), False)
check('A retry ignores the server requested wait period', solve(dict(r, **{'retry_after': [9, 10]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'retryable_result': 400, 'attempt_budget': [3, 3], 'remaining_deadline': [5, 4, 8], 'idempotency_safe': [False, ''], 'retry_after': [9, 10]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
valid operationTrueTruePassed
A permanent rejection triggers another attemptFalseFalsePassed
An exhausted attempt budget permits one more requestTrueFalseFailed
A retry cannot finish within its remaining request deadlineFalseFalsePassed
A non-idempotent write is retried without an identity keyFalseFalsePassed
A retry ignores the server requested wait periodFalseFalsePassed
unrelated tracing metadataTrueTruePassed
repeat validation is pureTrueTruePassed
two independent violations in variantFalseFalsePassed

SHA-256 / 6f161d58aec872f86707bd0208849c9a238003cbae66a4fbca4b2e42d59132fb

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (r['retryable_result'] in [408,429,500,502,503,504]) and (r['attempt_budget'][0] < r['attempt_budget'][1]) and (r['remaining_deadline'][0]+r['remaining_deadline'][1] <= r['remaining_deadline'][2]) and (r['idempotency_safe'][0] or bool(r['idempotency_safe'][1])) and (r['retry_after'][0] >= r['retry_after'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'retryable_result': 503, 'attempt_budget': [2, 3], 'remaining_deadline': [5, 3, 8], 'idempotency_safe': [False, 'op1'], 'retry_after': [10, 10]}
check('valid operation', solve(r), True)
check('A permanent rejection triggers another attempt', solve(dict(r, **{'retryable_result': 400})), False)
check('An exhausted attempt budget permits one more request', solve(dict(r, **{'attempt_budget': [3, 3]})), False)
check('A retry cannot finish within its remaining request deadline', solve(dict(r, **{'remaining_deadline': [5, 4, 8]})), False)
check('A non-idempotent write is retried without an identity key', solve(dict(r, **{'idempotency_safe': [False, '']})), False)
check('A retry ignores the server requested wait period', solve(dict(r, **{'retry_after': [9, 10]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'retryable_result': 400, 'attempt_budget': [3, 3], 'remaining_deadline': [5, 4, 8], 'idempotency_safe': [False, ''], 'retry_after': [9, 10]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
valid operationTrueTruePassed
A permanent rejection triggers another attemptFalseFalsePassed
An exhausted attempt budget permits one more requestFalseFalsePassed
A retry cannot finish within its remaining request deadlineFalseFalsePassed
A non-idempotent write is retried without an identity keyFalseFalsePassed
A retry ignores the server requested wait periodFalseFalsePassed
unrelated tracing metadataTrueTruePassed
repeat validation is pureTrueTruePassed
two independent violations in variantFalseFalsePassed

SHA-256 / f2ff00253088600ac6088376dfcc31413d4d31d641e245e0f84d9f8a1f28dcb3

Verification & scope

This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:36:57.206223+00:00.

Case digest / f572e4d481317fd97411682ce4ffe996761f0d688eb3e1d008f40bffcb977cdf