{"abstract":"Equal quality retains server preference order.","category":"Content negotiation","checks":4,"contract":"Bounded offline decision model: equal quality retains server preference order. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.","evaluation_group":"xh-equal-quality-retains-server-preference-order","failed_approach":"The attempted repair uses `sorted(candidates,key=lambda p:p[1])[-1][0] if candidates else None` and still violates a separate fixture.","family":"xh-equal-quality-retains-server-preference-order","id":"FA-6841","implementations":{"attempt":{"sha256":"6c321142a52acbe5b23d79bbff1b256adb2bf8429dc102758c996eda2bb55143","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport ipaddress\nimport re\nfrom urllib.parse import urlsplit, urljoin\nN = 1\nobservations = []\ndef solve(candidates):\n    return sorted(candidates,key=lambda p:p[1])[-1][0] if candidates else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\n_fixtures = [\"check('fixture 1', solve([('a', 1), ('z', 1)]), 'a')\", \"check('fixture 2', solve([('z', 0.2), ('a', 0.8)]), 'a')\", \"check('fixture 3', solve([]), None)\", \"check('fixture 4', solve([('x', 0)]), 'x')\"]\nfor _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:\n    exec(_line)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"0a31b306e69f21000e26f8ffe0b57fb7cf4eaab5e30372da48ef964689d1a30d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport ipaddress\nimport re\nfrom urllib.parse import urlsplit, urljoin\nN = 1\nobservations = []\ndef solve(candidates):\n    return max(candidates)[0] if candidates else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\n_fixtures = [\"check('fixture 1', solve([('a', 1), ('z', 1)]), 'a')\", \"check('fixture 2', solve([('z', 0.2), ('a', 0.8)]), 'a')\", \"check('fixture 3', solve([]), None)\", \"check('fixture 4', solve([('x', 0)]), 'x')\"]\nfor _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:\n    exec(_line)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"031d46ba905cb82596ebc73737ec27e214f8ee639a092f5270f1e688f26fcc44","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport ipaddress\nimport re\nfrom urllib.parse import urlsplit, urljoin\nN = 1\nobservations = []\ndef solve(candidates):\n    return max(candidates,key=lambda p:p[1])[0] if candidates else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\n_fixtures = [\"check('fixture 1', solve([('a', 1), ('z', 1)]), 'a')\", \"check('fixture 2', solve([('z', 0.2), ('a', 0.8)]), 'a')\", \"check('fixture 3', solve([]), None)\", \"check('fixture 4', solve([('x', 0)]), 'x')\"]\nfor _line in _fixtures[N % len(_fixtures):] + _fixtures[:N % len(_fixtures)]:\n    exec(_line)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"xh-equal-quality-retains-server-preference-order","generated_at":"2026-09-29T14:38:05.631176+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"This deterministic content negotiation model isolates the equal-quality-retains-server-preference-order policy at a network component boundary.","repair":"Apply the explicit equal-quality-retains-server-preference-order contract, including the tested boundary and negative cases.","root_cause":"The faulty implementation uses `max(candidates)[0] if candidates else None` for the equal-quality-retains-server-preference-order decision.","sha256":"cf541c983ad8e32b21b0a144d860de327e34ee1f7f035cee680a009c9065afc6","title":"Equal quality retains server preference order · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":37.802,"exit_code":1,"observations":[{"actual":"a","check":"fixture 2","expected":"a","passed":true},{"actual":null,"check":"fixture 3","expected":null,"passed":true},{"actual":"x","check":"fixture 4","expected":"x","passed":true},{"actual":"z","check":"fixture 1","expected":"a","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 2\", \"actual\": \"a\", \"expected\": \"a\", \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": \"x\", \"expected\": \"x\", \"passed\": true}, {\"check\": \"fixture 1\", \"actual\": \"z\", \"expected\": \"a\", \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":36.649,"exit_code":1,"observations":[{"actual":"z","check":"fixture 2","expected":"a","passed":false},{"actual":null,"check":"fixture 3","expected":null,"passed":true},{"actual":"x","check":"fixture 4","expected":"x","passed":true},{"actual":"z","check":"fixture 1","expected":"a","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 2\", \"actual\": \"z\", \"expected\": \"a\", \"passed\": false}, {\"check\": \"fixture 3\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": \"x\", \"expected\": \"x\", \"passed\": true}, {\"check\": \"fixture 1\", \"actual\": \"z\", \"expected\": \"a\", \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.324,"exit_code":0,"observations":[{"actual":"a","check":"fixture 2","expected":"a","passed":true},{"actual":null,"check":"fixture 3","expected":null,"passed":true},{"actual":"x","check":"fixture 4","expected":"x","passed":true},{"actual":"a","check":"fixture 1","expected":"a","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 2\", \"actual\": \"a\", \"expected\": \"a\", \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": \"x\", \"expected\": \"x\", \"passed\": true}, {\"check\": \"fixture 1\", \"actual\": \"a\", \"expected\": \"a\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}