FAILURE MAP
← Case archive

FA-6946 / Content negotiation / Open access

Content coding decode order reverses application order · case 01

Content coding decode order reverses application order.

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

ROOT CAUSE

The faulty implementation uses `codings` for the content-coding-decode-order-reverses-application-order decision.

VERIFIED REPAIR

Apply the explicit content-coding-decode-order-reverses-application-order contract, including the tested boundary and negative cases.

Unsuccessful approach: The attempted repair uses `sorted(codings)` and still violates a separate fixture.

Case contract

Bounded offline decision model: content coding decode order reverses application order. 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 content-coding-decode-order-reverses-application-order 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(codings):
    return codings
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['gzip', 'br']), ['br', 'gzip'])", "check('fixture 2', solve(['br', 'gzip']), ['gzip', 'br'])", "check('fixture 3', solve([]), [])", "check('fixture 4', solve(['gzip']), ['gzip'])"]
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['br', 'gzip']['gzip', 'br']Failed
fixture 3[][]Passed
fixture 4['gzip']['gzip']Passed
fixture 1['gzip', 'br']['br', 'gzip']Failed

SHA-256 / 8036d4fafbcbaa049e34ea64ce00ba0578ef98ca0a712006b44357be35cf1b62

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

SHA-256 / a94166d0b4c2ee5b43c41be7361c12be1ff3a9163787ebfb7f005a900e48c342

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(codings):
    return list(reversed(codings))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['gzip', 'br']), ['br', 'gzip'])", "check('fixture 2', solve(['br', 'gzip']), ['gzip', 'br'])", "check('fixture 3', solve([]), [])", "check('fixture 4', solve(['gzip']), ['gzip'])"]
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['gzip', 'br']['gzip', 'br']Passed
fixture 3[][]Passed
fixture 4['gzip']['gzip']Passed
fixture 1['br', 'gzip']['br', 'gzip']Passed

SHA-256 / 84fb706bb36ed6073ccaddf32ce4f255ca9fd56eed54470c38c2ddcffa96af5d

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

Case digest / 1628b24cee544c03c64fd4302fd145f6dbf4c811a7d8995c5de6607627d14579