FAILURE MAP
← Case archive

FA-6661 / HTTP retries / Open access

Status retries require both a configured status and a replayable body · case 01

Status retries require both a configured status and a replayable body.

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

ROOT CAUSE

The faulty implementation uses `status in allowed` for the retry-response decision.

VERIFIED REPAIR

Apply the explicit retry-response contract, including the tested boundary and negative cases.

Unsuccessful approach: The attempted repair uses `status >= 500 and replayable` and still violates a separate fixture.

Case contract

Status retries require both a configured status and a replayable body: return the result specified by the explicit input/output boundary fixtures.

Why this case matters

This deterministic http retries model isolates the retry-response policy at a network component boundary.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(status, replayable, allowed):
    return status in allowed
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(503, False, [503]), False)", "check('fixture 2', solve(429, True, [429]), True)", "check('fixture 3', solve(500, True, [503]), False)", "check('fixture 4', solve(503, True, [503]), True)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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
fixture 2TrueTruePassed
fixture 3FalseFalsePassed
fixture 4TrueTruePassed
fixture 1TrueFalseFailed

SHA-256 / 0ee9925190947ffd20a657c30e71e39fe030554319f31a3c3c92ba65607a37d9

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(status, replayable, allowed):
    return status >= 500 and replayable
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(503, False, [503]), False)", "check('fixture 2', solve(429, True, [429]), True)", "check('fixture 3', solve(500, True, [503]), False)", "check('fixture 4', solve(503, True, [503]), True)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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
fixture 2FalseTrueFailed
fixture 3TrueFalseFailed
fixture 4TrueTruePassed
fixture 1FalseFalsePassed

SHA-256 / 7db22e84a934c9b81eeaed04326bc2e445a89211dacc5f15c5c6036a0e747534

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import ipaddress
import re
from urllib.parse import urlsplit, urljoin
N = 1
observations = []
def solve(status, replayable, allowed):
    return status in allowed and replayable
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(503, False, [503]), False)", "check('fixture 2', solve(429, True, [429]), True)", "check('fixture 3', solve(500, True, [503]), False)", "check('fixture 4', solve(503, True, [503]), True)"]
for _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:
    exec(_line)
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
fixture 2TrueTruePassed
fixture 3FalseFalsePassed
fixture 4TrueTruePassed
fixture 1FalseFalsePassed

SHA-256 / 7ae621b67e506a9ff867559da6f7ea360cef6b0aa56b932bcae6117d3a0b2e1c

Verification & scope

Bounded deterministic policy model over validated inputs; not a complete protocol stack or an interoperability claim. The five variants rotate the same explicit fixture set. 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:38:04.105804+00:00.

Case digest / c8dbe86f09ecd21cd9f95ae9c286f506d621ac05b307f589526bba4eb3715363