{"abstract":"Language selection does not sort quality lexicographically.","category":"Content negotiation","checks":4,"contract":"Bounded offline decision model: language selection does not sort quality lexicographically. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.","evaluation_group":"xh-language-selection-does-not-sort-quality-lexicographically","failed_approach":"The attempted repair uses `min(qualities,key=lambda p:float(p[1]))[0] if qualities else None` and still violates a separate fixture.","family":"xh-language-selection-does-not-sort-quality-lexicographically","id":"FA-6896","implementations":{"attempt":{"sha256":"26f1a73fc3fc758293ce87ec8223fd0ecaa749464332211a58964045887e5330","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(qualities):\n    return min(qualities,key=lambda p:float(p[1]))[0] if qualities 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([('en', '0.9'), ('fr', '0.10')]), 'en')\", \"check('fixture 2', solve([('en', '1'), ('fr', '1.0')]), 'en')\", \"check('fixture 3', solve([]), None)\", \"check('fixture 4', solve([('fr', '0.5')]), 'fr')\"]\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":"bdc01d860e4c28da32489baa583303b8a320732b0651bb44de37274c138520e4","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(qualities):\n    return max(qualities,key=lambda p:p[1])[0] if qualities 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([('en', '0.9'), ('fr', '0.10')]), 'en')\", \"check('fixture 2', solve([('en', '1'), ('fr', '1.0')]), 'en')\", \"check('fixture 3', solve([]), None)\", \"check('fixture 4', solve([('fr', '0.5')]), 'fr')\"]\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":"01f6be5deff3bf0068942f74227b33fa7e8cf599d63bd547729a83fa9f3df55d","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(qualities):\n    return max(qualities,key=lambda p:float(p[1]))[0] if qualities 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([('en', '0.9'), ('fr', '0.10')]), 'en')\", \"check('fixture 2', solve([('en', '1'), ('fr', '1.0')]), 'en')\", \"check('fixture 3', solve([]), None)\", \"check('fixture 4', solve([('fr', '0.5')]), 'fr')\"]\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-language-selection-does-not-sort-quality-lexicographically","generated_at":"2026-09-29T14:38:06.372368+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"This deterministic content negotiation model isolates the language-selection-does-not-sort-quality-lexicographically policy at a network component boundary.","repair":"Apply the explicit language-selection-does-not-sort-quality-lexicographically contract, including the tested boundary and negative cases.","root_cause":"The faulty implementation uses `max(qualities,key=lambda p:p[1])[0] if qualities else None` for the language-selection-does-not-sort-quality-lexicographically decision.","sha256":"379578d5d2e45876d1a39e70820e6dd091d264afa29343bcc279462a91eaef89","title":"Language selection does not sort quality lexicographically · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":33.748,"exit_code":1,"observations":[{"actual":"en","check":"fixture 2","expected":"en","passed":true},{"actual":null,"check":"fixture 3","expected":null,"passed":true},{"actual":"fr","check":"fixture 4","expected":"fr","passed":true},{"actual":"fr","check":"fixture 1","expected":"en","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 2\", \"actual\": \"en\", \"expected\": \"en\", \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": \"fr\", \"expected\": \"fr\", \"passed\": true}, {\"check\": \"fixture 1\", \"actual\": \"fr\", \"expected\": \"en\", \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":134.46,"exit_code":1,"observations":[{"actual":"fr","check":"fixture 2","expected":"en","passed":false},{"actual":null,"check":"fixture 3","expected":null,"passed":true},{"actual":"fr","check":"fixture 4","expected":"fr","passed":true},{"actual":"en","check":"fixture 1","expected":"en","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 2\", \"actual\": \"fr\", \"expected\": \"en\", \"passed\": false}, {\"check\": \"fixture 3\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": \"fr\", \"expected\": \"fr\", \"passed\": true}, {\"check\": \"fixture 1\", \"actual\": \"en\", \"expected\": \"en\", \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":33.364,"exit_code":0,"observations":[{"actual":"en","check":"fixture 2","expected":"en","passed":true},{"actual":null,"check":"fixture 3","expected":null,"passed":true},{"actual":"fr","check":"fixture 4","expected":"fr","passed":true},{"actual":"en","check":"fixture 1","expected":"en","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 2\", \"actual\": \"en\", \"expected\": \"en\", \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": \"fr\", \"expected\": \"fr\", \"passed\": true}, {\"check\": \"fixture 1\", \"actual\": \"en\", \"expected\": \"en\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}