FAILURE MAP
← Case archive

FA-6816 / HTTP caching / Open access

Cached head updates do not replace get payload · case 01

Cached head updates do not replace get payload.

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

ROOT CAUSE

The faulty implementation uses `new_body` for the cached-head-updates-do-not-replace-get-payload decision.

VERIFIED REPAIR

Apply the explicit cached-head-updates-do-not-replace-get-payload contract, including the tested boundary and negative cases.

Unsuccessful approach: The attempted repair uses `old_body` and still violates a separate fixture.

Case contract

Bounded offline decision model: cached head updates do not replace get payload. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

Why this case matters

This deterministic http caching model isolates the cached-head-updates-do-not-replace-get-payload 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(method, old_body, new_body):
    return new_body
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('HEAD', 'abc', ''), 'abc')", "check('fixture 2', solve('GET', 'abc', 'xyz'), 'xyz')", "check('fixture 3', solve('HEAD', '', ''), '')", "check('fixture 4', solve('GET', '', 'x'), 'x')"]
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 2xyzxyzPassed
fixture 3Passed
fixture 4xxPassed
fixture 1abcFailed

SHA-256 / 42436192d4d10c8bd195a691724ddfb77c93aea57bc5eecd00ac2af4b8899907

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(method, old_body, new_body):
    return old_body
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('HEAD', 'abc', ''), 'abc')", "check('fixture 2', solve('GET', 'abc', 'xyz'), 'xyz')", "check('fixture 3', solve('HEAD', '', ''), '')", "check('fixture 4', solve('GET', '', 'x'), 'x')"]
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 2abcxyzFailed
fixture 3Passed
fixture 4xFailed
fixture 1abcabcPassed

SHA-256 / 39db26370df64fa8b9e065e3ba033cefb415dc019790bedbbb3ad7d0f43c6bd2

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(method, old_body, new_body):
    return old_body if method == 'HEAD' else new_body
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve('HEAD', 'abc', ''), 'abc')", "check('fixture 2', solve('GET', 'abc', 'xyz'), 'xyz')", "check('fixture 3', solve('HEAD', '', ''), '')", "check('fixture 4', solve('GET', '', 'x'), 'x')"]
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 2xyzxyzPassed
fixture 3Passed
fixture 4xxPassed
fixture 1abcabcPassed

SHA-256 / f70d2cf15cccd517ec2efa62677fe255b1c1b1f5786f56a50dee4eb682613406

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:05.535158+00:00.

Case digest / ba374b8b98d70f837fbe7cf44b219d086f3aaeb35a3d61d95e670c3bdd391eec