FAILURE MAP
← Case archive

FA-6806 / HTTP caching / Open access

If none match takes precedence over modified since · case 01

If none match takes precedence over modified since.

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

ROOT CAUSE

The faulty implementation uses `etag_match or date_match` for the if-none-match-takes-precedence-over-modified-since decision.

VERIFIED REPAIR

Apply the explicit if-none-match-takes-precedence-over-modified-since contract, including the tested boundary and negative cases.

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

Case contract

Bounded offline decision model: if none match takes precedence over modified since. 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 if-none-match-takes-precedence-over-modified-since 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(has_etag, etag_match, date_match):
    return etag_match or date_match
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, False, True), False)", "check('fixture 2', solve(True, True, False), True)", "check('fixture 3', solve(False, False, True), True)", "check('fixture 4', solve(False, False, False), False)"]
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 3TrueTruePassed
fixture 4FalseFalsePassed
fixture 1TrueFalseFailed

SHA-256 / 196cf4d656dde9285ddb64bf510c0e9405d51026025777f9146e3b357bce5c37

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(has_etag, etag_match, date_match):
    return etag_match and date_match
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, False, True), False)", "check('fixture 2', solve(True, True, False), True)", "check('fixture 3', solve(False, False, True), True)", "check('fixture 4', solve(False, False, False), False)"]
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 3FalseTrueFailed
fixture 4FalseFalsePassed
fixture 1FalseFalsePassed

SHA-256 / 103baa36c7161c760f4702f19e18192249e0bf8d92352feb6aae45b14140bbf6

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(has_etag, etag_match, date_match):
    return etag_match if has_etag else date_match
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, False, True), False)", "check('fixture 2', solve(True, True, False), True)", "check('fixture 3', solve(False, False, True), True)", "check('fixture 4', solve(False, False, False), False)"]
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 3TrueTruePassed
fixture 4FalseFalsePassed
fixture 1FalseFalsePassed

SHA-256 / 1228104118f779b5dfd1c2084d4c9536e480eac4a4c5af3ab7bb1d63c4c18bd7

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

Case digest / 20cf8907e86bdfa8b3071349774da0a7995591c2aaf94b0a287e474fa1293adb