FAILURE MAP
← Case archive

FA-10481 / Caching / Open access

Invalidating an empty-header variant also removes the absent-header variant · case 01

Invalidating an empty-header variant also removes the absent-header variant.

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

ROOT CAUSE

Variant invalidation defaults missing header values to empty strings and conflates two identities.

THE FAILURE

Variant invalidation defaults missing header values to empty strings and conflates two identities.

Unsuccessful approach: Comparing only truthiness additionally conflates all nonempty values.

Case contract

Entries are [variant-ID,normalized request-header mapping]. Remove entries matching every selected header in both presence and exact string value; preserve all other variants and their order. Empty selected names match every variant.

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(entries, names, request):
    return [x for x in entries if not all(x[1].get(k,'')==request.get(k,'') for k in names)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*([['missing', {}], ['empty', {'x': ''}]], ['x'], {'x': ''})), [['missing', {}]])
check('fixture 2', solve(*([['one', {'x': 'one'}], ['two', {'x': 'two'}]], ['x'], {'x': 'one'})), [['two', {'x': 'two'}]])
check('fixture 3', solve(*([['missing', {}], ['empty', {'x': ''}]], ['x'], {})), [['empty', {'x': ''}]])
check('fixture 4', solve(*([], ['x'], {})), [])
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[][['missing', {}]]Failed
fixture 2[['two', {'x': 'two'}]][['two', {'x': 'two'}]]Passed
fixture 3[][['empty', {'x': ''}]]Failed
fixture 4[][]Passed

SHA-256 / db18fdd83c596314e93c96d6bfbbd188b66b4233d3234bf13d629035169478af

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(entries, names, request):
    return [x for x in entries if not all(bool(x[1].get(k))==bool(request.get(k)) for k in names)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*([['missing', {}], ['empty', {'x': ''}]], ['x'], {'x': ''})), [['missing', {}]])
check('fixture 2', solve(*([['one', {'x': 'one'}], ['two', {'x': 'two'}]], ['x'], {'x': 'one'})), [['two', {'x': 'two'}]])
check('fixture 3', solve(*([['missing', {}], ['empty', {'x': ''}]], ['x'], {})), [['empty', {'x': ''}]])
check('fixture 4', solve(*([], ['x'], {})), [])
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[][['missing', {}]]Failed
fixture 2[][['two', {'x': 'two'}]]Failed
fixture 3[][['empty', {'x': ''}]]Failed
fixture 4[][]Passed

SHA-256 / 4846a9d8d062b6e0c7361a3165e6cc2aad127dec0f2ed64f9c740eb53a331be4

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 4 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

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

Case digest / a32539a1df54fafbf0e1b2c6fdaff612eeee9c50ec03fc695646f8f124004706