FAILURE MAP
← Case archive

FA-6866 / Content negotiation / Open access

Empty accept encoding requires identity · case 01

Empty accept encoding requires identity.

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

ROOT CAUSE

The faulty implementation uses `encodings` for the empty-accept-encoding-requires-identity decision.

VERIFIED REPAIR

Apply the explicit empty-accept-encoding-requires-identity contract, including the tested boundary and negative cases.

Unsuccessful approach: The attempted repair uses `['identity'] if not encodings else encodings` and still violates a separate fixture.

Case contract

Bounded offline decision model: empty accept encoding requires identity. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.

Why this case matters

This deterministic content negotiation model isolates the empty-accept-encoding-requires-identity 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(present, encodings):
    return encodings
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, []), ['identity'])", "check('fixture 2', solve(False, []), [])", "check('fixture 3', solve(True, ['gzip']), ['gzip'])", "check('fixture 4', solve(False, ['br']), ['br'])"]
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 2[][]Passed
fixture 3['gzip']['gzip']Passed
fixture 4['br']['br']Passed
fixture 1[]['identity']Failed

SHA-256 / c256310e598274894a251a0f26e9b52fd9488f85c354930831ea1e85cb3e4980

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(present, encodings):
    return ['identity'] if not encodings else encodings
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, []), ['identity'])", "check('fixture 2', solve(False, []), [])", "check('fixture 3', solve(True, ['gzip']), ['gzip'])", "check('fixture 4', solve(False, ['br']), ['br'])"]
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 2['identity'][]Failed
fixture 3['gzip']['gzip']Passed
fixture 4['br']['br']Passed
fixture 1['identity']['identity']Passed

SHA-256 / 0839bbc9e61d8a77c0b8e436480709e28e1fa5b80594b3b16e8b10f7c6c72054

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(present, encodings):
    return ['identity'] if present and not encodings else encodings
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(True, []), ['identity'])", "check('fixture 2', solve(False, []), [])", "check('fixture 3', solve(True, ['gzip']), ['gzip'])", "check('fixture 4', solve(False, ['br']), ['br'])"]
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 2[][]Passed
fixture 3['gzip']['gzip']Passed
fixture 4['br']['br']Passed
fixture 1['identity']['identity']Passed

SHA-256 / a86025e3fe6749eb127c05fb4b40cfbf24b166a94cc2107bf851929e0cda0ce7

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

Case digest / b71d7447e7c4e41d0785fa99aaf7046c9cc824ee440fc30f4a9d23a730b90b1b