{"abstract":"Language lookup truncates rightmost subtags.","category":"Content negotiation","checks":4,"contract":"Bounded offline decision model: language lookup truncates rightmost subtags. Inputs are already validated protocol fields; the explicit fixtures define the supported policy, not a complete protocol implementation.","contract_signature":"language","evaluation_group":"xh-language-lookup-truncates-rightmost-subtags","failed_approach":"The attempted repair uses `language` and still violates a separate fixture.","family":"xh-language-lookup-truncates-rightmost-subtags","id":"FA-6891","implementations":{"attempt":{"sha256":"2c24b3bbfa78ac0dccfa7e47155f5afe2cedc29c855f124bc10ae43b2a667f72","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(language):\n    return language\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\n_fixtures = [\"check('fixture 1', solve('zh-Hant-TW'), 'zh-Hant')\", \"check('fixture 2', solve('en-US'), 'en')\", \"check('fixture 3', solve('en'), None)\", \"check('fixture 4', solve('sr-Latn-RS'), 'sr-Latn')\"]\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":"68102a042cc5aa399a5ee485deb105f66ea91288002371dfcafb319574004e67","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(language):\n    return language.split('-',1)[0] if '-' in language 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('zh-Hant-TW'), 'zh-Hant')\", \"check('fixture 2', solve('en-US'), 'en')\", \"check('fixture 3', solve('en'), None)\", \"check('fixture 4', solve('sr-Latn-RS'), 'sr-Latn')\"]\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-lookup-truncates-rightmost-subtags","generated_at":"2026-09-29T14:38:06.360126+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"This deterministic content negotiation model isolates the language-lookup-truncates-rightmost-subtags policy at a network component boundary.","root_cause":"The faulty implementation uses `language.split('-',1)[0] if '-' in language else None` for the language-lookup-truncates-rightmost-subtags decision.","sha256":"6a1ec9e5098c98047ce2b8e8f4a7f0ac5b06fe53f5afae9e2812127ef1ba1e09","title":"Language lookup truncates rightmost subtags · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":141.184,"exit_code":1,"observations":[{"actual":"en-US","check":"fixture 2","expected":"en","passed":false},{"actual":"en","check":"fixture 3","expected":null,"passed":false},{"actual":"sr-Latn-RS","check":"fixture 4","expected":"sr-Latn","passed":false},{"actual":"zh-Hant-TW","check":"fixture 1","expected":"zh-Hant","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 2\", \"actual\": \"en-US\", \"expected\": \"en\", \"passed\": false}, {\"check\": \"fixture 3\", \"actual\": \"en\", \"expected\": null, \"passed\": false}, {\"check\": \"fixture 4\", \"actual\": \"sr-Latn-RS\", \"expected\": \"sr-Latn\", \"passed\": false}, {\"check\": \"fixture 1\", \"actual\": \"zh-Hant-TW\", \"expected\": \"zh-Hant\", \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":35.739,"exit_code":1,"observations":[{"actual":"en","check":"fixture 2","expected":"en","passed":true},{"actual":null,"check":"fixture 3","expected":null,"passed":true},{"actual":"sr","check":"fixture 4","expected":"sr-Latn","passed":false},{"actual":"zh","check":"fixture 1","expected":"zh-Hant","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\": \"sr\", \"expected\": \"sr-Latn\", \"passed\": false}, {\"check\": \"fixture 1\", \"actual\": \"zh\", \"expected\": \"zh-Hant\", \"passed\": false}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}