FAILURE MAP
← Case archive

FA-6766 / HTTP caching / Open access

Vary star never selects a stored response · case 01

Vary star never selects a stored response.

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

ROOT CAUSE

The faulty implementation uses `all(old.get(k)==new.get(k) for k in vary)` for the vary-star-never-selects-a-stored-response decision.

VERIFIED REPAIR

Apply the explicit vary-star-never-selects-a-stored-response contract, including the tested boundary and negative cases.

Unsuccessful approach: The attempted repair uses `old == new` and still violates a separate fixture.

Case contract

Bounded offline decision model: vary star never selects a stored response. 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 vary-star-never-selects-a-stored-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(vary, old, new):
    return all(old.get(k)==new.get(k) for k in vary)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['*'], {}, {}), False)", "check('fixture 2', solve(['accept'], {'accept': 'a', 'other': 1}, {'accept': 'a', 'other': 2}), True)", "check('fixture 3', solve(['accept'], {'accept': 'a'}, {'accept': 'b'}), False)", "check('fixture 4', solve([], {}, {}), 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 / ea3e3227df4d7bd0867a59e5de63d20d0de8e144d658500257b7461da446a917

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(vary, old, new):
    return old == new
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['*'], {}, {}), False)", "check('fixture 2', solve(['accept'], {'accept': 'a', 'other': 1}, {'accept': 'a', 'other': 2}), True)", "check('fixture 3', solve(['accept'], {'accept': 'a'}, {'accept': 'b'}), False)", "check('fixture 4', solve([], {}, {}), 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 3FalseFalsePassed
fixture 4TrueTruePassed
fixture 1TrueFalseFailed

SHA-256 / f955f8a5deae8494868e6300dfc3655379d70c2fa3005456c23adc89d3bf39e0

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(vary, old, new):
    return '*' not in vary and all(old.get(k)==new.get(k) for k in vary)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['*'], {}, {}), False)", "check('fixture 2', solve(['accept'], {'accept': 'a', 'other': 1}, {'accept': 'a', 'other': 2}), True)", "check('fixture 3', solve(['accept'], {'accept': 'a'}, {'accept': 'b'}), False)", "check('fixture 4', solve([], {}, {}), 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 / 8e2097ccca6de19a2e57840a2e1097c874e5a305871a6ebb43342f10b0d01360

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

Case digest / b60c529855ed6c2a57e8fbd6760b33da5308d8bf4a748639e0353604aa79c4ee