{"abstract":"Locale negotiation ignores preference weights or explicit exclusions.","category":"Localization message semantics","checks":7,"contract":"Given unique exact toy locale preferences (tag, integer quality 0..1000), choose the supported tag with largest positive quality; ties preserve preference order. Return none if no positive supported preference exists. No wildcard or language-parent expansion is modeled.","contract_signature":"preferences, supported","evaluation_group":"model-35ee4d9bf43c7046","failed_approach":"Sorting preferences by quality but accepting zero-weight entries chooses explicitly excluded languages.","family":"z-localization-preference-quality","id":"FA-11786","implementations":{"attempt":{"sha256":"4f3f588ccffbad9b5fc59d5e251405b6eb5998a1c6c1f130e24ba0af3eb4b5ca","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(preferences, supported):\n    return next((tag for tag,q in sorted(preferences,key=lambda x:-x[1]) if tag in supported), 'none')\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('quality ordering', solve([('fr',N),('de',1000)],['fr','de']), 'de')\ncheck('excluded only', solve([('fr',0)],['fr']), 'none')\ncheck('tie stable', solve([('fr',N),('de',N)],['de','fr']), 'fr')\ncheck('unsupported high', solve([('fr',1000),('de',N)],['de']), 'de')\ncheck('empty preferences', solve([],['fr']), 'none')\ncheck('zero before positive', solve([('fr',0),('de',N)],['fr','de']), 'de')\ncheck('exact tags only', solve([('fr-CA',N)],['fr']), 'none')\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":"bad1b9f38b5fda8908bf860c4255fc8249d4d335bf42134baec106b49a9dafb9","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(preferences, supported):\n    return next((tag for tag,q in preferences if tag in supported), 'none')\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('quality ordering', solve([('fr',N),('de',1000)],['fr','de']), 'de')\ncheck('excluded only', solve([('fr',0)],['fr']), 'none')\ncheck('tie stable', solve([('fr',N),('de',N)],['de','fr']), 'fr')\ncheck('unsupported high', solve([('fr',1000),('de',N)],['de']), 'de')\ncheck('empty preferences', solve([],['fr']), 'none')\ncheck('zero before positive', solve([('fr',0),('de',N)],['fr','de']), 'de')\ncheck('exact tags only', solve([('fr-CA',N)],['fr']), 'none')\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":"Only the explicitly specified miniature locale/message rules are modeled. 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":"z-localization-preference-quality","generated_at":"2026-09-29T14:38:51.054752+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"This offline controlled message model isolates a localization decision; it does not implement a complete message-format or locale standard.","root_cause":"The first supported language is selected without comparing preference weights.","sha256":"9e9e20ab79118f325097177810090b132b0abc76b33997185773e6c51e5b5101","title":"Locale negotiation ignores preference weights or explicit exclusions · 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":41.332,"exit_code":1,"observations":[{"actual":"de","check":"quality ordering","expected":"de","passed":true},{"actual":"fr","check":"excluded only","expected":"none","passed":false},{"actual":"fr","check":"tie stable","expected":"fr","passed":true},{"actual":"de","check":"unsupported high","expected":"de","passed":true},{"actual":"none","check":"empty preferences","expected":"none","passed":true},{"actual":"de","check":"zero before positive","expected":"de","passed":true},{"actual":"none","check":"exact tags only","expected":"none","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"quality ordering\", \"actual\": \"de\", \"expected\": \"de\", \"passed\": true}, {\"check\": \"excluded only\", \"actual\": \"fr\", \"expected\": \"none\", \"passed\": false}, {\"check\": \"tie stable\", \"actual\": \"fr\", \"expected\": \"fr\", \"passed\": true}, {\"check\": \"unsupported high\", \"actual\": \"de\", \"expected\": \"de\", \"passed\": true}, {\"check\": \"empty preferences\", \"actual\": \"none\", \"expected\": \"none\", \"passed\": true}, {\"check\": \"zero before positive\", \"actual\": \"de\", \"expected\": \"de\", \"passed\": true}, {\"check\": \"exact tags only\", \"actual\": \"none\", \"expected\": \"none\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.821,"exit_code":1,"observations":[{"actual":"fr","check":"quality ordering","expected":"de","passed":false},{"actual":"fr","check":"excluded only","expected":"none","passed":false},{"actual":"fr","check":"tie stable","expected":"fr","passed":true},{"actual":"de","check":"unsupported high","expected":"de","passed":true},{"actual":"none","check":"empty preferences","expected":"none","passed":true},{"actual":"fr","check":"zero before positive","expected":"de","passed":false},{"actual":"none","check":"exact tags only","expected":"none","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"quality ordering\", \"actual\": \"fr\", \"expected\": \"de\", \"passed\": false}, {\"check\": \"excluded only\", \"actual\": \"fr\", \"expected\": \"none\", \"passed\": false}, {\"check\": \"tie stable\", \"actual\": \"fr\", \"expected\": \"fr\", \"passed\": true}, {\"check\": \"unsupported high\", \"actual\": \"de\", \"expected\": \"de\", \"passed\": true}, {\"check\": \"empty preferences\", \"actual\": \"none\", \"expected\": \"none\", \"passed\": true}, {\"check\": \"zero before positive\", \"actual\": \"fr\", \"expected\": \"de\", \"passed\": false}, {\"check\": \"exact tags only\", \"actual\": \"none\", \"expected\": \"none\", \"passed\": true}], \"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."}}