{"abstract":"Contextual translations collapse identical source words.","category":"Localization message semantics","checks":6,"contract":"Look up the exact (context, source) tuple; if absent return source unchanged. Never use a different context, including the empty context.","evaluation_group":"model-53510303d2ea472d","failed_approach":"Falling back to an arbitrary other context leaks a noun translation into a missing verb entry.","family":"z-localization-context-key","id":"FA-11761","implementations":{"attempt":{"sha256":"d1c72837d1ebc1b5dded9e8640b6935e11d804c6555d4a11d921ec90b28814cd","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(catalog, context, source):\n    return catalog.get((context,source), next((v for (c,s),v in catalog.items() if s == source), source))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('verb context', solve({('noun','Open'):'noun',('verb','Open'):'verb'},'verb','Open'), 'verb')\ncheck('missing context', solve({('noun','Open'):'noun'},'verb','Open'), 'Open')\ncheck('empty distinct', solve({('','Open'):'generic'},'verb','Open'), 'Open')\ncheck('noun', solve({('noun','Open'):'noun'},'noun','Open'), 'noun')\ncheck('missing source', solve({},'verb','Item'+str(N)), 'Item'+str(N))\ncheck('dynamic key', solve({('ctx','X'+str(N)):'translated'},'ctx','X'+str(N)), 'translated')\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":"4ce79b7c11599b0ceb064d75d316efa5b8bddef98fed1488b6e065135f70209f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(catalog, context, source):\n    return next((v for (c,s),v in catalog.items() if s == source), source)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('verb context', solve({('noun','Open'):'noun',('verb','Open'):'verb'},'verb','Open'), 'verb')\ncheck('missing context', solve({('noun','Open'):'noun'},'verb','Open'), 'Open')\ncheck('empty distinct', solve({('','Open'):'generic'},'verb','Open'), 'Open')\ncheck('noun', solve({('noun','Open'):'noun'},'noun','Open'), 'noun')\ncheck('missing source', solve({},'verb','Item'+str(N)), 'Item'+str(N))\ncheck('dynamic key', solve({('ctx','X'+str(N)):'translated'},'ctx','X'+str(N)), 'translated')\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":"03bb218293d9a9be571aa3b956c3ece93c2d3e780b4211f081068d8e9e3c6885","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(catalog, context, source):\n    return catalog.get((context,source), source)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('verb context', solve({('noun','Open'):'noun',('verb','Open'):'verb'},'verb','Open'), 'verb')\ncheck('missing context', solve({('noun','Open'):'noun'},'verb','Open'), 'Open')\ncheck('empty distinct', solve({('','Open'):'generic'},'verb','Open'), 'Open')\ncheck('noun', solve({('noun','Open'):'noun'},'noun','Open'), 'noun')\ncheck('missing source', solve({},'verb','Item'+str(N)), 'Item'+str(N))\ncheck('dynamic key', solve({('ctx','X'+str(N)):'translated'},'ctx','X'+str(N)), 'translated')\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-context-key","generated_at":"2026-09-29T14:38:50.769643+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.","repair":"Look up the exact (context, source) tuple; if absent return source unchanged. Never use a different context, including the empty context.","root_cause":"The lookup discards the grammatical context from the catalog key.","sha256":"79292813c0d455fa9829c0dffd56b8234f173007af8c960f786e200dbb506955","title":"Contextual translations collapse identical source words · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":38.024,"exit_code":1,"observations":[{"actual":"verb","check":"verb context","expected":"verb","passed":true},{"actual":"noun","check":"missing context","expected":"Open","passed":false},{"actual":"generic","check":"empty distinct","expected":"Open","passed":false},{"actual":"noun","check":"noun","expected":"noun","passed":true},{"actual":"Item1","check":"missing source","expected":"Item1","passed":true},{"actual":"translated","check":"dynamic key","expected":"translated","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"verb context\", \"actual\": \"verb\", \"expected\": \"verb\", \"passed\": true}, {\"check\": \"missing context\", \"actual\": \"noun\", \"expected\": \"Open\", \"passed\": false}, {\"check\": \"empty distinct\", \"actual\": \"generic\", \"expected\": \"Open\", \"passed\": false}, {\"check\": \"noun\", \"actual\": \"noun\", \"expected\": \"noun\", \"passed\": true}, {\"check\": \"missing source\", \"actual\": \"Item1\", \"expected\": \"Item1\", \"passed\": true}, {\"check\": \"dynamic key\", \"actual\": \"translated\", \"expected\": \"translated\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.787,"exit_code":1,"observations":[{"actual":"noun","check":"verb context","expected":"verb","passed":false},{"actual":"noun","check":"missing context","expected":"Open","passed":false},{"actual":"generic","check":"empty distinct","expected":"Open","passed":false},{"actual":"noun","check":"noun","expected":"noun","passed":true},{"actual":"Item1","check":"missing source","expected":"Item1","passed":true},{"actual":"translated","check":"dynamic key","expected":"translated","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"verb context\", \"actual\": \"noun\", \"expected\": \"verb\", \"passed\": false}, {\"check\": \"missing context\", \"actual\": \"noun\", \"expected\": \"Open\", \"passed\": false}, {\"check\": \"empty distinct\", \"actual\": \"generic\", \"expected\": \"Open\", \"passed\": false}, {\"check\": \"noun\", \"actual\": \"noun\", \"expected\": \"noun\", \"passed\": true}, {\"check\": \"missing source\", \"actual\": \"Item1\", \"expected\": \"Item1\", \"passed\": true}, {\"check\": \"dynamic key\", \"actual\": \"translated\", \"expected\": \"translated\", \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":37.604,"exit_code":0,"observations":[{"actual":"verb","check":"verb context","expected":"verb","passed":true},{"actual":"Open","check":"missing context","expected":"Open","passed":true},{"actual":"Open","check":"empty distinct","expected":"Open","passed":true},{"actual":"noun","check":"noun","expected":"noun","passed":true},{"actual":"Item1","check":"missing source","expected":"Item1","passed":true},{"actual":"translated","check":"dynamic key","expected":"translated","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"verb context\", \"actual\": \"verb\", \"expected\": \"verb\", \"passed\": true}, {\"check\": \"missing context\", \"actual\": \"Open\", \"expected\": \"Open\", \"passed\": true}, {\"check\": \"empty distinct\", \"actual\": \"Open\", \"expected\": \"Open\", \"passed\": true}, {\"check\": \"noun\", \"actual\": \"noun\", \"expected\": \"noun\", \"passed\": true}, {\"check\": \"missing source\", \"actual\": \"Item1\", \"expected\": \"Item1\", \"passed\": true}, {\"check\": \"dynamic key\", \"actual\": \"translated\", \"expected\": \"translated\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}