FA-6861 / Content negotiation / Open access
Identity encoding is implicit unless specifically excluded · case 01
Identity encoding is implicit unless specifically excluded.
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 2 | 0 | 0 | Passed |
| fixture 3 | 0.2 | 0.2 | Passed |
| fixture 4 | 0 | 1 | Failed |
| fixture 1 | 0 | 1 | Failed |
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 2 | 1 | 0 | Failed |
| fixture 3 | 0.2 | 0.2 | Passed |
| fixture 4 | 1 | 1 | Passed |
| fixture 1 | 1 | 1 | Passed |
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 2 | 0 | 0 | Passed |
| fixture 3 | 0.2 | 0.2 | Passed |
| fixture 4 | 1 | 1 | Passed |
| fixture 1 | 1 | 1 | Passed |
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