{"abstract":"One more consecutive hyphen than allowed is produced.","category":"Typography line breaking","checks":8,"contract":"Input [words as syllable lists, width, limit]. Greedy fill with 1-unit spaces and characters. A word that does not fit may be split at the latest syllable boundary whose head plus \"-\" fits, only if fewer than limit immediately preceding lines ended in a hyphen and the word is not the paragraph's last word. A line ended without hyphen resets the streak; a word too long for an empty line is set alone. Return the lines.","evaluation_group":"w2-typography-line-breaking-hyphen-ladder","failed_approach":"Using limit - 1 forbids the last allowed hyphen.","family":"w2-typography-line-breaking-hyphen-ladder-ladder-limit-comparison","id":"FA-79956","implementations":{"attempt":{"sha256":"836a26dd38a20b3ae9b9398d8d63b169b8961703d0e621d812cf305009cc145c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    words, width, limit = x\n    queue = [list(w) for w in words]\n    lines = []\n    cur = ''\n    streak = 0\n    k = 0\n    while k < len(queue):\n        syl = queue[k]\n        token = ''.join(syl)\n        need = len(token) if cur == '' else len(cur) + 1 + len(token)\n        if need <= width:\n            cur = token if cur == '' else cur + ' ' + token\n            k += 1\n            continue\n        split = None\n        if streak < limit - 1 and k < len(queue) - 1:\n            for cut in range(len(syl) - 1, 0, -1):\n                head = ''.join(syl[:cut]) + '-'\n                room = len(head) if cur == '' else len(cur) + len(head) + 1\n                if room <= width:\n                    split = cut\n                    break\n        if split is not None:\n            head = ''.join(syl[:split]) + '-'\n            lines.append(head if cur == '' else cur + ' ' + head)\n            queue[k] = syl[split:]\n            cur = ''\n            streak += 1\n        elif cur == '':\n            lines.append(token)\n            k += 1\n            streak = 0\n        else:\n            lines.append(cur)\n            cur, streak = '', 0\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 = [[('ladder of three hyphenated lines', [[['in', 'ter', 'na', 'tion', 'al'], ['com', 'po', 'si', 'tion'], ['hy', 'phen', 'a', 'tion'], ['text']], 7, 2], ['inter-', 'nation-', 'al', 'compo-', 'sition', 'hyphen-', 'ation', 'text']), ('regression: ladder limit comparison', [[['to'], ['line'], ['com', 'po', 'si', 'tion'], ['mar', 'gin'], ['mar', 'gin'], ['type'], ['kern', 'ing'], ['in', 'ter', 'na', 'tion', 'al'], ['col', 'umn'], ['line'], ['com', 'po', 'si', 'tion'], ['to']], 14, 1], ['to line compo-', 'sition margin', 'margin type', 'kerning inter-', 'national', 'column line', 'composition to']), ('partial-repair probe', [[['jus', 'ti', 'fied'], ['pa', 'ra', 'graph'], ['jus', 'ti', 'fied'], ['pa', 'ra', 'graph'], ['kern', 'ing'], ['to'], ['lead', 'ing'], ['a']], 7, 1], ['justi-', 'fied', 'para-', 'graph', 'justi-', 'fied', 'para-', 'graph', 'kerning', 'to', 'leading', 'a']), ('partial-repair probe', [[['lead', 'ing'], ['a'], ['col', 'umn'], ['col', 'umn'], ['com', 'po', 'si', 'tion'], ['a']], 11, 2], ['leading a', 'column col-', 'umn compo-', 'sition a']), ('last word never hyphenated', [[['a'], ['com', 'po', 'si', 'tion']], 8, 2], ['a', 'composition']), ('control layout', [[['col', 'umn'], ['kern', 'ing'], ['text'], ['col', 'umn'], ['line'], ['line'], ['a']], 12, 2], ['column kern-', 'ing text', 'column line', 'line a']), ('control layout', [[['line'], ['of'], ['mar', 'gin'], ['a'], ['text'], ['line'], ['a'], ['pa', 'ra', 'graph'], ['of'], ['com', 'po', 'si', 'tion'], ['kern', 'ing'], ['break', 'ing']], 7, 3], ['line of', 'margin', 'a text', 'line a', 'para-', 'graph', 'of com-', 'posi-', 'tion', 'kerning', 'breaking']), ('control layout', [[['kern', 'ing'], ['hy', 'phen', 'a', 'tion'], ['type'], ['col', 'umn'], ['mar', 'gin'], ['kern', 'ing'], ['set', 'ting']], 8, 2], ['kerning', 'hyphena-', 'tion', 'type', 'column', 'margin', 'kerning', 'setting'])], [('regression: ladder limit comparison', [[['mar', 'gin'], ['mar', 'gin'], ['break', 'ing'], ['text'], ['of'], ['lead', 'ing'], ['hy', 'phen', 'a', 'tion'], ['in', 'ter', 'na', 'tion', 'al'], ['line']], 8, 2], ['margin', 'margin', 'breaking', 'text of', 'leading', 'hyphena-', 'tion in-', 'ternational', 'line']), ('regression: ladder limit comparison', [[['mar', 'gin'], ['kern', 'ing'], ['col', 'umn'], ['hy', 'phen', 'a', 'tion'], ['a'], ['col', 'umn'], ['pa', 'ra', 'graph']], 6, 1], ['margin', 'kern-', 'ing', 'column', 'hy-', 'phenation', 'a col-', 'umn', 'paragraph']), ('regression: ladder limit comparison', [[['kern', 'ing'], ['to'], ['kern', 'ing'], ['hy', 'phen', 'a', 'tion'], ['to'], ['hy', 'phen', 'a', 'tion'], ['mar', 'gin'], ['to'], ['pa', 'ra', 'graph']], 10, 1], ['kerning to', 'kerning', 'hyphena-', 'tion to', 'hyphena-', 'tion', 'margin to', 'paragraph']), ('partial-repair probe', [[['com', 'po', 'si', 'tion'], ['to'], ['break', 'ing'], ['to'], ['text'], ['jus', 'ti', 'fied'], ['set', 'ting'], ['of'], ['kern', 'ing']], 12, 2], ['composition', 'to breaking', 'to text jus-', 'tified set-', 'ting of', 'kerning']), ('last word never hyphenated', [[['a'], ['com', 'po', 'si', 'tion']], 8, 2], ['a', 'composition']), ('ladder of three hyphenated lines', [[['in', 'ter', 'na', 'tion', 'al'], ['com', 'po', 'si', 'tion'], ['hy', 'phen', 'a', 'tion'], ['text']], 7, 2], ['inter-', 'nation-', 'al', 'compo-', 'sition', 'hyphen-', 'ation', 'text']), ('control layout', [[['lead', 'ing'], ['break', 'ing'], ['a'], ['in', 'ter', 'na', 'tion', 'al'], ['a'], ['mar', 'gin'], ['text'], ['pa', 'ra', 'graph'], ['line']], 12, 3], ['leading', 'breaking a', 'internation-', 'al a margin', 'text para-', 'graph line']), ('control layout', [[['col', 'umn'], ['pa', 'ra', 'graph'], ['text'], ['pa', 'ra', 'graph'], ['break', 'ing'], ['of'], ['hy', 'phen', 'a', 'tion'], ['kern', 'ing'], ['of'], ['jus', 'ti', 'fied'], ['in', 'ter', 'na', 'tion', 'al']], 11, 2], ['column pa-', 'ragraph', 'text para-', 'graph', 'breaking of', 'hyphenation', 'kerning of', 'justified', 'international'])], [('regression: ladder limit comparison', [[['jus', 'ti', 'fied'], ['to'], ['type'], ['of'], ['kern', 'ing'], ['com', 'po', 'si', 'tion'], ['to'], ['kern', 'ing'], ['in', 'ter', 'na', 'tion', 'al'], ['lead', 'ing'], ['type'], ['hy', 'phen', 'a', 'tion']], 14, 3], ['justified to', 'type of kern-', 'ing composi-', 'tion to kern-', 'ing', 'international', 'leading type', 'hyphenation']), ('regression: ladder limit comparison', [[['com', 'po', 'si', 'tion'], ['jus', 'ti', 'fied'], ['hy', 'phen', 'a', 'tion'], ['set', 'ting'], ['mar', 'gin'], ['com', 'po', 'si', 'tion']], 6, 1], ['compo-', 'sition', 'justi-', 'fied', 'hy-', 'phenation', 'set-', 'ting', 'margin', 'composition']), ('partial-repair probe', [[['text'], ['col', 'umn'], ['text'], ['a'], ['jus', 'ti', 'fied'], ['com', 'po', 'si', 'tion'], ['hy', 'phen', 'a', 'tion'], ['to'], ['text'], ['a']], 7, 1], ['text', 'column', 'text a', 'justi-', 'fied', 'compo-', 'sition', 'hyphen-', 'ation', 'to text', 'a']), ('regression: ladder limit comparison', [[['break', 'ing'], ['com', 'po', 'si', 'tion'], ['in', 'ter', 'na', 'tion', 'al'], ['set', 'ting'], ['com', 'po', 'si', 'tion'], ['com', 'po', 'si', 'tion'], ['to'], ['break', 'ing'], ['in', 'ter', 'na', 'tion', 'al']], 13, 1], ['breaking com-', 'position', 'international', 'setting com-', 'position', 'composition', 'to breaking', 'international']), ('ladder of three hyphenated lines', [[['in', 'ter', 'na', 'tion', 'al'], ['com', 'po', 'si', 'tion'], ['hy', 'phen', 'a', 'tion'], ['text']], 7, 2], ['inter-', 'nation-', 'al', 'compo-', 'sition', 'hyphen-', 'ation', 'text']), ('last word never hyphenated', [[['a'], ['com', 'po', 'si', 'tion']], 8, 2], ['a', 'composition']), ('control layout', [[['line'], ['lead', 'ing'], ['in', 'ter', 'na', 'tion', 'al'], ['mar', 'gin'], ['set', 'ting'], ['col', 'umn'], ['jus', 'ti', 'fied'], ['of'], ['col', 'umn'], ['pa', 'ra', 'graph'], ['a']], 13, 3], ['line leading', 'international', 'margin set-', 'ting column', 'justified of', 'column para-', 'graph a']), ('control layout', [[['col', 'umn'], ['pa', 'ra', 'graph'], ['text'], ['pa', 'ra', 'graph'], ['break', 'ing'], ['of'], ['hy', 'phen', 'a', 'tion'], ['kern', 'ing'], ['of'], ['jus', 'ti', 'fied'], ['in', 'ter', 'na', 'tion', 'al']], 11, 2], ['column pa-', 'ragraph', 'text para-', 'graph', 'breaking of', 'hyphenation', 'kerning of', 'justified', 'international'])], [('regression: ladder limit comparison', [[['pa', 'ra', 'graph'], ['in', 'ter', 'na', 'tion', 'al'], ['type'], ['break', 'ing'], ['set', 'ting'], ['hy', 'phen', 'a', 'tion'], ['set', 'ting'], ['jus', 'ti', 'fied'], ['text']], 9, 1], ['paragraph', 'interna-', 'tional', 'type', 'breaking', 'setting', 'hyphena-', 'tion', 'setting', 'justified', 'text']), ('regression: ladder limit comparison', [[['lead', 'ing'], ['type'], ['col', 'umn'], ['col', 'umn'], ['hy', 'phen', 'a', 'tion'], ['line'], ['in', 'ter', 'na', 'tion', 'al'], ['pa', 'ra', 'graph']], 9, 1], ['leading', 'type col-', 'umn', 'column', 'hyphena-', 'tion line', 'interna-', 'tional', 'paragraph']), ('regression: ladder limit comparison', [[['mar', 'gin'], ['of'], ['col', 'umn'], ['in', 'ter', 'na', 'tion', 'al'], ['in', 'ter', 'na', 'tion', 'al'], ['kern', 'ing'], ['mar', 'gin'], ['pa', 'ra', 'graph']], 8, 2], ['margin', 'of col-', 'umn in-', 'ternational', 'interna-', 'tional', 'kerning', 'margin', 'paragraph']), ('partial-repair probe', [[['of'], ['jus', 'ti', 'fied'], ['set', 'ting'], ['com', 'po', 'si', 'tion'], ['in', 'ter', 'na', 'tion', 'al'], ['com', 'po', 'si', 'tion'], ['in', 'ter', 'na', 'tion', 'al'], ['pa', 'ra', 'graph'], ['break', 'ing']], 8, 3], ['of jus-', 'tified', 'setting', 'composi-', 'tion in-', 'terna-', 'tional', 'composi-', 'tion in-', 'terna-', 'tional', 'para-', 'graph', 'breaking']), ('ladder of three hyphenated lines', [[['in', 'ter', 'na', 'tion', 'al'], ['com', 'po', 'si', 'tion'], ['hy', 'phen', 'a', 'tion'], ['text']], 7, 2], ['inter-', 'nation-', 'al', 'compo-', 'sition', 'hyphen-', 'ation', 'text']), ('last word never hyphenated', [[['a'], ['com', 'po', 'si', 'tion']], 8, 2], ['a', 'composition']), ('control layout', [[['lead', 'ing'], ['pa', 'ra', 'graph'], ['to'], ['mar', 'gin'], ['line'], ['jus', 'ti', 'fied']], 14, 3], ['leading para-', 'graph to mar-', 'gin line', 'justified']), ('control layout', [[['of'], ['type'], ['type'], ['com', 'po', 'si', 'tion'], ['text'], ['jus', 'ti', 'fied'], ['hy', 'phen', 'a', 'tion']], 9, 3], ['of type', 'type com-', 'position', 'text jus-', 'tified', 'hyphenation'])], [('regression: ladder limit comparison', [[['line'], ['in', 'ter', 'na', 'tion', 'al'], ['in', 'ter', 'na', 'tion', 'al'], ['text'], ['com', 'po', 'si', 'tion'], ['to'], ['hy', 'phen', 'a', 'tion'], ['in', 'ter', 'na', 'tion', 'al'], ['kern', 'ing'], ['com', 'po', 'si', 'tion'], ['text'], ['hy', 'phen', 'a', 'tion']], 13, 1], ['line interna-', 'tional', 'international', 'text composi-', 'tion to', 'hyphenation', 'international', 'kerning com-', 'position text', 'hyphenation']), ('regression: ladder limit comparison', [[['lead', 'ing'], ['lead', 'ing'], ['set', 'ting'], ['kern', 'ing'], ['break', 'ing'], ['type'], ['mar', 'gin'], ['type'], ['set', 'ting'], ['com', 'po', 'si', 'tion'], ['in', 'ter', 'na', 'tion', 'al'], ['jus', 'ti', 'fied']], 8, 2], ['leading', 'leading', 'setting', 'kerning', 'breaking', 'type', 'margin', 'type', 'setting', 'composi-', 'tion in-', 'ternational', 'justified']), ('regression: ladder limit comparison', [[['a'], ['kern', 'ing'], ['in', 'ter', 'na', 'tion', 'al'], ['set', 'ting'], ['pa', 'ra', 'graph']], 11, 1], ['a kerning', 'interna-', 'tional', 'setting', 'paragraph']), ('partial-repair probe', [[['set', 'ting'], ['lead', 'ing'], ['jus', 'ti', 'fied'], ['of'], ['in', 'ter', 'na', 'tion', 'al'], ['to'], ['jus', 'ti', 'fied'], ['mar', 'gin'], ['line']], 8, 1], ['setting', 'leading', 'justi-', 'fied of', 'interna-', 'tional', 'to jus-', 'tified', 'margin', 'line']), ('ladder of three hyphenated lines', [[['in', 'ter', 'na', 'tion', 'al'], ['com', 'po', 'si', 'tion'], ['hy', 'phen', 'a', 'tion'], ['text']], 7, 2], ['inter-', 'nation-', 'al', 'compo-', 'sition', 'hyphen-', 'ation', 'text']), ('last word never hyphenated', [[['a'], ['com', 'po', 'si', 'tion']], 8, 2], ['a', 'composition']), ('control layout', [[['type'], ['set', 'ting'], ['a'], ['a'], ['break', 'ing'], ['kern', 'ing'], ['mar', 'gin'], ['type'], ['of'], ['hy', 'phen', 'a', 'tion']], 10, 3], ['type set-', 'ting a a', 'breaking', 'kerning', 'margin', 'type of', 'hyphenation']), ('control layout', [[['break', 'ing'], ['mar', 'gin'], ['mar', 'gin'], ['lead', 'ing'], ['in', 'ter', 'na', 'tion', 'al'], ['line'], ['lead', 'ing']], 12, 2], ['breaking', 'margin mar-', 'gin leading', 'internation-', 'al line', 'leading'])]]\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":"e69b21f169fa05987a402c3c539773408660f95057f52bb76e3e0f9f7916da13","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    words, width, limit = x\n    queue = [list(w) for w in words]\n    lines = []\n    cur = ''\n    streak = 0\n    k = 0\n    while k < len(queue):\n        syl = queue[k]\n        token = ''.join(syl)\n        need = len(token) if cur == '' else len(cur) + 1 + len(token)\n        if need <= width:\n            cur = token if cur == '' else cur + ' ' + token\n            k += 1\n            continue\n        split = None\n        if streak <= limit and k < len(queue) - 1:\n            for cut in range(len(syl) - 1, 0, -1):\n                head = ''.join(syl[:cut]) + '-'\n                room = len(head) if cur == '' else len(cur) + len(head) + 1\n                if room <= width:\n                    split = cut\n                    break\n        if split is not None:\n            head = ''.join(syl[:split]) + '-'\n            lines.append(head if cur == '' else cur + ' ' + head)\n            queue[k] = syl[split:]\n            cur = ''\n            streak += 1\n        elif cur == '':\n            lines.append(token)\n            k += 1\n            streak = 0\n        else:\n            lines.append(cur)\n            cur, streak = '', 0\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 = [[('ladder of three hyphenated lines', [[['in', 'ter', 'na', 'tion', 'al'], ['com', 'po', 'si', 'tion'], ['hy', 'phen', 'a', 'tion'], ['text']], 7, 2], ['inter-', 'nation-', 'al', 'compo-', 'sition', 'hyphen-', 'ation', 'text']), ('regression: ladder limit comparison', [[['to'], ['line'], ['com', 'po', 'si', 'tion'], ['mar', 'gin'], ['mar', 'gin'], ['type'], ['kern', 'ing'], ['in', 'ter', 'na', 'tion', 'al'], ['col', 'umn'], ['line'], ['com', 'po', 'si', 'tion'], ['to']], 14, 1], ['to line compo-', 'sition margin', 'margin type', 'kerning inter-', 'national', 'column line', 'composition to']), ('partial-repair probe', [[['jus', 'ti', 'fied'], ['pa', 'ra', 'graph'], ['jus', 'ti', 'fied'], ['pa', 'ra', 'graph'], ['kern', 'ing'], ['to'], ['lead', 'ing'], ['a']], 7, 1], ['justi-', 'fied', 'para-', 'graph', 'justi-', 'fied', 'para-', 'graph', 'kerning', 'to', 'leading', 'a']), ('partial-repair probe', [[['lead', 'ing'], ['a'], ['col', 'umn'], ['col', 'umn'], ['com', 'po', 'si', 'tion'], ['a']], 11, 2], ['leading a', 'column col-', 'umn compo-', 'sition a']), ('last word never hyphenated', [[['a'], ['com', 'po', 'si', 'tion']], 8, 2], ['a', 'composition']), ('control layout', [[['col', 'umn'], ['kern', 'ing'], ['text'], ['col', 'umn'], ['line'], ['line'], ['a']], 12, 2], ['column kern-', 'ing text', 'column line', 'line a']), ('control layout', [[['line'], ['of'], ['mar', 'gin'], ['a'], ['text'], ['line'], ['a'], ['pa', 'ra', 'graph'], ['of'], ['com', 'po', 'si', 'tion'], ['kern', 'ing'], ['break', 'ing']], 7, 3], ['line of', 'margin', 'a text', 'line a', 'para-', 'graph', 'of com-', 'posi-', 'tion', 'kerning', 'breaking']), ('control layout', [[['kern', 'ing'], ['hy', 'phen', 'a', 'tion'], ['type'], ['col', 'umn'], ['mar', 'gin'], ['kern', 'ing'], ['set', 'ting']], 8, 2], ['kerning', 'hyphena-', 'tion', 'type', 'column', 'margin', 'kerning', 'setting'])], [('regression: ladder limit comparison', [[['mar', 'gin'], ['mar', 'gin'], ['break', 'ing'], ['text'], ['of'], ['lead', 'ing'], ['hy', 'phen', 'a', 'tion'], ['in', 'ter', 'na', 'tion', 'al'], ['line']], 8, 2], ['margin', 'margin', 'breaking', 'text of', 'leading', 'hyphena-', 'tion in-', 'ternational', 'line']), ('regression: ladder limit comparison', [[['mar', 'gin'], ['kern', 'ing'], ['col', 'umn'], ['hy', 'phen', 'a', 'tion'], ['a'], ['col', 'umn'], ['pa', 'ra', 'graph']], 6, 1], ['margin', 'kern-', 'ing', 'column', 'hy-', 'phenation', 'a col-', 'umn', 'paragraph']), ('regression: ladder limit comparison', [[['kern', 'ing'], ['to'], ['kern', 'ing'], ['hy', 'phen', 'a', 'tion'], ['to'], ['hy', 'phen', 'a', 'tion'], ['mar', 'gin'], ['to'], ['pa', 'ra', 'graph']], 10, 1], ['kerning to', 'kerning', 'hyphena-', 'tion to', 'hyphena-', 'tion', 'margin to', 'paragraph']), ('partial-repair probe', [[['com', 'po', 'si', 'tion'], ['to'], ['break', 'ing'], ['to'], ['text'], ['jus', 'ti', 'fied'], ['set', 'ting'], ['of'], ['kern', 'ing']], 12, 2], ['composition', 'to breaking', 'to text jus-', 'tified set-', 'ting of', 'kerning']), ('last word never hyphenated', [[['a'], ['com', 'po', 'si', 'tion']], 8, 2], ['a', 'composition']), ('ladder of three hyphenated lines', [[['in', 'ter', 'na', 'tion', 'al'], ['com', 'po', 'si', 'tion'], ['hy', 'phen', 'a', 'tion'], ['text']], 7, 2], ['inter-', 'nation-', 'al', 'compo-', 'sition', 'hyphen-', 'ation', 'text']), ('control layout', [[['lead', 'ing'], ['break', 'ing'], ['a'], ['in', 'ter', 'na', 'tion', 'al'], ['a'], ['mar', 'gin'], ['text'], ['pa', 'ra', 'graph'], ['line']], 12, 3], ['leading', 'breaking a', 'internation-', 'al a margin', 'text para-', 'graph line']), ('control layout', [[['col', 'umn'], ['pa', 'ra', 'graph'], ['text'], ['pa', 'ra', 'graph'], ['break', 'ing'], ['of'], ['hy', 'phen', 'a', 'tion'], ['kern', 'ing'], ['of'], ['jus', 'ti', 'fied'], ['in', 'ter', 'na', 'tion', 'al']], 11, 2], ['column pa-', 'ragraph', 'text para-', 'graph', 'breaking of', 'hyphenation', 'kerning of', 'justified', 'international'])], [('regression: ladder limit comparison', [[['jus', 'ti', 'fied'], ['to'], ['type'], ['of'], ['kern', 'ing'], ['com', 'po', 'si', 'tion'], ['to'], ['kern', 'ing'], ['in', 'ter', 'na', 'tion', 'al'], ['lead', 'ing'], ['type'], ['hy', 'phen', 'a', 'tion']], 14, 3], ['justified to', 'type of kern-', 'ing composi-', 'tion to kern-', 'ing', 'international', 'leading type', 'hyphenation']), ('regression: ladder limit comparison', [[['com', 'po', 'si', 'tion'], ['jus', 'ti', 'fied'], ['hy', 'phen', 'a', 'tion'], ['set', 'ting'], ['mar', 'gin'], ['com', 'po', 'si', 'tion']], 6, 1], ['compo-', 'sition', 'justi-', 'fied', 'hy-', 'phenation', 'set-', 'ting', 'margin', 'composition']), ('partial-repair probe', [[['text'], ['col', 'umn'], ['text'], ['a'], ['jus', 'ti', 'fied'], ['com', 'po', 'si', 'tion'], ['hy', 'phen', 'a', 'tion'], ['to'], ['text'], ['a']], 7, 1], ['text', 'column', 'text a', 'justi-', 'fied', 'compo-', 'sition', 'hyphen-', 'ation', 'to text', 'a']), ('regression: ladder limit comparison', [[['break', 'ing'], ['com', 'po', 'si', 'tion'], ['in', 'ter', 'na', 'tion', 'al'], ['set', 'ting'], ['com', 'po', 'si', 'tion'], ['com', 'po', 'si', 'tion'], ['to'], ['break', 'ing'], ['in', 'ter', 'na', 'tion', 'al']], 13, 1], ['breaking com-', 'position', 'international', 'setting com-', 'position', 'composition', 'to breaking', 'international']), ('ladder of three hyphenated lines', [[['in', 'ter', 'na', 'tion', 'al'], ['com', 'po', 'si', 'tion'], ['hy', 'phen', 'a', 'tion'], ['text']], 7, 2], ['inter-', 'nation-', 'al', 'compo-', 'sition', 'hyphen-', 'ation', 'text']), ('last word never hyphenated', [[['a'], ['com', 'po', 'si', 'tion']], 8, 2], ['a', 'composition']), ('control layout', [[['line'], ['lead', 'ing'], ['in', 'ter', 'na', 'tion', 'al'], ['mar', 'gin'], ['set', 'ting'], ['col', 'umn'], ['jus', 'ti', 'fied'], ['of'], ['col', 'umn'], ['pa', 'ra', 'graph'], ['a']], 13, 3], ['line leading', 'international', 'margin set-', 'ting column', 'justified of', 'column para-', 'graph a']), ('control layout', [[['col', 'umn'], ['pa', 'ra', 'graph'], ['text'], ['pa', 'ra', 'graph'], ['break', 'ing'], ['of'], ['hy', 'phen', 'a', 'tion'], ['kern', 'ing'], ['of'], ['jus', 'ti', 'fied'], ['in', 'ter', 'na', 'tion', 'al']], 11, 2], ['column pa-', 'ragraph', 'text para-', 'graph', 'breaking of', 'hyphenation', 'kerning of', 'justified', 'international'])], [('regression: ladder limit comparison', [[['pa', 'ra', 'graph'], ['in', 'ter', 'na', 'tion', 'al'], ['type'], ['break', 'ing'], ['set', 'ting'], ['hy', 'phen', 'a', 'tion'], ['set', 'ting'], ['jus', 'ti', 'fied'], ['text']], 9, 1], ['paragraph', 'interna-', 'tional', 'type', 'breaking', 'setting', 'hyphena-', 'tion', 'setting', 'justified', 'text']), ('regression: ladder limit comparison', [[['lead', 'ing'], ['type'], ['col', 'umn'], ['col', 'umn'], ['hy', 'phen', 'a', 'tion'], ['line'], ['in', 'ter', 'na', 'tion', 'al'], ['pa', 'ra', 'graph']], 9, 1], ['leading', 'type col-', 'umn', 'column', 'hyphena-', 'tion line', 'interna-', 'tional', 'paragraph']), ('regression: ladder limit comparison', [[['mar', 'gin'], ['of'], ['col', 'umn'], ['in', 'ter', 'na', 'tion', 'al'], ['in', 'ter', 'na', 'tion', 'al'], ['kern', 'ing'], ['mar', 'gin'], ['pa', 'ra', 'graph']], 8, 2], ['margin', 'of col-', 'umn in-', 'ternational', 'interna-', 'tional', 'kerning', 'margin', 'paragraph']), ('partial-repair probe', [[['of'], ['jus', 'ti', 'fied'], ['set', 'ting'], ['com', 'po', 'si', 'tion'], ['in', 'ter', 'na', 'tion', 'al'], ['com', 'po', 'si', 'tion'], ['in', 'ter', 'na', 'tion', 'al'], ['pa', 'ra', 'graph'], ['break', 'ing']], 8, 3], ['of jus-', 'tified', 'setting', 'composi-', 'tion in-', 'terna-', 'tional', 'composi-', 'tion in-', 'terna-', 'tional', 'para-', 'graph', 'breaking']), ('ladder of three hyphenated lines', [[['in', 'ter', 'na', 'tion', 'al'], ['com', 'po', 'si', 'tion'], ['hy', 'phen', 'a', 'tion'], ['text']], 7, 2], ['inter-', 'nation-', 'al', 'compo-', 'sition', 'hyphen-', 'ation', 'text']), ('last word never hyphenated', [[['a'], ['com', 'po', 'si', 'tion']], 8, 2], ['a', 'composition']), ('control layout', [[['lead', 'ing'], ['pa', 'ra', 'graph'], ['to'], ['mar', 'gin'], ['line'], ['jus', 'ti', 'fied']], 14, 3], ['leading para-', 'graph to mar-', 'gin line', 'justified']), ('control layout', [[['of'], ['type'], ['type'], ['com', 'po', 'si', 'tion'], ['text'], ['jus', 'ti', 'fied'], ['hy', 'phen', 'a', 'tion']], 9, 3], ['of type', 'type com-', 'position', 'text jus-', 'tified', 'hyphenation'])], [('regression: ladder limit comparison', [[['line'], ['in', 'ter', 'na', 'tion', 'al'], ['in', 'ter', 'na', 'tion', 'al'], ['text'], ['com', 'po', 'si', 'tion'], ['to'], ['hy', 'phen', 'a', 'tion'], ['in', 'ter', 'na', 'tion', 'al'], ['kern', 'ing'], ['com', 'po', 'si', 'tion'], ['text'], ['hy', 'phen', 'a', 'tion']], 13, 1], ['line interna-', 'tional', 'international', 'text composi-', 'tion to', 'hyphenation', 'international', 'kerning com-', 'position text', 'hyphenation']), ('regression: ladder limit comparison', [[['lead', 'ing'], ['lead', 'ing'], ['set', 'ting'], ['kern', 'ing'], ['break', 'ing'], ['type'], ['mar', 'gin'], ['type'], ['set', 'ting'], ['com', 'po', 'si', 'tion'], ['in', 'ter', 'na', 'tion', 'al'], ['jus', 'ti', 'fied']], 8, 2], ['leading', 'leading', 'setting', 'kerning', 'breaking', 'type', 'margin', 'type', 'setting', 'composi-', 'tion in-', 'ternational', 'justified']), ('regression: ladder limit comparison', [[['a'], ['kern', 'ing'], ['in', 'ter', 'na', 'tion', 'al'], ['set', 'ting'], ['pa', 'ra', 'graph']], 11, 1], ['a kerning', 'interna-', 'tional', 'setting', 'paragraph']), ('partial-repair probe', [[['set', 'ting'], ['lead', 'ing'], ['jus', 'ti', 'fied'], ['of'], ['in', 'ter', 'na', 'tion', 'al'], ['to'], ['jus', 'ti', 'fied'], ['mar', 'gin'], ['line']], 8, 1], ['setting', 'leading', 'justi-', 'fied of', 'interna-', 'tional', 'to jus-', 'tified', 'margin', 'line']), ('ladder of three hyphenated lines', [[['in', 'ter', 'na', 'tion', 'al'], ['com', 'po', 'si', 'tion'], ['hy', 'phen', 'a', 'tion'], ['text']], 7, 2], ['inter-', 'nation-', 'al', 'compo-', 'sition', 'hyphen-', 'ation', 'text']), ('last word never hyphenated', [[['a'], ['com', 'po', 'si', 'tion']], 8, 2], ['a', 'composition']), ('control layout', [[['type'], ['set', 'ting'], ['a'], ['a'], ['break', 'ing'], ['kern', 'ing'], ['mar', 'gin'], ['type'], ['of'], ['hy', 'phen', 'a', 'tion']], 10, 3], ['type set-', 'ting a a', 'breaking', 'kerning', 'margin', 'type of', 'hyphenation']), ('control layout', [[['break', 'ing'], ['mar', 'gin'], ['mar', 'gin'], ['lead', 'ing'], ['in', 'ter', 'na', 'tion', 'al'], ['line'], ['lead', 'ing']], 12, 2], ['breaking', 'margin mar-', 'gin leading', 'internation-', 'al line', 'leading'])]]\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":"6ad601e0d80479d3024b2b0b69abadf85480373397e9e334daee706220134aed","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    words, width, limit = x\n    queue = [list(w) for w in words]\n    lines = []\n    cur = ''\n    streak = 0\n    k = 0\n    while k < len(queue):\n        syl = queue[k]\n        token = ''.join(syl)\n        need = len(token) if cur == '' else len(cur) + 1 + len(token)\n        if need <= width:\n            cur = token if cur == '' else cur + ' ' + token\n            k += 1\n            continue\n        split = None\n        if streak < limit and k < len(queue) - 1:\n            for cut in range(len(syl) - 1, 0, -1):\n                head = ''.join(syl[:cut]) + '-'\n                room = len(head) if cur == '' else len(cur) + len(head) + 1\n                if room <= width:\n                    split = cut\n                    break\n        if split is not None:\n            head = ''.join(syl[:split]) + '-'\n            lines.append(head if cur == '' else cur + ' ' + head)\n            queue[k] = syl[split:]\n            cur = ''\n            streak += 1\n        elif cur == '':\n            lines.append(token)\n            k += 1\n            streak = 0\n        else:\n            lines.append(cur)\n            cur, streak = '', 0\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 = [[('ladder of three hyphenated lines', [[['in', 'ter', 'na', 'tion', 'al'], ['com', 'po', 'si', 'tion'], ['hy', 'phen', 'a', 'tion'], ['text']], 7, 2], ['inter-', 'nation-', 'al', 'compo-', 'sition', 'hyphen-', 'ation', 'text']), ('regression: ladder limit comparison', [[['to'], ['line'], ['com', 'po', 'si', 'tion'], ['mar', 'gin'], ['mar', 'gin'], ['type'], ['kern', 'ing'], ['in', 'ter', 'na', 'tion', 'al'], ['col', 'umn'], ['line'], ['com', 'po', 'si', 'tion'], ['to']], 14, 1], ['to line compo-', 'sition margin', 'margin type', 'kerning inter-', 'national', 'column line', 'composition to']), ('partial-repair probe', [[['jus', 'ti', 'fied'], ['pa', 'ra', 'graph'], ['jus', 'ti', 'fied'], ['pa', 'ra', 'graph'], ['kern', 'ing'], ['to'], ['lead', 'ing'], ['a']], 7, 1], ['justi-', 'fied', 'para-', 'graph', 'justi-', 'fied', 'para-', 'graph', 'kerning', 'to', 'leading', 'a']), ('partial-repair probe', [[['lead', 'ing'], ['a'], ['col', 'umn'], ['col', 'umn'], ['com', 'po', 'si', 'tion'], ['a']], 11, 2], ['leading a', 'column col-', 'umn compo-', 'sition a']), ('last word never hyphenated', [[['a'], ['com', 'po', 'si', 'tion']], 8, 2], ['a', 'composition']), ('control layout', [[['col', 'umn'], ['kern', 'ing'], ['text'], ['col', 'umn'], ['line'], ['line'], ['a']], 12, 2], ['column kern-', 'ing text', 'column line', 'line a']), ('control layout', [[['line'], ['of'], ['mar', 'gin'], ['a'], ['text'], ['line'], ['a'], ['pa', 'ra', 'graph'], ['of'], ['com', 'po', 'si', 'tion'], ['kern', 'ing'], ['break', 'ing']], 7, 3], ['line of', 'margin', 'a text', 'line a', 'para-', 'graph', 'of com-', 'posi-', 'tion', 'kerning', 'breaking']), ('control layout', [[['kern', 'ing'], ['hy', 'phen', 'a', 'tion'], ['type'], ['col', 'umn'], ['mar', 'gin'], ['kern', 'ing'], ['set', 'ting']], 8, 2], ['kerning', 'hyphena-', 'tion', 'type', 'column', 'margin', 'kerning', 'setting'])], [('regression: ladder limit comparison', [[['mar', 'gin'], ['mar', 'gin'], ['break', 'ing'], ['text'], ['of'], ['lead', 'ing'], ['hy', 'phen', 'a', 'tion'], ['in', 'ter', 'na', 'tion', 'al'], ['line']], 8, 2], ['margin', 'margin', 'breaking', 'text of', 'leading', 'hyphena-', 'tion in-', 'ternational', 'line']), ('regression: ladder limit comparison', [[['mar', 'gin'], ['kern', 'ing'], ['col', 'umn'], ['hy', 'phen', 'a', 'tion'], ['a'], ['col', 'umn'], ['pa', 'ra', 'graph']], 6, 1], ['margin', 'kern-', 'ing', 'column', 'hy-', 'phenation', 'a col-', 'umn', 'paragraph']), ('regression: ladder limit comparison', [[['kern', 'ing'], ['to'], ['kern', 'ing'], ['hy', 'phen', 'a', 'tion'], ['to'], ['hy', 'phen', 'a', 'tion'], ['mar', 'gin'], ['to'], ['pa', 'ra', 'graph']], 10, 1], ['kerning to', 'kerning', 'hyphena-', 'tion to', 'hyphena-', 'tion', 'margin to', 'paragraph']), ('partial-repair probe', [[['com', 'po', 'si', 'tion'], ['to'], ['break', 'ing'], ['to'], ['text'], ['jus', 'ti', 'fied'], ['set', 'ting'], ['of'], ['kern', 'ing']], 12, 2], ['composition', 'to breaking', 'to text jus-', 'tified set-', 'ting of', 'kerning']), ('last word never hyphenated', [[['a'], ['com', 'po', 'si', 'tion']], 8, 2], ['a', 'composition']), ('ladder of three hyphenated lines', [[['in', 'ter', 'na', 'tion', 'al'], ['com', 'po', 'si', 'tion'], ['hy', 'phen', 'a', 'tion'], ['text']], 7, 2], ['inter-', 'nation-', 'al', 'compo-', 'sition', 'hyphen-', 'ation', 'text']), ('control layout', [[['lead', 'ing'], ['break', 'ing'], ['a'], ['in', 'ter', 'na', 'tion', 'al'], ['a'], ['mar', 'gin'], ['text'], ['pa', 'ra', 'graph'], ['line']], 12, 3], ['leading', 'breaking a', 'internation-', 'al a margin', 'text para-', 'graph line']), ('control layout', [[['col', 'umn'], ['pa', 'ra', 'graph'], ['text'], ['pa', 'ra', 'graph'], ['break', 'ing'], ['of'], ['hy', 'phen', 'a', 'tion'], ['kern', 'ing'], ['of'], ['jus', 'ti', 'fied'], ['in', 'ter', 'na', 'tion', 'al']], 11, 2], ['column pa-', 'ragraph', 'text para-', 'graph', 'breaking of', 'hyphenation', 'kerning of', 'justified', 'international'])], [('regression: ladder limit comparison', [[['jus', 'ti', 'fied'], ['to'], ['type'], ['of'], ['kern', 'ing'], ['com', 'po', 'si', 'tion'], ['to'], ['kern', 'ing'], ['in', 'ter', 'na', 'tion', 'al'], ['lead', 'ing'], ['type'], ['hy', 'phen', 'a', 'tion']], 14, 3], ['justified to', 'type of kern-', 'ing composi-', 'tion to kern-', 'ing', 'international', 'leading type', 'hyphenation']), ('regression: ladder limit comparison', [[['com', 'po', 'si', 'tion'], ['jus', 'ti', 'fied'], ['hy', 'phen', 'a', 'tion'], ['set', 'ting'], ['mar', 'gin'], ['com', 'po', 'si', 'tion']], 6, 1], ['compo-', 'sition', 'justi-', 'fied', 'hy-', 'phenation', 'set-', 'ting', 'margin', 'composition']), ('partial-repair probe', [[['text'], ['col', 'umn'], ['text'], ['a'], ['jus', 'ti', 'fied'], ['com', 'po', 'si', 'tion'], ['hy', 'phen', 'a', 'tion'], ['to'], ['text'], ['a']], 7, 1], ['text', 'column', 'text a', 'justi-', 'fied', 'compo-', 'sition', 'hyphen-', 'ation', 'to text', 'a']), ('regression: ladder limit comparison', [[['break', 'ing'], ['com', 'po', 'si', 'tion'], ['in', 'ter', 'na', 'tion', 'al'], ['set', 'ting'], ['com', 'po', 'si', 'tion'], ['com', 'po', 'si', 'tion'], ['to'], ['break', 'ing'], ['in', 'ter', 'na', 'tion', 'al']], 13, 1], ['breaking com-', 'position', 'international', 'setting com-', 'position', 'composition', 'to breaking', 'international']), ('ladder of three hyphenated lines', [[['in', 'ter', 'na', 'tion', 'al'], ['com', 'po', 'si', 'tion'], ['hy', 'phen', 'a', 'tion'], ['text']], 7, 2], ['inter-', 'nation-', 'al', 'compo-', 'sition', 'hyphen-', 'ation', 'text']), ('last word never hyphenated', [[['a'], ['com', 'po', 'si', 'tion']], 8, 2], ['a', 'composition']), ('control layout', [[['line'], ['lead', 'ing'], ['in', 'ter', 'na', 'tion', 'al'], ['mar', 'gin'], ['set', 'ting'], ['col', 'umn'], ['jus', 'ti', 'fied'], ['of'], ['col', 'umn'], ['pa', 'ra', 'graph'], ['a']], 13, 3], ['line leading', 'international', 'margin set-', 'ting column', 'justified of', 'column para-', 'graph a']), ('control layout', [[['col', 'umn'], ['pa', 'ra', 'graph'], ['text'], ['pa', 'ra', 'graph'], ['break', 'ing'], ['of'], ['hy', 'phen', 'a', 'tion'], ['kern', 'ing'], ['of'], ['jus', 'ti', 'fied'], ['in', 'ter', 'na', 'tion', 'al']], 11, 2], ['column pa-', 'ragraph', 'text para-', 'graph', 'breaking of', 'hyphenation', 'kerning of', 'justified', 'international'])], [('regression: ladder limit comparison', [[['pa', 'ra', 'graph'], ['in', 'ter', 'na', 'tion', 'al'], ['type'], ['break', 'ing'], ['set', 'ting'], ['hy', 'phen', 'a', 'tion'], ['set', 'ting'], ['jus', 'ti', 'fied'], ['text']], 9, 1], ['paragraph', 'interna-', 'tional', 'type', 'breaking', 'setting', 'hyphena-', 'tion', 'setting', 'justified', 'text']), ('regression: ladder limit comparison', [[['lead', 'ing'], ['type'], ['col', 'umn'], ['col', 'umn'], ['hy', 'phen', 'a', 'tion'], ['line'], ['in', 'ter', 'na', 'tion', 'al'], ['pa', 'ra', 'graph']], 9, 1], ['leading', 'type col-', 'umn', 'column', 'hyphena-', 'tion line', 'interna-', 'tional', 'paragraph']), ('regression: ladder limit comparison', [[['mar', 'gin'], ['of'], ['col', 'umn'], ['in', 'ter', 'na', 'tion', 'al'], ['in', 'ter', 'na', 'tion', 'al'], ['kern', 'ing'], ['mar', 'gin'], ['pa', 'ra', 'graph']], 8, 2], ['margin', 'of col-', 'umn in-', 'ternational', 'interna-', 'tional', 'kerning', 'margin', 'paragraph']), ('partial-repair probe', [[['of'], ['jus', 'ti', 'fied'], ['set', 'ting'], ['com', 'po', 'si', 'tion'], ['in', 'ter', 'na', 'tion', 'al'], ['com', 'po', 'si', 'tion'], ['in', 'ter', 'na', 'tion', 'al'], ['pa', 'ra', 'graph'], ['break', 'ing']], 8, 3], ['of jus-', 'tified', 'setting', 'composi-', 'tion in-', 'terna-', 'tional', 'composi-', 'tion in-', 'terna-', 'tional', 'para-', 'graph', 'breaking']), ('ladder of three hyphenated lines', [[['in', 'ter', 'na', 'tion', 'al'], ['com', 'po', 'si', 'tion'], ['hy', 'phen', 'a', 'tion'], ['text']], 7, 2], ['inter-', 'nation-', 'al', 'compo-', 'sition', 'hyphen-', 'ation', 'text']), ('last word never hyphenated', [[['a'], ['com', 'po', 'si', 'tion']], 8, 2], ['a', 'composition']), ('control layout', [[['lead', 'ing'], ['pa', 'ra', 'graph'], ['to'], ['mar', 'gin'], ['line'], ['jus', 'ti', 'fied']], 14, 3], ['leading para-', 'graph to mar-', 'gin line', 'justified']), ('control layout', [[['of'], ['type'], ['type'], ['com', 'po', 'si', 'tion'], ['text'], ['jus', 'ti', 'fied'], ['hy', 'phen', 'a', 'tion']], 9, 3], ['of type', 'type com-', 'position', 'text jus-', 'tified', 'hyphenation'])], [('regression: ladder limit comparison', [[['line'], ['in', 'ter', 'na', 'tion', 'al'], ['in', 'ter', 'na', 'tion', 'al'], ['text'], ['com', 'po', 'si', 'tion'], ['to'], ['hy', 'phen', 'a', 'tion'], ['in', 'ter', 'na', 'tion', 'al'], ['kern', 'ing'], ['com', 'po', 'si', 'tion'], ['text'], ['hy', 'phen', 'a', 'tion']], 13, 1], ['line interna-', 'tional', 'international', 'text composi-', 'tion to', 'hyphenation', 'international', 'kerning com-', 'position text', 'hyphenation']), ('regression: ladder limit comparison', [[['lead', 'ing'], ['lead', 'ing'], ['set', 'ting'], ['kern', 'ing'], ['break', 'ing'], ['type'], ['mar', 'gin'], ['type'], ['set', 'ting'], ['com', 'po', 'si', 'tion'], ['in', 'ter', 'na', 'tion', 'al'], ['jus', 'ti', 'fied']], 8, 2], ['leading', 'leading', 'setting', 'kerning', 'breaking', 'type', 'margin', 'type', 'setting', 'composi-', 'tion in-', 'ternational', 'justified']), ('regression: ladder limit comparison', [[['a'], ['kern', 'ing'], ['in', 'ter', 'na', 'tion', 'al'], ['set', 'ting'], ['pa', 'ra', 'graph']], 11, 1], ['a kerning', 'interna-', 'tional', 'setting', 'paragraph']), ('partial-repair probe', [[['set', 'ting'], ['lead', 'ing'], ['jus', 'ti', 'fied'], ['of'], ['in', 'ter', 'na', 'tion', 'al'], ['to'], ['jus', 'ti', 'fied'], ['mar', 'gin'], ['line']], 8, 1], ['setting', 'leading', 'justi-', 'fied of', 'interna-', 'tional', 'to jus-', 'tified', 'margin', 'line']), ('ladder of three hyphenated lines', [[['in', 'ter', 'na', 'tion', 'al'], ['com', 'po', 'si', 'tion'], ['hy', 'phen', 'a', 'tion'], ['text']], 7, 2], ['inter-', 'nation-', 'al', 'compo-', 'sition', 'hyphen-', 'ation', 'text']), ('last word never hyphenated', [[['a'], ['com', 'po', 'si', 'tion']], 8, 2], ['a', 'composition']), ('control layout', [[['type'], ['set', 'ting'], ['a'], ['a'], ['break', 'ing'], ['kern', 'ing'], ['mar', 'gin'], ['type'], ['of'], ['hy', 'phen', 'a', 'tion']], 10, 3], ['type set-', 'ting a a', 'breaking', 'kerning', 'margin', 'type of', 'hyphenation']), ('control layout', [[['break', 'ing'], ['mar', 'gin'], ['mar', 'gin'], ['lead', 'ing'], ['in', 'ter', 'na', 'tion', 'al'], ['line'], ['lead', 'ing']], 12, 2], ['breaking', 'margin mar-', 'gin leading', 'internation-', 'al line', 'leading'])]]\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-hyphen-ladder-ladder-limit-comparison","generated_at":"2026-09-29T14:49:49.569668+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":"Permit a split only while the streak is below the limit.","root_cause":"The limit check uses <= so the streak may reach limit+1.","sha256":"94f7146e92b51b200f7eb0014fc521454a652c0c3f5a60beaa979a77bc8f988a","title":"Consecutive hyphen limit: ladder limit comparison · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.888,"exit_code":1,"observations":[{"actual":["inter-","national","compo-","sition","hyphen-","ation","text"],"check":"ladder of three hyphenated lines","expected":["inter-","nation-","al","compo-","sition","hyphen-","ation","text"],"passed":false},{"actual":["to line","composition","margin margin","type kerning","international","column line","composition to"],"check":"regression: ladder limit comparison","expected":["to line compo-","sition margin","margin type","kerning inter-","national","column line","composition to"],"passed":false},{"actual":["justified","paragraph","justified","paragraph","kerning","to","leading","a"],"check":"partial-repair probe","expected":["justi-","fied","para-","graph","justi-","fied","para-","graph","kerning","to","leading","a"],"passed":false},{"actual":["leading a","column col-","umn","composition","a"],"check":"partial-repair probe","expected":["leading a","column col-","umn compo-","sition a"],"passed":false},{"actual":["a","composition"],"check":"last word never hyphenated","expected":["a","composition"],"passed":true},{"actual":["column kern-","ing text","column line","line a"],"check":"control layout","expected":["column kern-","ing text","column line","line a"],"passed":true},{"actual":["line of","margin","a text","line a","para-","graph","of com-","posi-","tion","kerning","breaking"],"check":"control layout","expected":["line of","margin","a text","line a","para-","graph","of com-","posi-","tion","kerning","breaking"],"passed":true},{"actual":["kerning","hyphena-","tion","type","column","margin","kerning","setting"],"check":"control layout","expected":["kerning","hyphena-","tion","type","column","margin","kerning","setting"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"ladder of three hyphenated lines\", \"actual\": [\"inter-\", \"national\", \"compo-\", \"sition\", \"hyphen-\", \"ation\", \"text\"], \"expected\": [\"inter-\", \"nation-\", \"al\", \"compo-\", \"sition\", \"hyphen-\", \"ation\", \"text\"], \"passed\": false}, {\"check\": \"regression: ladder limit comparison\", \"actual\": [\"to line\", \"composition\", \"margin margin\", \"type kerning\", \"international\", \"column line\", \"composition to\"], \"expected\": [\"to line compo-\", \"sition margin\", \"margin type\", \"kerning inter-\", \"national\", \"column line\", \"composition to\"], \"passed\": false}, {\"check\": \"partial-repair probe\", \"actual\": [\"justified\", \"paragraph\", \"justified\", \"paragraph\", \"kerning\", \"to\", \"leading\", \"a\"], \"expected\": [\"justi-\", \"fied\", \"para-\", \"graph\", \"justi-\", \"fied\", \"para-\", \"graph\", \"kerning\", \"to\", \"leading\", \"a\"], \"passed\": false}, {\"check\": \"partial-repair probe\", \"actual\": [\"leading a\", \"column col-\", \"umn\", \"composition\", \"a\"], \"expected\": [\"leading a\", \"column col-\", \"umn compo-\", \"sition a\"], \"passed\": false}, {\"check\": \"last word never hyphenated\", \"actual\": [\"a\", \"composition\"], \"expected\": [\"a\", \"composition\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"column kern-\", \"ing text\", \"column line\", \"line a\"], \"expected\": [\"column kern-\", \"ing text\", \"column line\", \"line a\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"line of\", \"margin\", \"a text\", \"line a\", \"para-\", \"graph\", \"of com-\", \"posi-\", \"tion\", \"kerning\", \"breaking\"], \"expected\": [\"line of\", \"margin\", \"a text\", \"line a\", \"para-\", \"graph\", \"of com-\", \"posi-\", \"tion\", \"kerning\", \"breaking\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"kerning\", \"hyphena-\", \"tion\", \"type\", \"column\", \"margin\", \"kerning\", \"setting\"], \"expected\": [\"kerning\", \"hyphena-\", \"tion\", \"type\", \"column\", \"margin\", \"kerning\", \"setting\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":50.15,"exit_code":1,"observations":[{"actual":["inter-","nation-","al com-","position","hyphen-","ation","text"],"check":"ladder of three hyphenated lines","expected":["inter-","nation-","al","compo-","sition","hyphen-","ation","text"],"passed":false},{"actual":["to line compo-","sition margin","margin type","kerning inter-","national col-","umn line","composition to"],"check":"regression: ladder limit comparison","expected":["to line compo-","sition margin","margin type","kerning inter-","national","column line","composition to"],"passed":false},{"actual":["justi-","fied","para-","graph","justi-","fied","para-","graph","kerning","to","leading","a"],"check":"partial-repair probe","expected":["justi-","fied","para-","graph","justi-","fied","para-","graph","kerning","to","leading","a"],"passed":true},{"actual":["leading a","column col-","umn compo-","sition a"],"check":"partial-repair probe","expected":["leading a","column col-","umn compo-","sition a"],"passed":true},{"actual":["a","composition"],"check":"last word never hyphenated","expected":["a","composition"],"passed":true},{"actual":["column kern-","ing text","column line","line a"],"check":"control layout","expected":["column kern-","ing text","column line","line a"],"passed":true},{"actual":["line of","margin","a text","line a","para-","graph","of com-","posi-","tion","kerning","breaking"],"check":"control layout","expected":["line of","margin","a text","line a","para-","graph","of com-","posi-","tion","kerning","breaking"],"passed":true},{"actual":["kerning","hyphena-","tion","type","column","margin","kerning","setting"],"check":"control layout","expected":["kerning","hyphena-","tion","type","column","margin","kerning","setting"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"ladder of three hyphenated lines\", \"actual\": [\"inter-\", \"nation-\", \"al com-\", \"position\", \"hyphen-\", \"ation\", \"text\"], \"expected\": [\"inter-\", \"nation-\", \"al\", \"compo-\", \"sition\", \"hyphen-\", \"ation\", \"text\"], \"passed\": false}, {\"check\": \"regression: ladder limit comparison\", \"actual\": [\"to line compo-\", \"sition margin\", \"margin type\", \"kerning inter-\", \"national col-\", \"umn line\", \"composition to\"], \"expected\": [\"to line compo-\", \"sition margin\", \"margin type\", \"kerning inter-\", \"national\", \"column line\", \"composition to\"], \"passed\": false}, {\"check\": \"partial-repair probe\", \"actual\": [\"justi-\", \"fied\", \"para-\", \"graph\", \"justi-\", \"fied\", \"para-\", \"graph\", \"kerning\", \"to\", \"leading\", \"a\"], \"expected\": [\"justi-\", \"fied\", \"para-\", \"graph\", \"justi-\", \"fied\", \"para-\", \"graph\", \"kerning\", \"to\", \"leading\", \"a\"], \"passed\": true}, {\"check\": \"partial-repair probe\", \"actual\": [\"leading a\", \"column col-\", \"umn compo-\", \"sition a\"], \"expected\": [\"leading a\", \"column col-\", \"umn compo-\", \"sition a\"], \"passed\": true}, {\"check\": \"last word never hyphenated\", \"actual\": [\"a\", \"composition\"], \"expected\": [\"a\", \"composition\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"column kern-\", \"ing text\", \"column line\", \"line a\"], \"expected\": [\"column kern-\", \"ing text\", \"column line\", \"line a\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"line of\", \"margin\", \"a text\", \"line a\", \"para-\", \"graph\", \"of com-\", \"posi-\", \"tion\", \"kerning\", \"breaking\"], \"expected\": [\"line of\", \"margin\", \"a text\", \"line a\", \"para-\", \"graph\", \"of com-\", \"posi-\", \"tion\", \"kerning\", \"breaking\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"kerning\", \"hyphena-\", \"tion\", \"type\", \"column\", \"margin\", \"kerning\", \"setting\"], \"expected\": [\"kerning\", \"hyphena-\", \"tion\", \"type\", \"column\", \"margin\", \"kerning\", \"setting\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.223,"exit_code":0,"observations":[{"actual":["inter-","nation-","al","compo-","sition","hyphen-","ation","text"],"check":"ladder of three hyphenated lines","expected":["inter-","nation-","al","compo-","sition","hyphen-","ation","text"],"passed":true},{"actual":["to line compo-","sition margin","margin type","kerning inter-","national","column line","composition to"],"check":"regression: ladder limit comparison","expected":["to line compo-","sition margin","margin type","kerning inter-","national","column line","composition to"],"passed":true},{"actual":["justi-","fied","para-","graph","justi-","fied","para-","graph","kerning","to","leading","a"],"check":"partial-repair probe","expected":["justi-","fied","para-","graph","justi-","fied","para-","graph","kerning","to","leading","a"],"passed":true},{"actual":["leading a","column col-","umn compo-","sition a"],"check":"partial-repair probe","expected":["leading a","column col-","umn compo-","sition a"],"passed":true},{"actual":["a","composition"],"check":"last word never hyphenated","expected":["a","composition"],"passed":true},{"actual":["column kern-","ing text","column line","line a"],"check":"control layout","expected":["column kern-","ing text","column line","line a"],"passed":true},{"actual":["line of","margin","a text","line a","para-","graph","of com-","posi-","tion","kerning","breaking"],"check":"control layout","expected":["line of","margin","a text","line a","para-","graph","of com-","posi-","tion","kerning","breaking"],"passed":true},{"actual":["kerning","hyphena-","tion","type","column","margin","kerning","setting"],"check":"control layout","expected":["kerning","hyphena-","tion","type","column","margin","kerning","setting"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"ladder of three hyphenated lines\", \"actual\": [\"inter-\", \"nation-\", \"al\", \"compo-\", \"sition\", \"hyphen-\", \"ation\", \"text\"], \"expected\": [\"inter-\", \"nation-\", \"al\", \"compo-\", \"sition\", \"hyphen-\", \"ation\", \"text\"], \"passed\": true}, {\"check\": \"regression: ladder limit comparison\", \"actual\": [\"to line compo-\", \"sition margin\", \"margin type\", \"kerning inter-\", \"national\", \"column line\", \"composition to\"], \"expected\": [\"to line compo-\", \"sition margin\", \"margin type\", \"kerning inter-\", \"national\", \"column line\", \"composition to\"], \"passed\": true}, {\"check\": \"partial-repair probe\", \"actual\": [\"justi-\", \"fied\", \"para-\", \"graph\", \"justi-\", \"fied\", \"para-\", \"graph\", \"kerning\", \"to\", \"leading\", \"a\"], \"expected\": [\"justi-\", \"fied\", \"para-\", \"graph\", \"justi-\", \"fied\", \"para-\", \"graph\", \"kerning\", \"to\", \"leading\", \"a\"], \"passed\": true}, {\"check\": \"partial-repair probe\", \"actual\": [\"leading a\", \"column col-\", \"umn compo-\", \"sition a\"], \"expected\": [\"leading a\", \"column col-\", \"umn compo-\", \"sition a\"], \"passed\": true}, {\"check\": \"last word never hyphenated\", \"actual\": [\"a\", \"composition\"], \"expected\": [\"a\", \"composition\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"column kern-\", \"ing text\", \"column line\", \"line a\"], \"expected\": [\"column kern-\", \"ing text\", \"column line\", \"line a\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"line of\", \"margin\", \"a text\", \"line a\", \"para-\", \"graph\", \"of com-\", \"posi-\", \"tion\", \"kerning\", \"breaking\"], \"expected\": [\"line of\", \"margin\", \"a text\", \"line a\", \"para-\", \"graph\", \"of com-\", \"posi-\", \"tion\", \"kerning\", \"breaking\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"kerning\", \"hyphena-\", \"tion\", \"type\", \"column\", \"margin\", \"kerning\", \"setting\"], \"expected\": [\"kerning\", \"hyphena-\", \"tion\", \"type\", \"column\", \"margin\", \"kerning\", \"setting\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}