FA-6836 / Content negotiation / Open access
Zero quality excludes media candidates · case 01
Zero quality excludes media candidates.
ROOT CAUSE
The faulty implementation uses `[name for name,q in candidates]` for the zero-quality-excludes-media-candidates decision.
VERIFIED REPAIR
Apply the explicit zero-quality-excludes-media-candidates contract, including the tested boundary and negative cases.
Unsuccessful approach: The attempted repair uses `[name for name,q in candidates if q >= 0]` and still violates a separate fixture.
Case contract
Bounded offline decision model: zero quality excludes media candidates. 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 zero-quality-excludes-media-candidates 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(candidates):
return [name for name,q in candidates]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([('a', 0), ('b', 1)]), ['b'])", "check('fixture 2', solve([]), [])", "check('fixture 3', solve([('a', 0.1)]), ['a'])", "check('fixture 4', solve([('a', 0)]), [])"]
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 | [] | [] | Passed |
| fixture 3 | ['a'] | ['a'] | Passed |
| fixture 4 | ['a'] | [] | Failed |
| fixture 1 | ['a', 'b'] | ['b'] | Failed |
SHA-256 / 725ae18ec510abe05326ef7c1e235b020799e6f6e7f69239e5ec1e7f1ecdd44b
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(candidates):
return [name for name,q in candidates if q >= 0]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([('a', 0), ('b', 1)]), ['b'])", "check('fixture 2', solve([]), [])", "check('fixture 3', solve([('a', 0.1)]), ['a'])", "check('fixture 4', solve([('a', 0)]), [])"]
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 | [] | [] | Passed |
| fixture 3 | ['a'] | ['a'] | Passed |
| fixture 4 | ['a'] | [] | Failed |
| fixture 1 | ['a', 'b'] | ['b'] | Failed |
SHA-256 / 0247298dbe8a3c87715ddc778288293219fb4310b5e701969182d01c5c1e5f34
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(candidates):
return [name for name,q in candidates if q > 0]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
_fixtures = ["check('fixture 1', solve([('a', 0), ('b', 1)]), ['b'])", "check('fixture 2', solve([]), [])", "check('fixture 3', solve([('a', 0.1)]), ['a'])", "check('fixture 4', solve([('a', 0)]), [])"]
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 | [] | [] | Passed |
| fixture 3 | ['a'] | ['a'] | Passed |
| fixture 4 | [] | [] | Passed |
| fixture 1 | ['b'] | ['b'] | Passed |
SHA-256 / 0222649a81019548c14f2487494c7c0ee3e31dd7f18b88d1bc185747d23f32c5
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.620491+00:00.
Case digest / 5829de022e856f193f95c1234d426541d2e9178e829b0b0e646e34e62661e05d