{"abstract":"Hyphens leave too-short heads or tails.","category":"Typography line breaking","checks":8,"contract":"Input [words as syllables, width, zone, min word length, min chars before, min chars after, hyphenate capitals]. Greedy fill. A word that does not fit may be hyphenated only if the slack left on the line (width minus current text minus the separating space) is at least the zone, the word has at least min-word characters, and (capitals allowed or its first letter is not uppercase). Pick the latest syllable boundary with head >= min before and tail >= min after chars whose head plus \"-\" fits. Return lines.","contract_signature":"x","evaluation_group":"w2-typography-line-breaking-hyphenation-zone","failed_approach":"Making the head check strict rejects legal heads.","family":"w2-typography-line-breaking-hyphenation-zone-before-after-minimums","id":"FA-80231","implementations":{"attempt":{"sha256":"326a9064f3913c589224c514a39ab0c4e2c73382685548920993160d20cdcd70","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    words, width, zone, min_word, min_before, min_after, caps = x\n    lines = []\n    cur = ''\n    k = 0\n    queue = [list(w) for w in words]\n    while k < len(queue):\n        syl = queue[k]\n        token = ''.join(syl)\n        cand = token if not cur else cur + ' ' + token\n        if len(cand) <= width:\n            cur = cand\n            k += 1\n            continue\n        slack = width - len(cur) - (1 if cur else 0)\n        eligible = slack >= zone and len(token) >= min_word and (caps or not token[0].isupper())\n        cut = None\n        if eligible:\n            for c in range(len(syl) - 1, 0, -1):\n                head = ''.join(syl[:c])\n                tail = ''.join(syl[c:])\n                if len(head) <= min_before or len(tail) < min_after:\n                    continue\n                fit = len(head) + 1 if not cur else len(cur) + len(head) + 2\n                if fit <= width:\n                    cut = c\n                    break\n        if cut is not None:\n            head = ''.join(syl[:cut]) + '-'\n            lines.append(head if not cur else cur + ' ' + head)\n            queue[k] = syl[cut:]\n            cur = ''\n        elif cur:\n            lines.append(cur)\n            cur = ''\n        else:\n            cur = token\n            k += 1\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 = [[('regression: before/after minimums', [[['Mc', 'Don', 'ald'], ['rag', 'ged'], ['e', 'Book', 'ing'], ['ty', 'po', 'gra', 'phy'], ['Ber', 'lin'], ['ty', 'po', 'gra', 'phy'], ['a'], ['rag', 'ged'], ['ty', 'po', 'gra', 'phy']], 11, 3, 6, 1, 2, False], ['McDonald', 'ragged e-', 'Booking ty-', 'pography', 'Berlin ty-', 'pography a', 'ragged ty-', 'pography']), ('regression: before/after minimums', [[['of'], ['im', 'por', 'tant'], ['of'], ['on', 'ly'], ['hy', 'phen', 'at', 'ed'], ['the'], ['hy', 'phen', 'at', 'ed'], ['a']], 12, 4, 7, 3, 2, True], ['of important', 'of only', 'hyphenated', 'the hyphen-', 'ated a']), ('partial-repair probe', [[['in', 'ter', 'na', 'tion', 'al'], ['Mc', 'Don', 'ald'], ['a'], ['e', 'Book', 'ing'], ['ty', 'po', 'gra', 'phy'], ['rag', 'ged'], ['rag', 'ged'], ['on', 'ly'], ['hy', 'phen', 'at', 'ed']], 12, 5, 4, 3, 3, False], ['interna-', 'tional', 'McDonald a', 'eBooking', 'typography', 'ragged rag-', 'ged only', 'hyphenated']), ('regression: before/after minimums', [[['Mc', 'Don', 'ald'], ['im', 'por', 'tant'], ['ty', 'po', 'gra', 'phy'], ['a'], ['e', 'Book', 'ing'], ['im', 'por', 'tant'], ['Mc', 'Don', 'ald'], ['in', 'ter', 'na', 'tion', 'al'], ['Mc', 'Don', 'ald']], 13, 2, 5, 1, 3, True], ['McDonald im-', 'portant typo-', 'graphy a e-', 'Booking im-', 'portant Mc-', 'Donald inter-', 'national Mc-', 'Donald']), ('zone exactly met', [[['the'], ['ty', 'po', 'gra', 'phy']], 10, 6, 4, 2, 2, False], ['the typo-', 'graphy']), ('capitalised word protected', [[['the'], ['Mc', 'Don', 'ald']], 10, 2, 4, 2, 2, False], ['the', 'McDonald']), ('control layout', [[['e', 'Book', 'ing'], ['ty', 'po', 'gra', 'phy'], ['a'], ['im', 'por', 'tant'], ['on', 'ly'], ['rag', 'ged'], ['the'], ['set']], 15, 5, 5, 2, 3, True], ['eBooking typo-', 'graphy a impor-', 'tant only rag-', 'ged the set']), ('control layout', [[['Mc', 'Don', 'ald'], ['ty', 'po', 'gra', 'phy'], ['Ber', 'lin'], ['on', 'ly'], ['hy', 'phen', 'at', 'ed'], ['Ber', 'lin'], ['Ber', 'lin'], ['Ber', 'lin'], ['e', 'Book', 'ing']], 14, 2, 4, 2, 2, False], ['McDonald typo-', 'graphy Berlin', 'only hyphenat-', 'ed Berlin', 'Berlin Berlin', 'eBooking'])], [('regression: before/after minimums', [[['im', 'por', 'tant'], ['im', 'por', 'tant'], ['a'], ['ty', 'po', 'gra', 'phy'], ['ty', 'po', 'gra', 'phy'], ['set'], ['rag', 'ged'], ['ty', 'po', 'gra', 'phy'], ['of'], ['rag', 'ged']], 13, 1, 4, 2, 3, False], ['important im-', 'portant a ty-', 'pography ty-', 'pography set', 'ragged typo-', 'graphy of', 'ragged']), ('regression: before/after minimums', [[['e', 'Book', 'ing'], ['Mc', 'Don', 'ald'], ['Ber', 'lin'], ['hy', 'phen', 'at', 'ed'], ['the'], ['ty', 'po', 'gra', 'phy'], ['im', 'por', 'tant']], 9, 1, 4, 1, 3, True], ['eBooking', 'McDonald', 'Berlin', 'hyphen-', 'ated the', 'typogra-', 'phy im-', 'portant']), ('partial-repair probe', [[['a'], ['Ber', 'lin'], ['im', 'por', 'tant'], ['ty', 'po', 'gra', 'phy'], ['e', 'Book', 'ing'], ['Ber', 'lin'], ['a'], ['im', 'por', 'tant']], 14, 5, 7, 2, 2, False], ['a Berlin im-', 'portant typo-', 'graphy eBook-', 'ing Berlin a', 'important']), ('partial-repair probe', [[['im', 'por', 'tant'], ['on', 'ly'], ['rag', 'ged'], ['set'], ['the']], 9, 4, 4, 3, 2, False], ['important', 'only rag-', 'ged set', 'the']), ('capitalised word protected', [[['the'], ['Mc', 'Don', 'ald']], 10, 2, 4, 2, 2, False], ['the', 'McDonald']), ('zone exactly met', [[['the'], ['ty', 'po', 'gra', 'phy']], 10, 6, 4, 2, 2, False], ['the typo-', 'graphy']), ('control layout', [[['a'], ['on', 'ly'], ['ty', 'po', 'gra', 'phy'], ['set']], 14, 3, 4, 3, 2, True], ['a only typo-', 'graphy set']), ('control layout', [[['a'], ['Mc', 'Don', 'ald'], ['e', 'Book', 'ing'], ['set'], ['ty', 'po', 'gra', 'phy'], ['rag', 'ged'], ['a']], 14, 2, 5, 2, 2, True], ['a McDonald', 'eBooking set', 'typography', 'ragged a'])], [('regression: before/after minimums', [[['rag', 'ged'], ['the'], ['hy', 'phen', 'at', 'ed'], ['Ber', 'lin'], ['e', 'Book', 'ing'], ['set'], ['of'], ['the'], ['im', 'por', 'tant']], 12, 5, 7, 2, 3, True], ['ragged the', 'hyphenated', 'Berlin', 'eBooking set', 'of the im-', 'portant']), ('regression: before/after minimums', [[['a'], ['of'], ['ty', 'po', 'gra', 'phy'], ['on', 'ly'], ['hy', 'phen', 'at', 'ed'], ['ty', 'po', 'gra', 'phy']], 13, 3, 4, 3, 2, False], ['a of typogra-', 'phy only', 'hyphenated', 'typography']), ('regression: before/after minimums', [[['the'], ['set'], ['hy', 'phen', 'at', 'ed'], ['Mc', 'Don', 'ald']], 12, 4, 7, 2, 3, False], ['the set hy-', 'phenated', 'McDonald']), ('regression: before/after minimums', [[['Mc', 'Don', 'ald'], ['Ber', 'lin'], ['Mc', 'Don', 'ald'], ['e', 'Book', 'ing'], ['on', 'ly'], ['ty', 'po', 'gra', 'phy'], ['ty', 'po', 'gra', 'phy'], ['rag', 'ged'], ['ty', 'po', 'gra', 'phy']], 9, 4, 6, 2, 3, False], ['McDonald', 'Berlin', 'McDonald', 'eBooking', 'only ty-', 'pography', 'typogra-', 'phy rag-', 'ged typo-', 'graphy']), ('zone exactly met', [[['the'], ['ty', 'po', 'gra', 'phy']], 10, 6, 4, 2, 2, False], ['the typo-', 'graphy']), ('capitalised word protected', [[['the'], ['Mc', 'Don', 'ald']], 10, 2, 4, 2, 2, False], ['the', 'McDonald']), ('control layout', [[['the'], ['ty', 'po', 'gra', 'phy'], ['ty', 'po', 'gra', 'phy'], ['set'], ['rag', 'ged'], ['set'], ['Mc', 'Don', 'ald'], ['rag', 'ged']], 8, 5, 4, 1, 2, True], ['the', 'typogra-', 'phy', 'typogra-', 'phy set', 'ragged', 'set', 'McDonald', 'ragged']), ('control layout', [[['set'], ['the'], ['the'], ['set'], ['e', 'Book', 'ing'], ['on', 'ly'], ['in', 'ter', 'na', 'tion', 'al']], 13, 1, 5, 3, 3, True], ['set the the', 'set eBooking', 'only interna-', 'tional'])], [('regression: before/after minimums', [[['Mc', 'Don', 'ald'], ['im', 'por', 'tant'], ['Mc', 'Don', 'ald'], ['set'], ['Mc', 'Don', 'ald'], ['the'], ['hy', 'phen', 'at', 'ed'], ['e', 'Book', 'ing'], ['im', 'por', 'tant']], 11, 2, 5, 2, 3, True], ['McDonald', 'important', 'McDonald', 'set McDon-', 'ald the hy-', 'phenated', 'eBooking', 'important']), ('regression: before/after minimums', [[['rag', 'ged'], ['e', 'Book', 'ing'], ['of'], ['ty', 'po', 'gra', 'phy'], ['im', 'por', 'tant'], ['of'], ['e', 'Book', 'ing'], ['rag', 'ged'], ['Ber', 'lin'], ['Mc', 'Don', 'ald']], 13, 5, 6, 1, 2, True], ['ragged eBook-', 'ing of typo-', 'graphy impor-', 'tant of e-', 'Booking rag-', 'ged Berlin', 'McDonald']), ('regression: before/after minimums', [[['the'], ['set'], ['hy', 'phen', 'at', 'ed'], ['Mc', 'Don', 'ald']], 12, 4, 7, 2, 3, False], ['the set hy-', 'phenated', 'McDonald']), ('partial-repair probe', [[['in', 'ter', 'na', 'tion', 'al'], ['Mc', 'Don', 'ald'], ['a'], ['e', 'Book', 'ing'], ['ty', 'po', 'gra', 'phy'], ['rag', 'ged'], ['rag', 'ged'], ['on', 'ly'], ['hy', 'phen', 'at', 'ed']], 12, 5, 4, 3, 3, False], ['interna-', 'tional', 'McDonald a', 'eBooking', 'typography', 'ragged rag-', 'ged only', 'hyphenated']), ('capitalised word protected', [[['the'], ['Mc', 'Don', 'ald']], 10, 2, 4, 2, 2, False], ['the', 'McDonald']), ('zone exactly met', [[['the'], ['ty', 'po', 'gra', 'phy']], 10, 6, 4, 2, 2, False], ['the typo-', 'graphy']), ('control layout', [[['rag', 'ged'], ['rag', 'ged'], ['set'], ['im', 'por', 'tant'], ['set'], ['e', 'Book', 'ing'], ['Mc', 'Don', 'ald'], ['hy', 'phen', 'at', 'ed']], 16, 4, 5, 3, 3, True], ['ragged ragged', 'set important', 'set eBooking', 'McDonald hyphen-', 'ated']), ('control layout', [[['hy', 'phen', 'at', 'ed'], ['Mc', 'Don', 'ald'], ['of'], ['set'], ['in', 'ter', 'na', 'tion', 'al']], 12, 4, 6, 2, 2, False], ['hyphenated', 'McDonald of', 'set interna-', 'tional'])], [('regression: before/after minimums', [[['Ber', 'lin'], ['the'], ['hy', 'phen', 'at', 'ed'], ['the'], ['Mc', 'Don', 'ald'], ['set'], ['in', 'ter', 'na', 'tion', 'al']], 8, 1, 7, 2, 3, False], ['Berlin', 'the hy-', 'phenated', 'the', 'McDonald', 'set in-', 'terna-', 'tional']), ('regression: before/after minimums', [[['the'], ['hy', 'phen', 'at', 'ed'], ['rag', 'ged'], ['the'], ['the'], ['set']], 8, 3, 5, 3, 2, False], ['the', 'hyphen-', 'ated', 'ragged', 'the the', 'set']), ('regression: before/after minimums', [[['Mc', 'Don', 'ald'], ['Ber', 'lin'], ['Mc', 'Don', 'ald'], ['e', 'Book', 'ing'], ['on', 'ly'], ['ty', 'po', 'gra', 'phy'], ['ty', 'po', 'gra', 'phy'], ['rag', 'ged'], ['ty', 'po', 'gra', 'phy']], 9, 4, 6, 2, 3, False], ['McDonald', 'Berlin', 'McDonald', 'eBooking', 'only ty-', 'pography', 'typogra-', 'phy rag-', 'ged typo-', 'graphy']), ('regression: before/after minimums', [[['im', 'por', 'tant'], ['e', 'Book', 'ing'], ['e', 'Book', 'ing'], ['rag', 'ged']], 15, 1, 4, 1, 2, True], ['important e-', 'Booking eBook-', 'ing ragged']), ('zone exactly met', [[['the'], ['ty', 'po', 'gra', 'phy']], 10, 6, 4, 2, 2, False], ['the typo-', 'graphy']), ('capitalised word protected', [[['the'], ['Mc', 'Don', 'ald']], 10, 2, 4, 2, 2, False], ['the', 'McDonald']), ('control layout', [[['Mc', 'Don', 'ald'], ['im', 'por', 'tant'], ['Ber', 'lin'], ['Mc', 'Don', 'ald'], ['rag', 'ged'], ['Mc', 'Don', 'ald'], ['Mc', 'Don', 'ald']], 10, 5, 6, 3, 3, True], ['McDonald', 'important', 'Berlin', 'McDonald', 'ragged', 'McDonald', 'McDonald']), ('control layout', [[['e', 'Book', 'ing'], ['Mc', 'Don', 'ald'], ['e', 'Book', 'ing'], ['the'], ['on', 'ly'], ['ty', 'po', 'gra', 'phy']], 11, 3, 4, 2, 3, True], ['eBooking', 'McDonald', 'eBooking', 'the only', 'typography'])]]\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":"f167648459d603cb4710412c8b9258099305e1d9a5b181894a7f40d5dbc9fd62","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    words, width, zone, min_word, min_before, min_after, caps = x\n    lines = []\n    cur = ''\n    k = 0\n    queue = [list(w) for w in words]\n    while k < len(queue):\n        syl = queue[k]\n        token = ''.join(syl)\n        cand = token if not cur else cur + ' ' + token\n        if len(cand) <= width:\n            cur = cand\n            k += 1\n            continue\n        slack = width - len(cur) - (1 if cur else 0)\n        eligible = slack >= zone and len(token) >= min_word and (caps or not token[0].isupper())\n        cut = None\n        if eligible:\n            for c in range(len(syl) - 1, 0, -1):\n                head = ''.join(syl[:c])\n                tail = ''.join(syl[c:])\n                if len(head) < min_after or len(tail) < min_before:\n                    continue\n                fit = len(head) + 1 if not cur else len(cur) + len(head) + 2\n                if fit <= width:\n                    cut = c\n                    break\n        if cut is not None:\n            head = ''.join(syl[:cut]) + '-'\n            lines.append(head if not cur else cur + ' ' + head)\n            queue[k] = syl[cut:]\n            cur = ''\n        elif cur:\n            lines.append(cur)\n            cur = ''\n        else:\n            cur = token\n            k += 1\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 = [[('regression: before/after minimums', [[['Mc', 'Don', 'ald'], ['rag', 'ged'], ['e', 'Book', 'ing'], ['ty', 'po', 'gra', 'phy'], ['Ber', 'lin'], ['ty', 'po', 'gra', 'phy'], ['a'], ['rag', 'ged'], ['ty', 'po', 'gra', 'phy']], 11, 3, 6, 1, 2, False], ['McDonald', 'ragged e-', 'Booking ty-', 'pography', 'Berlin ty-', 'pography a', 'ragged ty-', 'pography']), ('regression: before/after minimums', [[['of'], ['im', 'por', 'tant'], ['of'], ['on', 'ly'], ['hy', 'phen', 'at', 'ed'], ['the'], ['hy', 'phen', 'at', 'ed'], ['a']], 12, 4, 7, 3, 2, True], ['of important', 'of only', 'hyphenated', 'the hyphen-', 'ated a']), ('partial-repair probe', [[['in', 'ter', 'na', 'tion', 'al'], ['Mc', 'Don', 'ald'], ['a'], ['e', 'Book', 'ing'], ['ty', 'po', 'gra', 'phy'], ['rag', 'ged'], ['rag', 'ged'], ['on', 'ly'], ['hy', 'phen', 'at', 'ed']], 12, 5, 4, 3, 3, False], ['interna-', 'tional', 'McDonald a', 'eBooking', 'typography', 'ragged rag-', 'ged only', 'hyphenated']), ('regression: before/after minimums', [[['Mc', 'Don', 'ald'], ['im', 'por', 'tant'], ['ty', 'po', 'gra', 'phy'], ['a'], ['e', 'Book', 'ing'], ['im', 'por', 'tant'], ['Mc', 'Don', 'ald'], ['in', 'ter', 'na', 'tion', 'al'], ['Mc', 'Don', 'ald']], 13, 2, 5, 1, 3, True], ['McDonald im-', 'portant typo-', 'graphy a e-', 'Booking im-', 'portant Mc-', 'Donald inter-', 'national Mc-', 'Donald']), ('zone exactly met', [[['the'], ['ty', 'po', 'gra', 'phy']], 10, 6, 4, 2, 2, False], ['the typo-', 'graphy']), ('capitalised word protected', [[['the'], ['Mc', 'Don', 'ald']], 10, 2, 4, 2, 2, False], ['the', 'McDonald']), ('control layout', [[['e', 'Book', 'ing'], ['ty', 'po', 'gra', 'phy'], ['a'], ['im', 'por', 'tant'], ['on', 'ly'], ['rag', 'ged'], ['the'], ['set']], 15, 5, 5, 2, 3, True], ['eBooking typo-', 'graphy a impor-', 'tant only rag-', 'ged the set']), ('control layout', [[['Mc', 'Don', 'ald'], ['ty', 'po', 'gra', 'phy'], ['Ber', 'lin'], ['on', 'ly'], ['hy', 'phen', 'at', 'ed'], ['Ber', 'lin'], ['Ber', 'lin'], ['Ber', 'lin'], ['e', 'Book', 'ing']], 14, 2, 4, 2, 2, False], ['McDonald typo-', 'graphy Berlin', 'only hyphenat-', 'ed Berlin', 'Berlin Berlin', 'eBooking'])], [('regression: before/after minimums', [[['im', 'por', 'tant'], ['im', 'por', 'tant'], ['a'], ['ty', 'po', 'gra', 'phy'], ['ty', 'po', 'gra', 'phy'], ['set'], ['rag', 'ged'], ['ty', 'po', 'gra', 'phy'], ['of'], ['rag', 'ged']], 13, 1, 4, 2, 3, False], ['important im-', 'portant a ty-', 'pography ty-', 'pography set', 'ragged typo-', 'graphy of', 'ragged']), ('regression: before/after minimums', [[['e', 'Book', 'ing'], ['Mc', 'Don', 'ald'], ['Ber', 'lin'], ['hy', 'phen', 'at', 'ed'], ['the'], ['ty', 'po', 'gra', 'phy'], ['im', 'por', 'tant']], 9, 1, 4, 1, 3, True], ['eBooking', 'McDonald', 'Berlin', 'hyphen-', 'ated the', 'typogra-', 'phy im-', 'portant']), ('partial-repair probe', [[['a'], ['Ber', 'lin'], ['im', 'por', 'tant'], ['ty', 'po', 'gra', 'phy'], ['e', 'Book', 'ing'], ['Ber', 'lin'], ['a'], ['im', 'por', 'tant']], 14, 5, 7, 2, 2, False], ['a Berlin im-', 'portant typo-', 'graphy eBook-', 'ing Berlin a', 'important']), ('partial-repair probe', [[['im', 'por', 'tant'], ['on', 'ly'], ['rag', 'ged'], ['set'], ['the']], 9, 4, 4, 3, 2, False], ['important', 'only rag-', 'ged set', 'the']), ('capitalised word protected', [[['the'], ['Mc', 'Don', 'ald']], 10, 2, 4, 2, 2, False], ['the', 'McDonald']), ('zone exactly met', [[['the'], ['ty', 'po', 'gra', 'phy']], 10, 6, 4, 2, 2, False], ['the typo-', 'graphy']), ('control layout', [[['a'], ['on', 'ly'], ['ty', 'po', 'gra', 'phy'], ['set']], 14, 3, 4, 3, 2, True], ['a only typo-', 'graphy set']), ('control layout', [[['a'], ['Mc', 'Don', 'ald'], ['e', 'Book', 'ing'], ['set'], ['ty', 'po', 'gra', 'phy'], ['rag', 'ged'], ['a']], 14, 2, 5, 2, 2, True], ['a McDonald', 'eBooking set', 'typography', 'ragged a'])], [('regression: before/after minimums', [[['rag', 'ged'], ['the'], ['hy', 'phen', 'at', 'ed'], ['Ber', 'lin'], ['e', 'Book', 'ing'], ['set'], ['of'], ['the'], ['im', 'por', 'tant']], 12, 5, 7, 2, 3, True], ['ragged the', 'hyphenated', 'Berlin', 'eBooking set', 'of the im-', 'portant']), ('regression: before/after minimums', [[['a'], ['of'], ['ty', 'po', 'gra', 'phy'], ['on', 'ly'], ['hy', 'phen', 'at', 'ed'], ['ty', 'po', 'gra', 'phy']], 13, 3, 4, 3, 2, False], ['a of typogra-', 'phy only', 'hyphenated', 'typography']), ('regression: before/after minimums', [[['the'], ['set'], ['hy', 'phen', 'at', 'ed'], ['Mc', 'Don', 'ald']], 12, 4, 7, 2, 3, False], ['the set hy-', 'phenated', 'McDonald']), ('regression: before/after minimums', [[['Mc', 'Don', 'ald'], ['Ber', 'lin'], ['Mc', 'Don', 'ald'], ['e', 'Book', 'ing'], ['on', 'ly'], ['ty', 'po', 'gra', 'phy'], ['ty', 'po', 'gra', 'phy'], ['rag', 'ged'], ['ty', 'po', 'gra', 'phy']], 9, 4, 6, 2, 3, False], ['McDonald', 'Berlin', 'McDonald', 'eBooking', 'only ty-', 'pography', 'typogra-', 'phy rag-', 'ged typo-', 'graphy']), ('zone exactly met', [[['the'], ['ty', 'po', 'gra', 'phy']], 10, 6, 4, 2, 2, False], ['the typo-', 'graphy']), ('capitalised word protected', [[['the'], ['Mc', 'Don', 'ald']], 10, 2, 4, 2, 2, False], ['the', 'McDonald']), ('control layout', [[['the'], ['ty', 'po', 'gra', 'phy'], ['ty', 'po', 'gra', 'phy'], ['set'], ['rag', 'ged'], ['set'], ['Mc', 'Don', 'ald'], ['rag', 'ged']], 8, 5, 4, 1, 2, True], ['the', 'typogra-', 'phy', 'typogra-', 'phy set', 'ragged', 'set', 'McDonald', 'ragged']), ('control layout', [[['set'], ['the'], ['the'], ['set'], ['e', 'Book', 'ing'], ['on', 'ly'], ['in', 'ter', 'na', 'tion', 'al']], 13, 1, 5, 3, 3, True], ['set the the', 'set eBooking', 'only interna-', 'tional'])], [('regression: before/after minimums', [[['Mc', 'Don', 'ald'], ['im', 'por', 'tant'], ['Mc', 'Don', 'ald'], ['set'], ['Mc', 'Don', 'ald'], ['the'], ['hy', 'phen', 'at', 'ed'], ['e', 'Book', 'ing'], ['im', 'por', 'tant']], 11, 2, 5, 2, 3, True], ['McDonald', 'important', 'McDonald', 'set McDon-', 'ald the hy-', 'phenated', 'eBooking', 'important']), ('regression: before/after minimums', [[['rag', 'ged'], ['e', 'Book', 'ing'], ['of'], ['ty', 'po', 'gra', 'phy'], ['im', 'por', 'tant'], ['of'], ['e', 'Book', 'ing'], ['rag', 'ged'], ['Ber', 'lin'], ['Mc', 'Don', 'ald']], 13, 5, 6, 1, 2, True], ['ragged eBook-', 'ing of typo-', 'graphy impor-', 'tant of e-', 'Booking rag-', 'ged Berlin', 'McDonald']), ('regression: before/after minimums', [[['the'], ['set'], ['hy', 'phen', 'at', 'ed'], ['Mc', 'Don', 'ald']], 12, 4, 7, 2, 3, False], ['the set hy-', 'phenated', 'McDonald']), ('partial-repair probe', [[['in', 'ter', 'na', 'tion', 'al'], ['Mc', 'Don', 'ald'], ['a'], ['e', 'Book', 'ing'], ['ty', 'po', 'gra', 'phy'], ['rag', 'ged'], ['rag', 'ged'], ['on', 'ly'], ['hy', 'phen', 'at', 'ed']], 12, 5, 4, 3, 3, False], ['interna-', 'tional', 'McDonald a', 'eBooking', 'typography', 'ragged rag-', 'ged only', 'hyphenated']), ('capitalised word protected', [[['the'], ['Mc', 'Don', 'ald']], 10, 2, 4, 2, 2, False], ['the', 'McDonald']), ('zone exactly met', [[['the'], ['ty', 'po', 'gra', 'phy']], 10, 6, 4, 2, 2, False], ['the typo-', 'graphy']), ('control layout', [[['rag', 'ged'], ['rag', 'ged'], ['set'], ['im', 'por', 'tant'], ['set'], ['e', 'Book', 'ing'], ['Mc', 'Don', 'ald'], ['hy', 'phen', 'at', 'ed']], 16, 4, 5, 3, 3, True], ['ragged ragged', 'set important', 'set eBooking', 'McDonald hyphen-', 'ated']), ('control layout', [[['hy', 'phen', 'at', 'ed'], ['Mc', 'Don', 'ald'], ['of'], ['set'], ['in', 'ter', 'na', 'tion', 'al']], 12, 4, 6, 2, 2, False], ['hyphenated', 'McDonald of', 'set interna-', 'tional'])], [('regression: before/after minimums', [[['Ber', 'lin'], ['the'], ['hy', 'phen', 'at', 'ed'], ['the'], ['Mc', 'Don', 'ald'], ['set'], ['in', 'ter', 'na', 'tion', 'al']], 8, 1, 7, 2, 3, False], ['Berlin', 'the hy-', 'phenated', 'the', 'McDonald', 'set in-', 'terna-', 'tional']), ('regression: before/after minimums', [[['the'], ['hy', 'phen', 'at', 'ed'], ['rag', 'ged'], ['the'], ['the'], ['set']], 8, 3, 5, 3, 2, False], ['the', 'hyphen-', 'ated', 'ragged', 'the the', 'set']), ('regression: before/after minimums', [[['Mc', 'Don', 'ald'], ['Ber', 'lin'], ['Mc', 'Don', 'ald'], ['e', 'Book', 'ing'], ['on', 'ly'], ['ty', 'po', 'gra', 'phy'], ['ty', 'po', 'gra', 'phy'], ['rag', 'ged'], ['ty', 'po', 'gra', 'phy']], 9, 4, 6, 2, 3, False], ['McDonald', 'Berlin', 'McDonald', 'eBooking', 'only ty-', 'pography', 'typogra-', 'phy rag-', 'ged typo-', 'graphy']), ('regression: before/after minimums', [[['im', 'por', 'tant'], ['e', 'Book', 'ing'], ['e', 'Book', 'ing'], ['rag', 'ged']], 15, 1, 4, 1, 2, True], ['important e-', 'Booking eBook-', 'ing ragged']), ('zone exactly met', [[['the'], ['ty', 'po', 'gra', 'phy']], 10, 6, 4, 2, 2, False], ['the typo-', 'graphy']), ('capitalised word protected', [[['the'], ['Mc', 'Don', 'ald']], 10, 2, 4, 2, 2, False], ['the', 'McDonald']), ('control layout', [[['Mc', 'Don', 'ald'], ['im', 'por', 'tant'], ['Ber', 'lin'], ['Mc', 'Don', 'ald'], ['rag', 'ged'], ['Mc', 'Don', 'ald'], ['Mc', 'Don', 'ald']], 10, 5, 6, 3, 3, True], ['McDonald', 'important', 'Berlin', 'McDonald', 'ragged', 'McDonald', 'McDonald']), ('control layout', [[['e', 'Book', 'ing'], ['Mc', 'Don', 'ald'], ['e', 'Book', 'ing'], ['the'], ['on', 'ly'], ['ty', 'po', 'gra', 'phy']], 11, 3, 4, 2, 3, True], ['eBooking', 'McDonald', 'eBooking', 'the only', 'typography'])]]\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-hyphenation-zone-before-after-minimums","generated_at":"2026-09-29T14:49:51.951759+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.","root_cause":"The head is checked against the after minimum and the tail against the before minimum.","sha256":"8e29b33ba6a5c540aba0b3d24c503f4ffa90869c8b767b603438c241645d1bbb","title":"Ragged-right hyphenation zone: before/after minimums · 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.288,"exit_code":1,"observations":[{"actual":["McDonald","ragged","eBooking","typography","Berlin ty-","pography a","ragged ty-","pography"],"check":"regression: before/after minimums","expected":["McDonald","ragged e-","Booking ty-","pography","Berlin ty-","pography a","ragged ty-","pography"],"passed":false},{"actual":["of important","of only","hyphenated","the hyphen-","ated a"],"check":"regression: before/after minimums","expected":["of important","of only","hyphenated","the hyphen-","ated a"],"passed":true},{"actual":["interna-","tional","McDonald a","eBooking","typography","ragged","ragged only","hyphenated"],"check":"partial-repair probe","expected":["interna-","tional","McDonald a","eBooking","typography","ragged rag-","ged only","hyphenated"],"passed":false},{"actual":["McDonald im-","portant typo-","graphy a","eBooking im-","portant Mc-","Donald inter-","national Mc-","Donald"],"check":"regression: before/after minimums","expected":["McDonald im-","portant typo-","graphy a e-","Booking im-","portant Mc-","Donald inter-","national Mc-","Donald"],"passed":false},{"actual":["the typo-","graphy"],"check":"zone exactly met","expected":["the typo-","graphy"],"passed":true},{"actual":["the","McDonald"],"check":"capitalised word protected","expected":["the","McDonald"],"passed":true},{"actual":["eBooking typo-","graphy a impor-","tant only rag-","ged the set"],"check":"control layout","expected":["eBooking typo-","graphy a impor-","tant only rag-","ged the set"],"passed":true},{"actual":["McDonald typo-","graphy Berlin","only hyphenat-","ed Berlin","Berlin Berlin","eBooking"],"check":"control layout","expected":["McDonald typo-","graphy Berlin","only hyphenat-","ed Berlin","Berlin Berlin","eBooking"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: before/after minimums\", \"actual\": [\"McDonald\", \"ragged\", \"eBooking\", \"typography\", \"Berlin ty-\", \"pography a\", \"ragged ty-\", \"pography\"], \"expected\": [\"McDonald\", \"ragged e-\", \"Booking ty-\", \"pography\", \"Berlin ty-\", \"pography a\", \"ragged ty-\", \"pography\"], \"passed\": false}, {\"check\": \"regression: before/after minimums\", \"actual\": [\"of important\", \"of only\", \"hyphenated\", \"the hyphen-\", \"ated a\"], \"expected\": [\"of important\", \"of only\", \"hyphenated\", \"the hyphen-\", \"ated a\"], \"passed\": true}, {\"check\": \"partial-repair probe\", \"actual\": [\"interna-\", \"tional\", \"McDonald a\", \"eBooking\", \"typography\", \"ragged\", \"ragged only\", \"hyphenated\"], \"expected\": [\"interna-\", \"tional\", \"McDonald a\", \"eBooking\", \"typography\", \"ragged rag-\", \"ged only\", \"hyphenated\"], \"passed\": false}, {\"check\": \"regression: before/after minimums\", \"actual\": [\"McDonald im-\", \"portant typo-\", \"graphy a\", \"eBooking im-\", \"portant Mc-\", \"Donald inter-\", \"national Mc-\", \"Donald\"], \"expected\": [\"McDonald im-\", \"portant typo-\", \"graphy a e-\", \"Booking im-\", \"portant Mc-\", \"Donald inter-\", \"national Mc-\", \"Donald\"], \"passed\": false}, {\"check\": \"zone exactly met\", \"actual\": [\"the typo-\", \"graphy\"], \"expected\": [\"the typo-\", \"graphy\"], \"passed\": true}, {\"check\": \"capitalised word protected\", \"actual\": [\"the\", \"McDonald\"], \"expected\": [\"the\", \"McDonald\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"eBooking typo-\", \"graphy a impor-\", \"tant only rag-\", \"ged the set\"], \"expected\": [\"eBooking typo-\", \"graphy a impor-\", \"tant only rag-\", \"ged the set\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"McDonald typo-\", \"graphy Berlin\", \"only hyphenat-\", \"ed Berlin\", \"Berlin Berlin\", \"eBooking\"], \"expected\": [\"McDonald typo-\", \"graphy Berlin\", \"only hyphenat-\", \"ed Berlin\", \"Berlin Berlin\", \"eBooking\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.064,"exit_code":1,"observations":[{"actual":["McDonald","ragged","eBooking","typography","Berlin ty-","pography a","ragged ty-","pography"],"check":"regression: before/after minimums","expected":["McDonald","ragged e-","Booking ty-","pography","Berlin ty-","pography a","ragged ty-","pography"],"passed":false},{"actual":["of important","of only hy-","phenated the","hyphenated a"],"check":"regression: before/after minimums","expected":["of important","of only","hyphenated","the hyphen-","ated a"],"passed":false},{"actual":["interna-","tional","McDonald a","eBooking","typography","ragged rag-","ged only","hyphenated"],"check":"partial-repair probe","expected":["interna-","tional","McDonald a","eBooking","typography","ragged rag-","ged only","hyphenated"],"passed":true},{"actual":["McDonald","important","typography a","eBooking","important","McDonald","international","McDonald"],"check":"regression: before/after minimums","expected":["McDonald im-","portant typo-","graphy a e-","Booking im-","portant Mc-","Donald inter-","national Mc-","Donald"],"passed":false},{"actual":["the typo-","graphy"],"check":"zone exactly met","expected":["the typo-","graphy"],"passed":true},{"actual":["the","McDonald"],"check":"capitalised word protected","expected":["the","McDonald"],"passed":true},{"actual":["eBooking typo-","graphy a impor-","tant only rag-","ged the set"],"check":"control layout","expected":["eBooking typo-","graphy a impor-","tant only rag-","ged the set"],"passed":true},{"actual":["McDonald typo-","graphy Berlin","only hyphenat-","ed Berlin","Berlin Berlin","eBooking"],"check":"control layout","expected":["McDonald typo-","graphy Berlin","only hyphenat-","ed Berlin","Berlin Berlin","eBooking"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: before/after minimums\", \"actual\": [\"McDonald\", \"ragged\", \"eBooking\", \"typography\", \"Berlin ty-\", \"pography a\", \"ragged ty-\", \"pography\"], \"expected\": [\"McDonald\", \"ragged e-\", \"Booking ty-\", \"pography\", \"Berlin ty-\", \"pography a\", \"ragged ty-\", \"pography\"], \"passed\": false}, {\"check\": \"regression: before/after minimums\", \"actual\": [\"of important\", \"of only hy-\", \"phenated the\", \"hyphenated a\"], \"expected\": [\"of important\", \"of only\", \"hyphenated\", \"the hyphen-\", \"ated a\"], \"passed\": false}, {\"check\": \"partial-repair probe\", \"actual\": [\"interna-\", \"tional\", \"McDonald a\", \"eBooking\", \"typography\", \"ragged rag-\", \"ged only\", \"hyphenated\"], \"expected\": [\"interna-\", \"tional\", \"McDonald a\", \"eBooking\", \"typography\", \"ragged rag-\", \"ged only\", \"hyphenated\"], \"passed\": true}, {\"check\": \"regression: before/after minimums\", \"actual\": [\"McDonald\", \"important\", \"typography a\", \"eBooking\", \"important\", \"McDonald\", \"international\", \"McDonald\"], \"expected\": [\"McDonald im-\", \"portant typo-\", \"graphy a e-\", \"Booking im-\", \"portant Mc-\", \"Donald inter-\", \"national Mc-\", \"Donald\"], \"passed\": false}, {\"check\": \"zone exactly met\", \"actual\": [\"the typo-\", \"graphy\"], \"expected\": [\"the typo-\", \"graphy\"], \"passed\": true}, {\"check\": \"capitalised word protected\", \"actual\": [\"the\", \"McDonald\"], \"expected\": [\"the\", \"McDonald\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"eBooking typo-\", \"graphy a impor-\", \"tant only rag-\", \"ged the set\"], \"expected\": [\"eBooking typo-\", \"graphy a impor-\", \"tant only rag-\", \"ged the set\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"McDonald typo-\", \"graphy Berlin\", \"only hyphenat-\", \"ed Berlin\", \"Berlin Berlin\", \"eBooking\"], \"expected\": [\"McDonald typo-\", \"graphy Berlin\", \"only hyphenat-\", \"ed Berlin\", \"Berlin Berlin\", \"eBooking\"], \"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."}}