FAILURE MAP
← Case archive

FA-10476 / Caching / Open access

Representation identity ignores one of the selected request headers · case 01

Representation identity ignores one of the selected request headers.

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

ROOT CAUSE

A multi-header variant key keeps only the first selected dimension.

VERIFIED REPAIR

Preserve the cache-state invariant: Header names are already normalized lowercase and values are strings. Return sorted unique requested Vary names paired with value or None for missing fields; ignore unselected headers.

Unsuccessful approach: Keying on every request header fragments entries on unrelated tracing metadata.

Case contract

Header names are already normalized lowercase and values are strings. Return sorted unique requested Vary names paired with value or None for missing fields; ignore unselected headers.

Why this case matters

A deterministic cache state transformation. Inputs are copied or treated as immutable; no remote storage, real clock, or concurrent interleaving is simulated.

1 / The failure

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

N = 1
observations = []
def solve(vary, headers):
    return [[name,headers.get(name)] for name in vary[:1]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(['accept', 'lang'], {'accept': 'json', 'lang': 'fr', 'trace': 'x'})), [['accept', 'json'], ['lang', 'fr']])
check('fixture 2', solve(*(['lang'], {'lang': 'en', 'trace': 'y'})), [['lang', 'en']])
check('fixture 3', solve(*([], {'trace': 'x'})), [])
check('fixture 4', solve(*(['lang', 'lang'], {})), [['lang', None]])
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 1[['accept', 'json']][['accept', 'json'], ['lang', 'fr']]Failed
fixture 2[['lang', 'en']][['lang', 'en']]Passed
fixture 3[][]Passed
fixture 4[['lang', None]][['lang', None]]Passed

SHA-256 / 2642f1fa52920c871369c42739ddb5189959113c453d93a2c14856592f69c781

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(vary, headers):
    return [[name,headers.get(name)] for name in sorted(headers)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(['accept', 'lang'], {'accept': 'json', 'lang': 'fr', 'trace': 'x'})), [['accept', 'json'], ['lang', 'fr']])
check('fixture 2', solve(*(['lang'], {'lang': 'en', 'trace': 'y'})), [['lang', 'en']])
check('fixture 3', solve(*([], {'trace': 'x'})), [])
check('fixture 4', solve(*(['lang', 'lang'], {})), [['lang', None]])
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 1[['accept', 'json'], ['lang', 'fr'], ['trace', 'x']][['accept', 'json'], ['lang', 'fr']]Failed
fixture 2[['lang', 'en'], ['trace', 'y']][['lang', 'en']]Failed
fixture 3[['trace', 'x']][]Failed
fixture 4[][['lang', None]]Failed

SHA-256 / 09207463d2e86b7318329ffb02073419163f2396a378a57e25facba639ce7903

3 / The verified repair

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

N = 1
observations = []
def solve(vary, headers):
    return [[name,headers.get(name)] for name in sorted(set(vary))]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(['accept', 'lang'], {'accept': 'json', 'lang': 'fr', 'trace': 'x'})), [['accept', 'json'], ['lang', 'fr']])
check('fixture 2', solve(*(['lang'], {'lang': 'en', 'trace': 'y'})), [['lang', 'en']])
check('fixture 3', solve(*([], {'trace': 'x'})), [])
check('fixture 4', solve(*(['lang', 'lang'], {})), [['lang', None]])
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 1[['accept', 'json'], ['lang', 'fr']][['accept', 'json'], ['lang', 'fr']]Passed
fixture 2[['lang', 'en']][['lang', 'en']]Passed
fixture 3[][]Passed
fixture 4[['lang', None]][['lang', None]]Passed

SHA-256 / 25adf4e19484d84e6e7abbb37b64f15595158a614392254bb70631eaa3fa2fa1

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

Case digest / 284df38a0d678ee2d94a041a9f6f9c310ac6a9b80817fba5549b94931d108a4a