FAILURE MAP
← Case archive

FA-6861 / Content negotiation / Open access

Identity encoding is implicit unless specifically excluded · case 01

Identity encoding is implicit unless specifically excluded.

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

ROOT CAUSE

The faulty implementation uses `qualities.get("identity",0)` for the identity-encoding-is-implicit-unless-specifically-excluded decision.

VERIFIED REPAIR

Apply the explicit identity-encoding-is-implicit-unless-specifically-excluded contract, including the tested boundary and negative cases.

Unsuccessful approach: The attempted repair uses `qualities.get("identity",1)` and still violates a separate fixture.

Case contract

Bounded offline decision model: identity encoding is implicit unless specifically excluded. 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 identity-encoding-is-implicit-unless-specifically-excluded 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(qualities):
    return qualities.get("identity",0)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve({}), 1)", "check('fixture 2', solve({'*': 0}), 0)", "check('fixture 3', solve({'identity': 0.2, '*': 0}), 0.2)", "check('fixture 4', solve({'gzip': 1}), 1)"]
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 200Passed
fixture 30.20.2Passed
fixture 401Failed
fixture 101Failed

SHA-256 / 01c8f64cc047d7f3bc535163966c616e5bfd71c5bcde08bc4854317f5831b5c9

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(qualities):
    return qualities.get("identity",1)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve({}), 1)", "check('fixture 2', solve({'*': 0}), 0)", "check('fixture 3', solve({'identity': 0.2, '*': 0}), 0.2)", "check('fixture 4', solve({'gzip': 1}), 1)"]
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 210Failed
fixture 30.20.2Passed
fixture 411Passed
fixture 111Passed

SHA-256 / 0374575020aad1dd178e3d70a7084c449f6c03e1218408b1d9de750337955bcf

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(qualities):
    return qualities.get("identity", 0 if qualities.get("*") == 0 else 1)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve({}), 1)", "check('fixture 2', solve({'*': 0}), 0)", "check('fixture 3', solve({'identity': 0.2, '*': 0}), 0.2)", "check('fixture 4', solve({'gzip': 1}), 1)"]
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 200Passed
fixture 30.20.2Passed
fixture 411Passed
fixture 111Passed

SHA-256 / 8a61336bdc307e030878b47786c923d4178a1b5b6a4d5a5e61af2ebb94be7194

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

Case digest / 5427feac1bed0fdbac18e40a1303dd66b4c4949b78cd5e5c0fe202925d05f80e