{"abstract":"Ruby fallback markup enters semantic text.","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.","contract_signature":"data","evaluation_group":"s3-accessibility-ruby-projection","failed_approach":"The local repair substitutes parts = [(fallback+base,'base')] but still mishandles the regression fixtures.","family":"s3-accessibility-ruby-projection-fallback-markup","id":"FA-54571","implementations":{"attempt":{"sha256":"8f6623bc886f4a3f899c5c866b3f16e5b40890938fc1dba39bfdf9a2a5f91c91","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 = [(fallback+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"},"broken":{"sha256":"1a2a027252188a5d66b0f6a9c22af265ee649ef653cb245e4b180e8fb48c38d5","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+fallback,'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-fallback-markup","generated_at":"2026-09-29T14:45:49.766267+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.","root_cause":"The fallback markup decision in the ruby projection adapter violates its declared contract.","sha256":"30d576045e0b1c6caa1b0652d7e164c7b0281e93d7f7d18f9fcf459beb1be6d6","title":"Ruby fallback markup enters semantic text · 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.044,"exit_code":1,"observations":[{"actual":["fallback字(ji)",[[0,9,"ja","base"],[9,13,"ja","annotation"]]],"check":"contract fixture 1","expected":["字(ji)",[[0,1,"ja","base"],[1,5,"ja","annotation"]]],"passed":false},{"actual":["ji",[[0,2,"ja","annotation"]]],"check":"contract fixture 2","expected":["ji",[[0,2,"ja","annotation"]]],"passed":true},{"actual":["fallback字",[[0,9,"ja","base"]]],"check":"contract fixture 3","expected":["字",[[0,1,"ja","base"]]],"passed":false},{"actual":["fallbacksame",[[0,12,"","base"]]],"check":"contract fixture 4","expected":["same",[[0,4,"","base"]]],"passed":false},{"actual":["fallbackAfallbackB",[[0,9,"en","base"],[9,18,"en","base"]]],"check":"contract fixture 5","expected":["AB",[[0,1,"en","base"],[1,2,"en","base"]]],"passed":false},{"actual":["fallback",[[0,8,"en","base"]]],"check":"contract fixture 6","expected":["",[]],"passed":false},{"actual":["fallbackA",[[0,9,"en","base"]]],"check":"contract fixture 7","expected":["A",[[0,1,"en","base"]]],"passed":false},{"actual":["",[]],"check":"contract fixture 8","expected":["",[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"contract fixture 1\", \"actual\": [\"fallback字(ji)\", [[0, 9, \"ja\", \"base\"], [9, 13, \"ja\", \"annotation\"]]], \"expected\": [\"字(ji)\", [[0, 1, \"ja\", \"base\"], [1, 5, \"ja\", \"annotation\"]]], \"passed\": false}, {\"check\": \"contract fixture 2\", \"actual\": [\"ji\", [[0, 2, \"ja\", \"annotation\"]]], \"expected\": [\"ji\", [[0, 2, \"ja\", \"annotation\"]]], \"passed\": true}, {\"check\": \"contract fixture 3\", \"actual\": [\"fallback字\", [[0, 9, \"ja\", \"base\"]]], \"expected\": [\"字\", [[0, 1, \"ja\", \"base\"]]], \"passed\": false}, {\"check\": \"contract fixture 4\", \"actual\": [\"fallbacksame\", [[0, 12, \"\", \"base\"]]], \"expected\": [\"same\", [[0, 4, \"\", \"base\"]]], \"passed\": false}, {\"check\": \"contract fixture 5\", \"actual\": [\"fallbackAfallbackB\", [[0, 9, \"en\", \"base\"], [9, 18, \"en\", \"base\"]]], \"expected\": [\"AB\", [[0, 1, \"en\", \"base\"], [1, 2, \"en\", \"base\"]]], \"passed\": false}, {\"check\": \"contract fixture 6\", \"actual\": [\"fallback\", [[0, 8, \"en\", \"base\"]]], \"expected\": [\"\", []], \"passed\": false}, {\"check\": \"contract fixture 7\", \"actual\": [\"fallbackA\", [[0, 9, \"en\", \"base\"]]], \"expected\": [\"A\", [[0, 1, \"en\", \"base\"]]], \"passed\": false}, {\"check\": \"contract fixture 8\", \"actual\": [\"\", []], \"expected\": [\"\", []], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.07,"exit_code":1,"observations":[{"actual":["字fallback(ji)",[[0,9,"ja","base"],[9,13,"ja","annotation"]]],"check":"contract fixture 1","expected":["字(ji)",[[0,1,"ja","base"],[1,5,"ja","annotation"]]],"passed":false},{"actual":["ji",[[0,2,"ja","annotation"]]],"check":"contract fixture 2","expected":["ji",[[0,2,"ja","annotation"]]],"passed":true},{"actual":["字fallback",[[0,9,"ja","base"]]],"check":"contract fixture 3","expected":["字",[[0,1,"ja","base"]]],"passed":false},{"actual":["samefallback",[[0,12,"","base"]]],"check":"contract fixture 4","expected":["same",[[0,4,"","base"]]],"passed":false},{"actual":["AfallbackBfallback",[[0,9,"en","base"],[9,18,"en","base"]]],"check":"contract fixture 5","expected":["AB",[[0,1,"en","base"],[1,2,"en","base"]]],"passed":false},{"actual":["fallback",[[0,8,"en","base"]]],"check":"contract fixture 6","expected":["",[]],"passed":false},{"actual":["Afallback",[[0,9,"en","base"]]],"check":"contract fixture 7","expected":["A",[[0,1,"en","base"]]],"passed":false},{"actual":["",[]],"check":"contract fixture 8","expected":["",[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"contract fixture 1\", \"actual\": [\"字fallback(ji)\", [[0, 9, \"ja\", \"base\"], [9, 13, \"ja\", \"annotation\"]]], \"expected\": [\"字(ji)\", [[0, 1, \"ja\", \"base\"], [1, 5, \"ja\", \"annotation\"]]], \"passed\": false}, {\"check\": \"contract fixture 2\", \"actual\": [\"ji\", [[0, 2, \"ja\", \"annotation\"]]], \"expected\": [\"ji\", [[0, 2, \"ja\", \"annotation\"]]], \"passed\": true}, {\"check\": \"contract fixture 3\", \"actual\": [\"字fallback\", [[0, 9, \"ja\", \"base\"]]], \"expected\": [\"字\", [[0, 1, \"ja\", \"base\"]]], \"passed\": false}, {\"check\": \"contract fixture 4\", \"actual\": [\"samefallback\", [[0, 12, \"\", \"base\"]]], \"expected\": [\"same\", [[0, 4, \"\", \"base\"]]], \"passed\": false}, {\"check\": \"contract fixture 5\", \"actual\": [\"AfallbackBfallback\", [[0, 9, \"en\", \"base\"], [9, 18, \"en\", \"base\"]]], \"expected\": [\"AB\", [[0, 1, \"en\", \"base\"], [1, 2, \"en\", \"base\"]]], \"passed\": false}, {\"check\": \"contract fixture 6\", \"actual\": [\"fallback\", [[0, 8, \"en\", \"base\"]]], \"expected\": [\"\", []], \"passed\": false}, {\"check\": \"contract fixture 7\", \"actual\": [\"Afallback\", [[0, 9, \"en\", \"base\"]]], \"expected\": [\"A\", [[0, 1, \"en\", \"base\"]]], \"passed\": false}, {\"check\": \"contract fixture 8\", \"actual\": [\"\", []], \"expected\": [\"\", []], \"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."}}