FAILURE MAP
← Case archive

FA-6936 / Content negotiation / Open access

Negotiation failure is distinct from empty representation · case 01

Negotiation failure is distinct from empty representation.

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

ROOT CAUSE

The faulty implementation uses `'406' if not allowed else 'ok'` for the negotiation-failure-is-distinct-from-empty-representation decision.

VERIFIED REPAIR

Apply the explicit negotiation-failure-is-distinct-from-empty-representation contract, including the tested boundary and negative cases.

Unsuccessful approach: The attempted repair uses `'ok'` and still violates a separate fixture.

Case contract

Bounded offline decision model: negotiation failure is distinct from empty representation. 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 negotiation-failure-is-distinct-from-empty-representation 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(available, allowed):
    return '406' if not allowed else 'ok'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['a'], []), '406')", "check('fixture 2', solve([], []), 'ok')", "check('fixture 3', solve(['a'], ['a']), 'ok')", "check('fixture 4', solve([], ['a']), 'ok')"]
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 2406okFailed
fixture 3okokPassed
fixture 4okokPassed
fixture 1406406Passed

SHA-256 / 3baaf943380aaf474d479a290010f229b14f9d1aca1db1877408f70d3c7cabdd

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(available, allowed):
    return 'ok'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['a'], []), '406')", "check('fixture 2', solve([], []), 'ok')", "check('fixture 3', solve(['a'], ['a']), 'ok')", "check('fixture 4', solve([], ['a']), 'ok')"]
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 2okokPassed
fixture 3okokPassed
fixture 4okokPassed
fixture 1ok406Failed

SHA-256 / 33f8d3100cd226834fe79843e1550d45deb508d0a7f85ed5e4fd8ce0fc4af6f9

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(available, allowed):
    return '406' if available and not allowed else 'ok'
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve(['a'], []), '406')", "check('fixture 2', solve([], []), 'ok')", "check('fixture 3', solve(['a'], ['a']), 'ok')", "check('fixture 4', solve([], ['a']), 'ok')"]
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 2okokPassed
fixture 3okokPassed
fixture 4okokPassed
fixture 1406406Passed

SHA-256 / eb839c0eea4f37192c2f28c3137b6b8fa35b99c527928b713f76e28c921e3d9c

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

Case digest / 27889ca8e39b7e97b0500eb2506335ddab20fbd70e9680a0e736989928a753ce