{"abstract":"Ruby annotations are appended in base-only mode.","category":"Accessibility interaction semantics","checks":8,"contract":"Input [segments,mode] where segments [base,annotation,fallback,language,hidden_annotation]. mode is base,annotation,combined. In annotation mode use nonempty visible annotation, otherwise base. Combined adds parenthesized visible annotation only when nonempty and different from base; fallback is markup-only content and never exposed. Return [text,runs] with runs [start,end,language,source], omitting zero-length contributions. Each segment is concatenated without implicit spaces. Combined annotation run includes parentheses. Source is base or annotation. Preserve original strings and language, including empty language.","evaluation_group":"s3-accessibility-ruby-projection","failed_approach":"The local repair substitutes annotation and annotation != base but still mishandles the regression fixtures.","family":"s3-accessibility-ruby-projection-combined-only","id":"FA-54556","implementations":{"attempt":{"sha256":"d19617e5de174b5b34f607ddbf58df6f8d01d5da89b82090249c3b3eb69bf842","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(data):\n    segments,mode = data\n    text = ''\n    runs = []\n    for base,annotation,fallback,language,hidden in segments:\n        annotation = '' if hidden else annotation\n        parts = []\n        if mode == 'annotation' and annotation: parts = [(annotation,'annotation')]\n        else:\n            parts = [(base,'base')]\n            if annotation and annotation != base: parts.append(('('+annotation+')','annotation'))\n        for value,source in parts:\n            if not value: continue\n            start = len(text)\n            text += value\n            runs.append([start,len(text),language,source])\n    return [text,runs]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('contract fixture 1', solve([[['字'*N,'ji','fallback','ja',False]],'combined'],), ['字'*N+'(ji)',[[0,N,'ja','base'],[N,N+4,'ja','annotation']]])\ncheck('contract fixture 2', solve([[['字','ji','fallback','ja',False]],'annotation'],), ['ji',[[0,2,'ja','annotation']]])\ncheck('contract fixture 3', solve([[['字','ji','fallback','ja',True]],'annotation'],), ['字',[[0,1,'ja','base']]])\ncheck('contract fixture 4', solve([[['same','same','fallback','',False]],'combined'],), ['same',[[0,4,'','base']]])\ncheck('contract fixture 5', solve([[['A','','fallback','en',False],['B','bee','fallback','en',False]],'base'],), ['AB',[[0,1,'en','base'],[1,2,'en','base']]])\ncheck('contract fixture 6', solve([[['','','fallback','en',False]],'combined'],), ['',[]])\ncheck('contract fixture 7', solve([[['A','','fallback','en',False]],'annotation'],), ['A',[[0,1,'en','base']]])\ncheck('contract fixture 8', solve([[],'annotation'],), ['',[]])\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":"5eea07d66236f29dfbf8c054ed5a74452ca61c1ae742f5ea5183eb6de2c0ed89","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(data):\n    segments,mode = data\n    text = ''\n    runs = []\n    for base,annotation,fallback,language,hidden in segments:\n        annotation = '' if hidden else annotation\n        parts = []\n        if mode == 'annotation' and annotation: parts = [(annotation,'annotation')]\n        else:\n            parts = [(base,'base')]\n            if mode != 'annotation' and annotation and annotation != base: parts.append(('('+annotation+')','annotation'))\n        for value,source in parts:\n            if not value: continue\n            start = len(text)\n            text += value\n            runs.append([start,len(text),language,source])\n    return [text,runs]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('contract fixture 1', solve([[['字'*N,'ji','fallback','ja',False]],'combined'],), ['字'*N+'(ji)',[[0,N,'ja','base'],[N,N+4,'ja','annotation']]])\ncheck('contract fixture 2', solve([[['字','ji','fallback','ja',False]],'annotation'],), ['ji',[[0,2,'ja','annotation']]])\ncheck('contract fixture 3', solve([[['字','ji','fallback','ja',True]],'annotation'],), ['字',[[0,1,'ja','base']]])\ncheck('contract fixture 4', solve([[['same','same','fallback','',False]],'combined'],), ['same',[[0,4,'','base']]])\ncheck('contract fixture 5', solve([[['A','','fallback','en',False],['B','bee','fallback','en',False]],'base'],), ['AB',[[0,1,'en','base'],[1,2,'en','base']]])\ncheck('contract fixture 6', solve([[['','','fallback','en',False]],'combined'],), ['',[]])\ncheck('contract fixture 7', solve([[['A','','fallback','en',False]],'annotation'],), ['A',[[0,1,'en','base']]])\ncheck('contract fixture 8', solve([[],'annotation'],), ['',[]])\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":"eb81ebe6d091c6f59a4ebe679a3d7b873702f24bdc0e46661bd6b7f67a35b703","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(data):\n    segments,mode = data\n    text = ''\n    runs = []\n    for base,annotation,fallback,language,hidden in segments:\n        annotation = '' if hidden else annotation\n        parts = []\n        if mode == 'annotation' and annotation: parts = [(annotation,'annotation')]\n        else:\n            parts = [(base,'base')]\n            if mode == 'combined' and annotation and annotation != base: parts.append(('('+annotation+')','annotation'))\n        for value,source in parts:\n            if not value: continue\n            start = len(text)\n            text += value\n            runs.append([start,len(text),language,source])\n    return [text,runs]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('contract fixture 1', solve([[['字'*N,'ji','fallback','ja',False]],'combined'],), ['字'*N+'(ji)',[[0,N,'ja','base'],[N,N+4,'ja','annotation']]])\ncheck('contract fixture 2', solve([[['字','ji','fallback','ja',False]],'annotation'],), ['ji',[[0,2,'ja','annotation']]])\ncheck('contract fixture 3', solve([[['字','ji','fallback','ja',True]],'annotation'],), ['字',[[0,1,'ja','base']]])\ncheck('contract fixture 4', solve([[['same','same','fallback','',False]],'combined'],), ['same',[[0,4,'','base']]])\ncheck('contract fixture 5', solve([[['A','','fallback','en',False],['B','bee','fallback','en',False]],'base'],), ['AB',[[0,1,'en','base'],[1,2,'en','base']]])\ncheck('contract fixture 6', solve([[['','','fallback','en',False]],'combined'],), ['',[]])\ncheck('contract fixture 7', solve([[['A','','fallback','en',False]],'annotation'],), ['A',[[0,1,'en','base']]])\ncheck('contract fixture 8', solve([[],'annotation'],), ['',[]])\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":"Stipulated finite adapter contract, not a claim of platform accessibility or ARIA conformance. 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":"s3-accessibility-ruby-projection-combined-only","generated_at":"2026-09-29T14:45:49.517787+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Offline accessibility bridge model with explicit policy; useful for testing semantic API adapters independently of browser implementations.","repair":"Apply the exact contract at the combined only decision: mode == 'combined' and annotation and annotation != base","root_cause":"The combined only decision in the ruby projection adapter violates its declared contract.","sha256":"6ddeb1378b904239becd4e6a56f3ff42b5fe80e84605d09bbd7bcf754140338a","title":"Ruby annotations are appended in base-only mode · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.806,"exit_code":1,"observations":[{"actual":["字(ji)",[[0,1,"ja","base"],[1,5,"ja","annotation"]]],"check":"contract fixture 1","expected":["字(ji)",[[0,1,"ja","base"],[1,5,"ja","annotation"]]],"passed":true},{"actual":["ji",[[0,2,"ja","annotation"]]],"check":"contract fixture 2","expected":["ji",[[0,2,"ja","annotation"]]],"passed":true},{"actual":["字",[[0,1,"ja","base"]]],"check":"contract fixture 3","expected":["字",[[0,1,"ja","base"]]],"passed":true},{"actual":["same",[[0,4,"","base"]]],"check":"contract fixture 4","expected":["same",[[0,4,"","base"]]],"passed":true},{"actual":["AB(bee)",[[0,1,"en","base"],[1,2,"en","base"],[2,7,"en","annotation"]]],"check":"contract fixture 5","expected":["AB",[[0,1,"en","base"],[1,2,"en","base"]]],"passed":false},{"actual":["",[]],"check":"contract fixture 6","expected":["",[]],"passed":true},{"actual":["A",[[0,1,"en","base"]]],"check":"contract fixture 7","expected":["A",[[0,1,"en","base"]]],"passed":true},{"actual":["",[]],"check":"contract fixture 8","expected":["",[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"contract fixture 1\", \"actual\": [\"字(ji)\", [[0, 1, \"ja\", \"base\"], [1, 5, \"ja\", \"annotation\"]]], \"expected\": [\"字(ji)\", [[0, 1, \"ja\", \"base\"], [1, 5, \"ja\", \"annotation\"]]], \"passed\": true}, {\"check\": \"contract fixture 2\", \"actual\": [\"ji\", [[0, 2, \"ja\", \"annotation\"]]], \"expected\": [\"ji\", [[0, 2, \"ja\", \"annotation\"]]], \"passed\": true}, {\"check\": \"contract fixture 3\", \"actual\": [\"字\", [[0, 1, \"ja\", \"base\"]]], \"expected\": [\"字\", [[0, 1, \"ja\", \"base\"]]], \"passed\": true}, {\"check\": \"contract fixture 4\", \"actual\": [\"same\", [[0, 4, \"\", \"base\"]]], \"expected\": [\"same\", [[0, 4, \"\", \"base\"]]], \"passed\": true}, {\"check\": \"contract fixture 5\", \"actual\": [\"AB(bee)\", [[0, 1, \"en\", \"base\"], [1, 2, \"en\", \"base\"], [2, 7, \"en\", \"annotation\"]]], \"expected\": [\"AB\", [[0, 1, \"en\", \"base\"], [1, 2, \"en\", \"base\"]]], \"passed\": false}, {\"check\": \"contract fixture 6\", \"actual\": [\"\", []], \"expected\": [\"\", []], \"passed\": true}, {\"check\": \"contract fixture 7\", \"actual\": [\"A\", [[0, 1, \"en\", \"base\"]]], \"expected\": [\"A\", [[0, 1, \"en\", \"base\"]]], \"passed\": true}, {\"check\": \"contract fixture 8\", \"actual\": [\"\", []], \"expected\": [\"\", []], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.267,"exit_code":1,"observations":[{"actual":["字(ji)",[[0,1,"ja","base"],[1,5,"ja","annotation"]]],"check":"contract fixture 1","expected":["字(ji)",[[0,1,"ja","base"],[1,5,"ja","annotation"]]],"passed":true},{"actual":["ji",[[0,2,"ja","annotation"]]],"check":"contract fixture 2","expected":["ji",[[0,2,"ja","annotation"]]],"passed":true},{"actual":["字",[[0,1,"ja","base"]]],"check":"contract fixture 3","expected":["字",[[0,1,"ja","base"]]],"passed":true},{"actual":["same",[[0,4,"","base"]]],"check":"contract fixture 4","expected":["same",[[0,4,"","base"]]],"passed":true},{"actual":["AB(bee)",[[0,1,"en","base"],[1,2,"en","base"],[2,7,"en","annotation"]]],"check":"contract fixture 5","expected":["AB",[[0,1,"en","base"],[1,2,"en","base"]]],"passed":false},{"actual":["",[]],"check":"contract fixture 6","expected":["",[]],"passed":true},{"actual":["A",[[0,1,"en","base"]]],"check":"contract fixture 7","expected":["A",[[0,1,"en","base"]]],"passed":true},{"actual":["",[]],"check":"contract fixture 8","expected":["",[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"contract fixture 1\", \"actual\": [\"字(ji)\", [[0, 1, \"ja\", \"base\"], [1, 5, \"ja\", \"annotation\"]]], \"expected\": [\"字(ji)\", [[0, 1, \"ja\", \"base\"], [1, 5, \"ja\", \"annotation\"]]], \"passed\": true}, {\"check\": \"contract fixture 2\", \"actual\": [\"ji\", [[0, 2, \"ja\", \"annotation\"]]], \"expected\": [\"ji\", [[0, 2, \"ja\", \"annotation\"]]], \"passed\": true}, {\"check\": \"contract fixture 3\", \"actual\": [\"字\", [[0, 1, \"ja\", \"base\"]]], \"expected\": [\"字\", [[0, 1, \"ja\", \"base\"]]], \"passed\": true}, {\"check\": \"contract fixture 4\", \"actual\": [\"same\", [[0, 4, \"\", \"base\"]]], \"expected\": [\"same\", [[0, 4, \"\", \"base\"]]], \"passed\": true}, {\"check\": \"contract fixture 5\", \"actual\": [\"AB(bee)\", [[0, 1, \"en\", \"base\"], [1, 2, \"en\", \"base\"], [2, 7, \"en\", \"annotation\"]]], \"expected\": [\"AB\", [[0, 1, \"en\", \"base\"], [1, 2, \"en\", \"base\"]]], \"passed\": false}, {\"check\": \"contract fixture 6\", \"actual\": [\"\", []], \"expected\": [\"\", []], \"passed\": true}, {\"check\": \"contract fixture 7\", \"actual\": [\"A\", [[0, 1, \"en\", \"base\"]]], \"expected\": [\"A\", [[0, 1, \"en\", \"base\"]]], \"passed\": true}, {\"check\": \"contract fixture 8\", \"actual\": [\"\", []], \"expected\": [\"\", []], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.049,"exit_code":0,"observations":[{"actual":["字(ji)",[[0,1,"ja","base"],[1,5,"ja","annotation"]]],"check":"contract fixture 1","expected":["字(ji)",[[0,1,"ja","base"],[1,5,"ja","annotation"]]],"passed":true},{"actual":["ji",[[0,2,"ja","annotation"]]],"check":"contract fixture 2","expected":["ji",[[0,2,"ja","annotation"]]],"passed":true},{"actual":["字",[[0,1,"ja","base"]]],"check":"contract fixture 3","expected":["字",[[0,1,"ja","base"]]],"passed":true},{"actual":["same",[[0,4,"","base"]]],"check":"contract fixture 4","expected":["same",[[0,4,"","base"]]],"passed":true},{"actual":["AB",[[0,1,"en","base"],[1,2,"en","base"]]],"check":"contract fixture 5","expected":["AB",[[0,1,"en","base"],[1,2,"en","base"]]],"passed":true},{"actual":["",[]],"check":"contract fixture 6","expected":["",[]],"passed":true},{"actual":["A",[[0,1,"en","base"]]],"check":"contract fixture 7","expected":["A",[[0,1,"en","base"]]],"passed":true},{"actual":["",[]],"check":"contract fixture 8","expected":["",[]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"contract fixture 1\", \"actual\": [\"字(ji)\", [[0, 1, \"ja\", \"base\"], [1, 5, \"ja\", \"annotation\"]]], \"expected\": [\"字(ji)\", [[0, 1, \"ja\", \"base\"], [1, 5, \"ja\", \"annotation\"]]], \"passed\": true}, {\"check\": \"contract fixture 2\", \"actual\": [\"ji\", [[0, 2, \"ja\", \"annotation\"]]], \"expected\": [\"ji\", [[0, 2, \"ja\", \"annotation\"]]], \"passed\": true}, {\"check\": \"contract fixture 3\", \"actual\": [\"字\", [[0, 1, \"ja\", \"base\"]]], \"expected\": [\"字\", [[0, 1, \"ja\", \"base\"]]], \"passed\": true}, {\"check\": \"contract fixture 4\", \"actual\": [\"same\", [[0, 4, \"\", \"base\"]]], \"expected\": [\"same\", [[0, 4, \"\", \"base\"]]], \"passed\": true}, {\"check\": \"contract fixture 5\", \"actual\": [\"AB\", [[0, 1, \"en\", \"base\"], [1, 2, \"en\", \"base\"]]], \"expected\": [\"AB\", [[0, 1, \"en\", \"base\"], [1, 2, \"en\", \"base\"]]], \"passed\": true}, {\"check\": \"contract fixture 6\", \"actual\": [\"\", []], \"expected\": [\"\", []], \"passed\": true}, {\"check\": \"contract fixture 7\", \"actual\": [\"A\", [[0, 1, \"en\", \"base\"]]], \"expected\": [\"A\", [[0, 1, \"en\", \"base\"]]], \"passed\": true}, {\"check\": \"contract fixture 8\", \"actual\": [\"\", []], \"expected\": [\"\", []], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}