{"abstract":"Units are separated from their numbers.","category":"Typography line breaking","checks":8,"contract":"Input [words, width]. A single-letter preposition/conjunction (a i o u v z k s w, any case) is bound to the following word, chaining; a number (digits with optional . or , decimal) is bound to a following unit (kg km cm mm % pt px). Bound groups are unbreakable; greedy fill of groups with unit spaces; an overwide group is set alone. Return lines.","evaluation_group":"w2-typography-line-breaking-nonbreaking-bindings","failed_approach":"Binding any word before a unit or after any number over-binds.","family":"w2-typography-line-breaking-nonbreaking-bindings-unit-binding-direction","id":"FA-80276","implementations":{"attempt":{"sha256":"cff6dc2816601e2909bc4934d8b9117158907ff5c77cda3142287d7ce9e99bfa","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    words, width = x\n    SINGLE = {'a', 'i', 'o', 'u', 'v', 'z', 'k', 's', 'w'}\n    UNITS = {'kg', 'km', 'cm', 'mm', '%', 'pt', 'px'}\n    groups = []\n    k = 0\n    while k < len(words):\n        grp = [words[k]]\n        while True:\n            last = grp[-1]\n            nxt = k + len(grp)\n            if nxt >= len(words):\n                break\n            number = last.replace('.', '').replace(',', '').isdigit()\n            if last.lower() in SINGLE or (number or words[nxt] in UNITS):\n                grp.append(words[nxt])\n            else:\n                break\n        groups.append(' '.join(grp))\n        k += len(grp)\n    lines, cur = [], ''\n    for g in groups:\n        cand = g if not cur else cur + ' ' + g\n        if len(cand) <= width or not cur:\n            cur = cand\n        else:\n            lines.append(cur)\n            cur = g\n    if cur:\n        lines.append(cur)\n    return lines\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('decimal comma with unit', [['sazba', '1,5', 'cm', 'text'], 9], ['sazba', '1,5 cm', 'text']), ('regression: unit binding direction', [['domě', 'pt', 'a', 'a', 'z', 'sazba', 'v', 'domě', 'cm', 'a', '10', 'km'], 15], ['domě pt', 'a a z sazba', 'v domě cm', 'a 10 km']), ('partial-repair probe', [['i', 'i', '2.5', 'domě', 'V', 'o', 'km', 'V'], 11], ['i i 2.5', 'domě V o km', 'V']), ('regression: unit binding direction', [['1,5', 'kg', 's', 'sazba', '2.5', 'km', '10', 'pt', 'cm'], 6], ['1,5 kg', 's sazba', '2.5 km', '10 pt', 'cm']), ('sentence-initial V binds', [['V', 'Praze', 'text', 'sazba'], 8], ['V Praze', 'text', 'sazba']), ('chained singles', [['text', 'v', 'a', 'k', 'domě'], 10], ['text', 'v a k domě']), ('control layout', [['10', 'V', 'o', 'i', 'v', 'a'], 12], ['10 V o i v a']), ('control layout', [['o', 'k', 'řádek', 'V'], 9], ['o k řádek', 'V'])], [('regression: unit binding direction', [['domě', 'pt', 'a', 'a', 'z', 'sazba', 'v', 'domě', 'cm', 'a', '10', 'km'], 15], ['domě pt', 'a a z sazba', 'v domě cm', 'a 10 km']), ('regression: unit binding direction', [['o', 'km', 'pt', '10', 'kg', 'Praze', 'text', 'k', 'sazba'], 7], ['o km pt', '10 kg', 'Praze', 'text', 'k sazba']), ('partial-repair probe', [['V', '10', '2.5', 'v', 'o', 'Praze', 'text', '2.5'], 9], ['V 10 2.5', 'v o Praze', 'text 2.5']), ('partial-repair probe', [['V', 'o', 'km', 'pt', 'k', 'a', 's', '1,5', 'domě', '1,5'], 13], ['V o km pt', 'k a s 1,5', 'domě 1,5']), ('chained singles', [['text', 'v', 'a', 'k', 'domě'], 10], ['text', 'v a k domě']), ('sentence-initial V binds', [['V', 'Praze', 'text', 'sazba'], 8], ['V Praze', 'text', 'sazba']), ('control layout', [['sazba', 'kg', 'sazba', 'domě', 'domě', 'Praze', 'domě'], 13], ['sazba kg', 'sazba domě', 'domě Praze', 'domě']), ('control layout', [['km', 'a', 'text', 'i', 'km', 'z'], 8], ['km', 'a text', 'i km z'])], [('regression: unit binding direction', [['o', 'i', 'k', 'V', 'text', 'kg', '2.5', 'kg', 'cm'], 7], ['o i k V text', 'kg', '2.5 kg', 'cm']), ('regression: unit binding direction', [['řádek', 'km', '10', 'cm', 'text', 'v', 'sazba', 'domě', 'pt'], 9], ['řádek km', '10 cm', 'text', 'v sazba', 'domě pt']), ('partial-repair probe', [['pt', 'cm', 'pt', 'domě', 'Praze', 'k', 'V', 'text', 'z'], 7], ['pt cm', 'pt domě', 'Praze', 'k V text', 'z']), ('regression: unit binding direction', [['o', 'a', 's', 's', '1,5', 'cm', 'pt'], 7], ['o a s s 1,5 cm', 'pt']), ('decimal comma with unit', [['sazba', '1,5', 'cm', 'text'], 9], ['sazba', '1,5 cm', 'text']), ('chained singles', [['text', 'v', 'a', 'k', 'domě'], 10], ['text', 'v a k domě']), ('control layout', [['v', 'i', 'pt', 'V', 'V', 'km', 'v', 'pt', 'sazba', 'k', 's', 'pt'], 7], ['v i pt', 'V V km', 'v pt', 'sazba', 'k s pt']), ('control layout', [['k', 'sazba', 's', 'kg', 'i', 'řádek', 'řádek', 'řádek', 'V', 'text'], 16], ['k sazba s kg', 'i řádek řádek', 'řádek V text'])], [('regression: unit binding direction', [['10', 'i', 'a', 'pt', '10', 'domě', 'o', 'a', 'cm', 'a', 'sazba'], 9], ['10 i a pt', '10 domě', 'o a cm', 'a sazba']), ('regression: unit binding direction', [['text', 'km', '1,5', 'kg', 'km', 's', 'kg', '1,5', 'domě', 'cm'], 12], ['text km', '1,5 kg km', 's kg 1,5', 'domě cm']), ('partial-repair probe', [['cm', 'text', '1,5', '2.5'], 13], ['cm text 1,5', '2.5']), ('regression: unit binding direction', [['i', '2.5', 'pt', 'o', '1,5', 'o', 'i', 'V', 'pt', 'text', '2.5', 'km'], 7], ['i 2.5 pt', 'o 1,5', 'o i V pt', 'text', '2.5 km']), ('decimal comma with unit', [['sazba', '1,5', 'cm', 'text'], 9], ['sazba', '1,5 cm', 'text']), ('sentence-initial V binds', [['V', 'Praze', 'text', 'sazba'], 8], ['V Praze', 'text', 'sazba']), ('control layout', [['i', 'km', 'a', 'sazba', 'Praze', 'cm', 'z', 'kg'], 12], ['i km a sazba', 'Praze cm', 'z kg']), ('control layout', [['kg', 'řádek', 'v', 'kg', 'o', 'i', 'km', 's', 'domě', 'kg', 'V', '1,5'], 12], ['kg řádek', 'v kg o i km', 's domě kg', 'V 1,5'])], [('regression: unit binding direction', [['v', 'km', 'a', '10', 'pt', 'i', '1,5'], 11], ['v km', 'a 10 pt', 'i 1,5']), ('regression: unit binding direction', [['Praze', 'sazba', 'text', 'sazba', 'V', 'domě', '2.5', 'km', 'domě'], 12], ['Praze sazba', 'text sazba', 'V domě', '2.5 km domě']), ('partial-repair probe', [['V', '1,5', 'k', 'text', 'řádek', '2.5', 'v', 'kg'], 12], ['V 1,5 k text', 'řádek 2.5', 'v kg']), ('partial-repair probe', [['sazba', '1,5', 'a', 'sazba', '1,5'], 9], ['sazba 1,5', 'a sazba', '1,5']), ('chained singles', [['text', 'v', 'a', 'k', 'domě'], 10], ['text', 'v a k domě']), ('decimal comma with unit', [['sazba', '1,5', 'cm', 'text'], 9], ['sazba', '1,5 cm', 'text']), ('control layout', [['kg', 'a', 'sazba', 'domě', 'cm', 'řádek'], 9], ['kg', 'a sazba', 'domě cm', 'řádek']), ('control layout', [['i', 'a', 'i', 's', 'v', 'řádek', 'Praze'], 11], ['i a i s v řádek', 'Praze'])]]\nfor label, args, expected in fixtures[N - 1]:\n    check(label, solve(args), expected)\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":"3fd0f419d8f570b99d4e856ea9907b6f98bb3c546de08a3d2ba4913ba0c10287","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    words, width = x\n    SINGLE = {'a', 'i', 'o', 'u', 'v', 'z', 'k', 's', 'w'}\n    UNITS = {'kg', 'km', 'cm', 'mm', '%', 'pt', 'px'}\n    groups = []\n    k = 0\n    while k < len(words):\n        grp = [words[k]]\n        while True:\n            last = grp[-1]\n            nxt = k + len(grp)\n            if nxt >= len(words):\n                break\n            number = last.replace('.', '').replace(',', '').isdigit()\n            if last.lower() in SINGLE or (words[nxt].replace('.', '').isdigit() and last in UNITS):\n                grp.append(words[nxt])\n            else:\n                break\n        groups.append(' '.join(grp))\n        k += len(grp)\n    lines, cur = [], ''\n    for g in groups:\n        cand = g if not cur else cur + ' ' + g\n        if len(cand) <= width or not cur:\n            cur = cand\n        else:\n            lines.append(cur)\n            cur = g\n    if cur:\n        lines.append(cur)\n    return lines\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('decimal comma with unit', [['sazba', '1,5', 'cm', 'text'], 9], ['sazba', '1,5 cm', 'text']), ('regression: unit binding direction', [['domě', 'pt', 'a', 'a', 'z', 'sazba', 'v', 'domě', 'cm', 'a', '10', 'km'], 15], ['domě pt', 'a a z sazba', 'v domě cm', 'a 10 km']), ('partial-repair probe', [['i', 'i', '2.5', 'domě', 'V', 'o', 'km', 'V'], 11], ['i i 2.5', 'domě V o km', 'V']), ('regression: unit binding direction', [['1,5', 'kg', 's', 'sazba', '2.5', 'km', '10', 'pt', 'cm'], 6], ['1,5 kg', 's sazba', '2.5 km', '10 pt', 'cm']), ('sentence-initial V binds', [['V', 'Praze', 'text', 'sazba'], 8], ['V Praze', 'text', 'sazba']), ('chained singles', [['text', 'v', 'a', 'k', 'domě'], 10], ['text', 'v a k domě']), ('control layout', [['10', 'V', 'o', 'i', 'v', 'a'], 12], ['10 V o i v a']), ('control layout', [['o', 'k', 'řádek', 'V'], 9], ['o k řádek', 'V'])], [('regression: unit binding direction', [['domě', 'pt', 'a', 'a', 'z', 'sazba', 'v', 'domě', 'cm', 'a', '10', 'km'], 15], ['domě pt', 'a a z sazba', 'v domě cm', 'a 10 km']), ('regression: unit binding direction', [['o', 'km', 'pt', '10', 'kg', 'Praze', 'text', 'k', 'sazba'], 7], ['o km pt', '10 kg', 'Praze', 'text', 'k sazba']), ('partial-repair probe', [['V', '10', '2.5', 'v', 'o', 'Praze', 'text', '2.5'], 9], ['V 10 2.5', 'v o Praze', 'text 2.5']), ('partial-repair probe', [['V', 'o', 'km', 'pt', 'k', 'a', 's', '1,5', 'domě', '1,5'], 13], ['V o km pt', 'k a s 1,5', 'domě 1,5']), ('chained singles', [['text', 'v', 'a', 'k', 'domě'], 10], ['text', 'v a k domě']), ('sentence-initial V binds', [['V', 'Praze', 'text', 'sazba'], 8], ['V Praze', 'text', 'sazba']), ('control layout', [['sazba', 'kg', 'sazba', 'domě', 'domě', 'Praze', 'domě'], 13], ['sazba kg', 'sazba domě', 'domě Praze', 'domě']), ('control layout', [['km', 'a', 'text', 'i', 'km', 'z'], 8], ['km', 'a text', 'i km z'])], [('regression: unit binding direction', [['o', 'i', 'k', 'V', 'text', 'kg', '2.5', 'kg', 'cm'], 7], ['o i k V text', 'kg', '2.5 kg', 'cm']), ('regression: unit binding direction', [['řádek', 'km', '10', 'cm', 'text', 'v', 'sazba', 'domě', 'pt'], 9], ['řádek km', '10 cm', 'text', 'v sazba', 'domě pt']), ('partial-repair probe', [['pt', 'cm', 'pt', 'domě', 'Praze', 'k', 'V', 'text', 'z'], 7], ['pt cm', 'pt domě', 'Praze', 'k V text', 'z']), ('regression: unit binding direction', [['o', 'a', 's', 's', '1,5', 'cm', 'pt'], 7], ['o a s s 1,5 cm', 'pt']), ('decimal comma with unit', [['sazba', '1,5', 'cm', 'text'], 9], ['sazba', '1,5 cm', 'text']), ('chained singles', [['text', 'v', 'a', 'k', 'domě'], 10], ['text', 'v a k domě']), ('control layout', [['v', 'i', 'pt', 'V', 'V', 'km', 'v', 'pt', 'sazba', 'k', 's', 'pt'], 7], ['v i pt', 'V V km', 'v pt', 'sazba', 'k s pt']), ('control layout', [['k', 'sazba', 's', 'kg', 'i', 'řádek', 'řádek', 'řádek', 'V', 'text'], 16], ['k sazba s kg', 'i řádek řádek', 'řádek V text'])], [('regression: unit binding direction', [['10', 'i', 'a', 'pt', '10', 'domě', 'o', 'a', 'cm', 'a', 'sazba'], 9], ['10 i a pt', '10 domě', 'o a cm', 'a sazba']), ('regression: unit binding direction', [['text', 'km', '1,5', 'kg', 'km', 's', 'kg', '1,5', 'domě', 'cm'], 12], ['text km', '1,5 kg km', 's kg 1,5', 'domě cm']), ('partial-repair probe', [['cm', 'text', '1,5', '2.5'], 13], ['cm text 1,5', '2.5']), ('regression: unit binding direction', [['i', '2.5', 'pt', 'o', '1,5', 'o', 'i', 'V', 'pt', 'text', '2.5', 'km'], 7], ['i 2.5 pt', 'o 1,5', 'o i V pt', 'text', '2.5 km']), ('decimal comma with unit', [['sazba', '1,5', 'cm', 'text'], 9], ['sazba', '1,5 cm', 'text']), ('sentence-initial V binds', [['V', 'Praze', 'text', 'sazba'], 8], ['V Praze', 'text', 'sazba']), ('control layout', [['i', 'km', 'a', 'sazba', 'Praze', 'cm', 'z', 'kg'], 12], ['i km a sazba', 'Praze cm', 'z kg']), ('control layout', [['kg', 'řádek', 'v', 'kg', 'o', 'i', 'km', 's', 'domě', 'kg', 'V', '1,5'], 12], ['kg řádek', 'v kg o i km', 's domě kg', 'V 1,5'])], [('regression: unit binding direction', [['v', 'km', 'a', '10', 'pt', 'i', '1,5'], 11], ['v km', 'a 10 pt', 'i 1,5']), ('regression: unit binding direction', [['Praze', 'sazba', 'text', 'sazba', 'V', 'domě', '2.5', 'km', 'domě'], 12], ['Praze sazba', 'text sazba', 'V domě', '2.5 km domě']), ('partial-repair probe', [['V', '1,5', 'k', 'text', 'řádek', '2.5', 'v', 'kg'], 12], ['V 1,5 k text', 'řádek 2.5', 'v kg']), ('partial-repair probe', [['sazba', '1,5', 'a', 'sazba', '1,5'], 9], ['sazba 1,5', 'a sazba', '1,5']), ('chained singles', [['text', 'v', 'a', 'k', 'domě'], 10], ['text', 'v a k domě']), ('decimal comma with unit', [['sazba', '1,5', 'cm', 'text'], 9], ['sazba', '1,5 cm', 'text']), ('control layout', [['kg', 'a', 'sazba', 'domě', 'cm', 'řádek'], 9], ['kg', 'a sazba', 'domě cm', 'řádek']), ('control layout', [['i', 'a', 'i', 's', 'v', 'řádek', 'Praze'], 11], ['i a i s v řádek', 'Praze'])]]\nfor label, args, expected in fixtures[N - 1]:\n    check(label, solve(args), expected)\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":"7ba276c9fe4b658ad127fb483f0ee5ddc594cdd821ee72ae3591a0df6134246b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    words, width = x\n    SINGLE = {'a', 'i', 'o', 'u', 'v', 'z', 'k', 's', 'w'}\n    UNITS = {'kg', 'km', 'cm', 'mm', '%', 'pt', 'px'}\n    groups = []\n    k = 0\n    while k < len(words):\n        grp = [words[k]]\n        while True:\n            last = grp[-1]\n            nxt = k + len(grp)\n            if nxt >= len(words):\n                break\n            number = last.replace('.', '').replace(',', '').isdigit()\n            if last.lower() in SINGLE or (number and words[nxt] in UNITS):\n                grp.append(words[nxt])\n            else:\n                break\n        groups.append(' '.join(grp))\n        k += len(grp)\n    lines, cur = [], ''\n    for g in groups:\n        cand = g if not cur else cur + ' ' + g\n        if len(cand) <= width or not cur:\n            cur = cand\n        else:\n            lines.append(cur)\n            cur = g\n    if cur:\n        lines.append(cur)\n    return lines\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('decimal comma with unit', [['sazba', '1,5', 'cm', 'text'], 9], ['sazba', '1,5 cm', 'text']), ('regression: unit binding direction', [['domě', 'pt', 'a', 'a', 'z', 'sazba', 'v', 'domě', 'cm', 'a', '10', 'km'], 15], ['domě pt', 'a a z sazba', 'v domě cm', 'a 10 km']), ('partial-repair probe', [['i', 'i', '2.5', 'domě', 'V', 'o', 'km', 'V'], 11], ['i i 2.5', 'domě V o km', 'V']), ('regression: unit binding direction', [['1,5', 'kg', 's', 'sazba', '2.5', 'km', '10', 'pt', 'cm'], 6], ['1,5 kg', 's sazba', '2.5 km', '10 pt', 'cm']), ('sentence-initial V binds', [['V', 'Praze', 'text', 'sazba'], 8], ['V Praze', 'text', 'sazba']), ('chained singles', [['text', 'v', 'a', 'k', 'domě'], 10], ['text', 'v a k domě']), ('control layout', [['10', 'V', 'o', 'i', 'v', 'a'], 12], ['10 V o i v a']), ('control layout', [['o', 'k', 'řádek', 'V'], 9], ['o k řádek', 'V'])], [('regression: unit binding direction', [['domě', 'pt', 'a', 'a', 'z', 'sazba', 'v', 'domě', 'cm', 'a', '10', 'km'], 15], ['domě pt', 'a a z sazba', 'v domě cm', 'a 10 km']), ('regression: unit binding direction', [['o', 'km', 'pt', '10', 'kg', 'Praze', 'text', 'k', 'sazba'], 7], ['o km pt', '10 kg', 'Praze', 'text', 'k sazba']), ('partial-repair probe', [['V', '10', '2.5', 'v', 'o', 'Praze', 'text', '2.5'], 9], ['V 10 2.5', 'v o Praze', 'text 2.5']), ('partial-repair probe', [['V', 'o', 'km', 'pt', 'k', 'a', 's', '1,5', 'domě', '1,5'], 13], ['V o km pt', 'k a s 1,5', 'domě 1,5']), ('chained singles', [['text', 'v', 'a', 'k', 'domě'], 10], ['text', 'v a k domě']), ('sentence-initial V binds', [['V', 'Praze', 'text', 'sazba'], 8], ['V Praze', 'text', 'sazba']), ('control layout', [['sazba', 'kg', 'sazba', 'domě', 'domě', 'Praze', 'domě'], 13], ['sazba kg', 'sazba domě', 'domě Praze', 'domě']), ('control layout', [['km', 'a', 'text', 'i', 'km', 'z'], 8], ['km', 'a text', 'i km z'])], [('regression: unit binding direction', [['o', 'i', 'k', 'V', 'text', 'kg', '2.5', 'kg', 'cm'], 7], ['o i k V text', 'kg', '2.5 kg', 'cm']), ('regression: unit binding direction', [['řádek', 'km', '10', 'cm', 'text', 'v', 'sazba', 'domě', 'pt'], 9], ['řádek km', '10 cm', 'text', 'v sazba', 'domě pt']), ('partial-repair probe', [['pt', 'cm', 'pt', 'domě', 'Praze', 'k', 'V', 'text', 'z'], 7], ['pt cm', 'pt domě', 'Praze', 'k V text', 'z']), ('regression: unit binding direction', [['o', 'a', 's', 's', '1,5', 'cm', 'pt'], 7], ['o a s s 1,5 cm', 'pt']), ('decimal comma with unit', [['sazba', '1,5', 'cm', 'text'], 9], ['sazba', '1,5 cm', 'text']), ('chained singles', [['text', 'v', 'a', 'k', 'domě'], 10], ['text', 'v a k domě']), ('control layout', [['v', 'i', 'pt', 'V', 'V', 'km', 'v', 'pt', 'sazba', 'k', 's', 'pt'], 7], ['v i pt', 'V V km', 'v pt', 'sazba', 'k s pt']), ('control layout', [['k', 'sazba', 's', 'kg', 'i', 'řádek', 'řádek', 'řádek', 'V', 'text'], 16], ['k sazba s kg', 'i řádek řádek', 'řádek V text'])], [('regression: unit binding direction', [['10', 'i', 'a', 'pt', '10', 'domě', 'o', 'a', 'cm', 'a', 'sazba'], 9], ['10 i a pt', '10 domě', 'o a cm', 'a sazba']), ('regression: unit binding direction', [['text', 'km', '1,5', 'kg', 'km', 's', 'kg', '1,5', 'domě', 'cm'], 12], ['text km', '1,5 kg km', 's kg 1,5', 'domě cm']), ('partial-repair probe', [['cm', 'text', '1,5', '2.5'], 13], ['cm text 1,5', '2.5']), ('regression: unit binding direction', [['i', '2.5', 'pt', 'o', '1,5', 'o', 'i', 'V', 'pt', 'text', '2.5', 'km'], 7], ['i 2.5 pt', 'o 1,5', 'o i V pt', 'text', '2.5 km']), ('decimal comma with unit', [['sazba', '1,5', 'cm', 'text'], 9], ['sazba', '1,5 cm', 'text']), ('sentence-initial V binds', [['V', 'Praze', 'text', 'sazba'], 8], ['V Praze', 'text', 'sazba']), ('control layout', [['i', 'km', 'a', 'sazba', 'Praze', 'cm', 'z', 'kg'], 12], ['i km a sazba', 'Praze cm', 'z kg']), ('control layout', [['kg', 'řádek', 'v', 'kg', 'o', 'i', 'km', 's', 'domě', 'kg', 'V', '1,5'], 12], ['kg řádek', 'v kg o i km', 's domě kg', 'V 1,5'])], [('regression: unit binding direction', [['v', 'km', 'a', '10', 'pt', 'i', '1,5'], 11], ['v km', 'a 10 pt', 'i 1,5']), ('regression: unit binding direction', [['Praze', 'sazba', 'text', 'sazba', 'V', 'domě', '2.5', 'km', 'domě'], 12], ['Praze sazba', 'text sazba', 'V domě', '2.5 km domě']), ('partial-repair probe', [['V', '1,5', 'k', 'text', 'řádek', '2.5', 'v', 'kg'], 12], ['V 1,5 k text', 'řádek 2.5', 'v kg']), ('partial-repair probe', [['sazba', '1,5', 'a', 'sazba', '1,5'], 9], ['sazba 1,5', 'a sazba', '1,5']), ('chained singles', [['text', 'v', 'a', 'k', 'domě'], 10], ['text', 'v a k domě']), ('decimal comma with unit', [['sazba', '1,5', 'cm', 'text'], 9], ['sazba', '1,5 cm', 'text']), ('control layout', [['kg', 'a', 'sazba', 'domě', 'cm', 'řádek'], 9], ['kg', 'a sazba', 'domě cm', 'řádek']), ('control layout', [['i', 'a', 'i', 's', 'v', 'řádek', 'Praze'], 11], ['i a i s v řádek', 'Praze'])]]\nfor label, args, expected in fixtures[N - 1]:\n    check(label, solve(args), expected)\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":"A deterministic toy typesetting model with integer widths and a stipulated rule set; it does not claim conformance to any engine. 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":"w2-typography-line-breaking-nonbreaking-bindings-unit-binding-direction","generated_at":"2026-09-29T14:49:52.283832+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Line breaking decides where paragraphs wrap on screen and in print; a wrong decision point shifts every following line.","repair":"Bind a number to the unit that follows it.","root_cause":"The unit test looks for a unit before a number instead of after it.","sha256":"e0d3c8c703529ef6c079c5e791b629e45f07269b5c0da2d32d7e9ab4ea059f7f","title":"Single-letter and unit bindings: unit binding direction · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.607,"exit_code":1,"observations":[{"actual":["sazba","1,5 cm","text"],"check":"decimal comma with unit","expected":["sazba","1,5 cm","text"],"passed":true},{"actual":["domě pt","a a z sazba","v domě cm","a 10 km"],"check":"regression: unit binding direction","expected":["domě pt","a a z sazba","v domě cm","a 10 km"],"passed":true},{"actual":["i i 2.5 domě","V o km V"],"check":"partial-repair probe","expected":["i i 2.5","domě V o km","V"],"passed":false},{"actual":["1,5 kg","s sazba","2.5 km","10 pt cm"],"check":"regression: unit binding direction","expected":["1,5 kg","s sazba","2.5 km","10 pt","cm"],"passed":false},{"actual":["V Praze","text","sazba"],"check":"sentence-initial V binds","expected":["V Praze","text","sazba"],"passed":true},{"actual":["text","v a k domě"],"check":"chained singles","expected":["text","v a k domě"],"passed":true},{"actual":["10 V o i v a"],"check":"control layout","expected":["10 V o i v a"],"passed":true},{"actual":["o k řádek","V"],"check":"control layout","expected":["o k řádek","V"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"decimal comma with unit\", \"actual\": [\"sazba\", \"1,5 cm\", \"text\"], \"expected\": [\"sazba\", \"1,5 cm\", \"text\"], \"passed\": true}, {\"check\": \"regression: unit binding direction\", \"actual\": [\"domě pt\", \"a a z sazba\", \"v domě cm\", \"a 10 km\"], \"expected\": [\"domě pt\", \"a a z sazba\", \"v domě cm\", \"a 10 km\"], \"passed\": true}, {\"check\": \"partial-repair probe\", \"actual\": [\"i i 2.5 domě\", \"V o km V\"], \"expected\": [\"i i 2.5\", \"domě V o km\", \"V\"], \"passed\": false}, {\"check\": \"regression: unit binding direction\", \"actual\": [\"1,5 kg\", \"s sazba\", \"2.5 km\", \"10 pt cm\"], \"expected\": [\"1,5 kg\", \"s sazba\", \"2.5 km\", \"10 pt\", \"cm\"], \"passed\": false}, {\"check\": \"sentence-initial V binds\", \"actual\": [\"V Praze\", \"text\", \"sazba\"], \"expected\": [\"V Praze\", \"text\", \"sazba\"], \"passed\": true}, {\"check\": \"chained singles\", \"actual\": [\"text\", \"v a k domě\"], \"expected\": [\"text\", \"v a k domě\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"10 V o i v a\"], \"expected\": [\"10 V o i v a\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"o k řádek\", \"V\"], \"expected\": [\"o k řádek\", \"V\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":38.005,"exit_code":1,"observations":[{"actual":["sazba 1,5","cm text"],"check":"decimal comma with unit","expected":["sazba","1,5 cm","text"],"passed":false},{"actual":["domě pt","a a z sazba","v domě cm a 10","km"],"check":"regression: unit binding direction","expected":["domě pt","a a z sazba","v domě cm","a 10 km"],"passed":false},{"actual":["i i 2.5","domě V o km","V"],"check":"partial-repair probe","expected":["i i 2.5","domě V o km","V"],"passed":true},{"actual":["1,5 kg","s sazba","2.5","km 10","pt cm"],"check":"regression: unit binding direction","expected":["1,5 kg","s sazba","2.5 km","10 pt","cm"],"passed":false},{"actual":["V Praze","text","sazba"],"check":"sentence-initial V binds","expected":["V Praze","text","sazba"],"passed":true},{"actual":["text","v a k domě"],"check":"chained singles","expected":["text","v a k domě"],"passed":true},{"actual":["10 V o i v a"],"check":"control layout","expected":["10 V o i v a"],"passed":true},{"actual":["o k řádek","V"],"check":"control layout","expected":["o k řádek","V"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"decimal comma with unit\", \"actual\": [\"sazba 1,5\", \"cm text\"], \"expected\": [\"sazba\", \"1,5 cm\", \"text\"], \"passed\": false}, {\"check\": \"regression: unit binding direction\", \"actual\": [\"domě pt\", \"a a z sazba\", \"v domě cm a 10\", \"km\"], \"expected\": [\"domě pt\", \"a a z sazba\", \"v domě cm\", \"a 10 km\"], \"passed\": false}, {\"check\": \"partial-repair probe\", \"actual\": [\"i i 2.5\", \"domě V o km\", \"V\"], \"expected\": [\"i i 2.5\", \"domě V o km\", \"V\"], \"passed\": true}, {\"check\": \"regression: unit binding direction\", \"actual\": [\"1,5 kg\", \"s sazba\", \"2.5\", \"km 10\", \"pt cm\"], \"expected\": [\"1,5 kg\", \"s sazba\", \"2.5 km\", \"10 pt\", \"cm\"], \"passed\": false}, {\"check\": \"sentence-initial V binds\", \"actual\": [\"V Praze\", \"text\", \"sazba\"], \"expected\": [\"V Praze\", \"text\", \"sazba\"], \"passed\": true}, {\"check\": \"chained singles\", \"actual\": [\"text\", \"v a k domě\"], \"expected\": [\"text\", \"v a k domě\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"10 V o i v a\"], \"expected\": [\"10 V o i v a\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"o k řádek\", \"V\"], \"expected\": [\"o k řádek\", \"V\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.627,"exit_code":0,"observations":[{"actual":["sazba","1,5 cm","text"],"check":"decimal comma with unit","expected":["sazba","1,5 cm","text"],"passed":true},{"actual":["domě pt","a a z sazba","v domě cm","a 10 km"],"check":"regression: unit binding direction","expected":["domě pt","a a z sazba","v domě cm","a 10 km"],"passed":true},{"actual":["i i 2.5","domě V o km","V"],"check":"partial-repair probe","expected":["i i 2.5","domě V o km","V"],"passed":true},{"actual":["1,5 kg","s sazba","2.5 km","10 pt","cm"],"check":"regression: unit binding direction","expected":["1,5 kg","s sazba","2.5 km","10 pt","cm"],"passed":true},{"actual":["V Praze","text","sazba"],"check":"sentence-initial V binds","expected":["V Praze","text","sazba"],"passed":true},{"actual":["text","v a k domě"],"check":"chained singles","expected":["text","v a k domě"],"passed":true},{"actual":["10 V o i v a"],"check":"control layout","expected":["10 V o i v a"],"passed":true},{"actual":["o k řádek","V"],"check":"control layout","expected":["o k řádek","V"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"decimal comma with unit\", \"actual\": [\"sazba\", \"1,5 cm\", \"text\"], \"expected\": [\"sazba\", \"1,5 cm\", \"text\"], \"passed\": true}, {\"check\": \"regression: unit binding direction\", \"actual\": [\"domě pt\", \"a a z sazba\", \"v domě cm\", \"a 10 km\"], \"expected\": [\"domě pt\", \"a a z sazba\", \"v domě cm\", \"a 10 km\"], \"passed\": true}, {\"check\": \"partial-repair probe\", \"actual\": [\"i i 2.5\", \"domě V o km\", \"V\"], \"expected\": [\"i i 2.5\", \"domě V o km\", \"V\"], \"passed\": true}, {\"check\": \"regression: unit binding direction\", \"actual\": [\"1,5 kg\", \"s sazba\", \"2.5 km\", \"10 pt\", \"cm\"], \"expected\": [\"1,5 kg\", \"s sazba\", \"2.5 km\", \"10 pt\", \"cm\"], \"passed\": true}, {\"check\": \"sentence-initial V binds\", \"actual\": [\"V Praze\", \"text\", \"sazba\"], \"expected\": [\"V Praze\", \"text\", \"sazba\"], \"passed\": true}, {\"check\": \"chained singles\", \"actual\": [\"text\", \"v a k domě\"], \"expected\": [\"text\", \"v a k domě\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"10 V o i v a\"], \"expected\": [\"10 V o i v a\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"o k řádek\", \"V\"], \"expected\": [\"o k řádek\", \"V\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}