{"abstract":"Words are not hyphenated when the slack exactly equals the zone.","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":"Lowering the zone by one hyphenates inside the zone.","family":"w2-typography-line-breaking-hyphenation-zone-zone-boundary","id":"FA-80211","implementations":{"attempt":{"sha256":"fa7a558869467fea0e78fd7c6a1ab32f62d14e784e0c873c6520b40b8dd4d783","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 - 1 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 = [[('zone exactly met', [[['the'], ['ty', 'po', 'gra', 'phy']], 10, 6, 4, 2, 2, False], ['the typo-', 'graphy']), ('regression: zone boundary', [[['hy', 'phen', 'at', 'ed'], ['e', 'Book', 'ing'], ['on', 'ly'], ['hy', 'phen', 'at', 'ed'], ['e', 'Book', 'ing'], ['on', 'ly']], 11, 2, 6, 1, 2, False], ['hyphenated', 'eBooking', 'only hy-', 'phenated e-', 'Booking', 'only']), ('partial-repair probe', [[['in', 'ter', 'na', 'tion', 'al'], ['a'], ['on', 'ly'], ['in', 'ter', 'na', 'tion', 'al'], ['ty', 'po', 'gra', 'phy']], 9, 5, 5, 1, 2, False], ['interna-', 'tional a', 'only', 'interna-', 'tional', 'typogra-', 'phy']), ('partial-repair probe', [[['Mc', 'Don', 'ald'], ['of'], ['the'], ['Mc', 'Don', 'ald'], ['im', 'por', 'tant'], ['e', 'Book', 'ing'], ['hy', 'phen', 'at', 'ed'], ['on', 'ly']], 8, 4, 4, 1, 2, False], ['McDonald', 'of the', 'McDonald', 'impor-', 'tant', 'eBooking', 'hyphen-', 'ated', 'only']), ('capitalised word protected', [[['the'], ['Mc', 'Don', 'ald']], 10, 2, 4, 2, 2, False], ['the', 'McDonald']), ('control layout', [[['rag', 'ged'], ['of'], ['the'], ['Ber', 'lin'], ['of'], ['Ber', 'lin'], ['set'], ['a'], ['rag', 'ged'], ['of']], 15, 1, 7, 3, 2, False], ['ragged of the', 'Berlin of', 'Berlin set a', 'ragged of']), ('control layout', [[['Ber', 'lin'], ['Ber', 'lin'], ['a'], ['in', 'ter', 'na', 'tion', 'al']], 11, 3, 5, 1, 2, False], ['Berlin', 'Berlin a', 'interna-', 'tional']), ('control layout', [[['Ber', 'lin'], ['e', 'Book', 'ing'], ['rag', 'ged'], ['hy', 'phen', 'at', 'ed']], 13, 3, 7, 3, 3, False], ['Berlin eBook-', 'ing ragged', 'hyphenated'])], [('regression: zone boundary', [[['ty', 'po', 'gra', 'phy'], ['hy', 'phen', 'at', 'ed'], ['of'], ['rag', 'ged'], ['hy', 'phen', 'at', 'ed'], ['e', 'Book', 'ing'], ['e', 'Book', 'ing'], ['im', 'por', 'tant'], ['the'], ['on', 'ly']], 16, 4, 5, 2, 3, False], ['typography hy-', 'phenated of rag-', 'ged hyphenated', 'eBooking eBook-', 'ing important', 'the only']), ('regression: zone boundary', [[['e', 'Book', 'ing'], ['in', 'ter', 'na', 'tion', 'al'], ['e', 'Book', 'ing'], ['Mc', 'Don', 'ald'], ['rag', 'ged'], ['of'], ['im', 'por', 'tant'], ['set'], ['in', 'ter', 'na', 'tion', 'al']], 14, 5, 7, 1, 3, False], ['eBooking in-', 'ternational', 'eBooking', 'McDonald', 'ragged of', 'important set', 'international']), ('partial-repair probe', [[['on', 'ly'], ['Mc', 'Don', 'ald'], ['rag', 'ged'], ['ty', 'po', 'gra', 'phy'], ['ty', 'po', 'gra', 'phy'], ['rag', 'ged'], ['Ber', 'lin'], ['im', 'por', 'tant'], ['a']], 10, 4, 4, 1, 2, False], ['only', 'McDonald', 'ragged', 'typography', 'typography', 'ragged', 'Berlin', 'important', 'a']), ('partial-repair probe', [[['rag', 'ged'], ['Mc', 'Don', 'ald'], ['on', 'ly'], ['ty', 'po', 'gra', 'phy']], 9, 5, 7, 1, 2, False], ['ragged', 'McDonald', 'only', 'typogra-', 'phy']), ('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', [[['of'], ['Ber', 'lin'], ['e', 'Book', 'ing'], ['im', 'por', 'tant'], ['of'], ['Ber', 'lin'], ['the']], 15, 3, 6, 1, 2, True], ['of Berlin e-', 'Booking impor-', 'tant of Berlin', 'the']), ('control layout', [[['ty', 'po', 'gra', 'phy'], ['set'], ['Mc', 'Don', 'ald'], ['the']], 15, 5, 4, 2, 3, True], ['typography set', 'McDonald the'])], [('regression: zone boundary', [[['im', 'por', 'tant'], ['Mc', 'Don', 'ald'], ['hy', 'phen', 'at', 'ed'], ['of'], ['hy', 'phen', 'at', 'ed'], ['rag', 'ged']], 12, 3, 5, 1, 2, True], ['important', 'McDonald hy-', 'phenated of', 'hyphenated', 'ragged']), ('regression: zone boundary', [[['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']), ('partial-repair probe', [[['the'], ['in', 'ter', 'na', 'tion', 'al'], ['on', 'ly'], ['hy', 'phen', 'at', 'ed'], ['in', 'ter', 'na', 'tion', 'al'], ['in', 'ter', 'na', 'tion', 'al'], ['ty', 'po', 'gra', 'phy'], ['ty', 'po', 'gra', 'phy']], 14, 4, 4, 2, 2, False], ['the interna-', 'tional only', 'hyphenated', 'international', 'international', 'typography', 'typography']), ('partial-repair probe', [[['rag', 'ged'], ['Ber', 'lin'], ['on', 'ly'], ['hy', 'phen', 'at', 'ed'], ['set'], ['Ber', 'lin']], 12, 4, 4, 2, 3, True], ['ragged Ber-', 'lin only', 'hyphenated', 'set Berlin']), ('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', [[['im', 'por', 'tant'], ['e', 'Book', 'ing'], ['in', 'ter', 'na', 'tion', 'al'], ['Mc', 'Don', 'ald'], ['of'], ['on', 'ly'], ['e', 'Book', 'ing'], ['rag', 'ged']], 9, 5, 7, 2, 3, False], ['important', 'eBooking', 'interna-', 'tional', 'McDonald', 'of only', 'eBooking', 'ragged']), ('control layout', [[['e', 'Book', 'ing'], ['on', 'ly'], ['Ber', 'lin'], ['in', 'ter', 'na', 'tion', 'al'], ['Ber', 'lin'], ['hy', 'phen', 'at', 'ed'], ['e', 'Book', 'ing']], 14, 3, 6, 1, 2, True], ['eBooking only', 'Berlin inter-', 'national Ber-', 'lin hyphenated', 'eBooking'])], [('regression: zone boundary', [[['e', 'Book', 'ing'], ['rag', 'ged'], ['ty', 'po', 'gra', 'phy'], ['Mc', 'Don', 'ald'], ['Mc', 'Don', 'ald'], ['of'], ['a'], ['on', 'ly']], 15, 4, 4, 1, 3, True], ['eBooking ragged', 'typography Mc-', 'Donald McDonald', 'of a only']), ('regression: zone boundary', [[['rag', 'ged'], ['rag', 'ged'], ['in', 'ter', 'na', 'tion', 'al'], ['a'], ['im', 'por', 'tant'], ['hy', 'phen', 'at', 'ed'], ['rag', 'ged'], ['e', 'Book', 'ing'], ['on', 'ly']], 10, 3, 5, 2, 2, True], ['ragged', 'ragged in-', 'ternation-', 'al a im-', 'portant', 'hyphenated', 'ragged', 'eBooking', 'only']), ('regression: zone boundary', [[['ty', 'po', 'gra', 'phy'], ['Mc', 'Don', 'ald'], ['hy', 'phen', 'at', 'ed'], ['the'], ['im', 'por', 'tant'], ['e', 'Book', 'ing'], ['Mc', 'Don', 'ald'], ['the'], ['in', 'ter', 'na', 'tion', 'al'], ['a']], 14, 5, 5, 1, 2, True], ['typography', 'McDonald hy-', 'phenated the', 'important', 'eBooking Mc-', 'Donald the', 'international', 'a']), ('partial-repair probe', [[['in', 'ter', 'na', 'tion', 'al'], ['a'], ['on', 'ly'], ['in', 'ter', 'na', 'tion', 'al'], ['ty', 'po', 'gra', 'phy']], 9, 5, 5, 1, 2, False], ['interna-', 'tional a', 'only', 'interna-', 'tional', 'typogra-', 'phy']), ('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', [[['of'], ['Ber', 'lin'], ['e', 'Book', 'ing'], ['Ber', 'lin'], ['Mc', 'Don', 'ald'], ['Mc', 'Don', 'ald'], ['Ber', 'lin'], ['e', 'Book', 'ing'], ['Mc', 'Don', 'ald'], ['e', 'Book', 'ing']], 10, 2, 7, 3, 3, False], ['of Berlin', 'eBooking', 'Berlin', 'McDonald', 'McDonald', 'Berlin', 'eBooking', 'McDonald', 'eBooking']), ('control layout', [[['hy', 'phen', 'at', 'ed'], ['im', 'por', 'tant'], ['the'], ['on', 'ly']], 14, 5, 6, 2, 2, True], ['hyphenated', 'important the', 'only'])], [('regression: zone boundary', [[['Mc', 'Don', 'ald'], ['in', 'ter', 'na', 'tion', 'al'], ['rag', 'ged'], ['the'], ['hy', 'phen', 'at', 'ed'], ['the'], ['of'], ['on', 'ly'], ['set']], 9, 5, 5, 1, 2, False], ['McDonald', 'interna-', 'tional', 'ragged', 'the hy-', 'phenated', 'the of', 'only set']), ('regression: zone boundary', [[['hy', 'phen', 'at', 'ed'], ['in', 'ter', 'na', 'tion', 'al'], ['im', 'por', 'tant'], ['the'], ['on', 'ly'], ['im', 'por', 'tant'], ['a'], ['Mc', 'Don', 'ald']], 15, 3, 5, 1, 3, False], ['hyphenated in-', 'ternational im-', 'portant the', 'only important', 'a McDonald']), ('partial-repair probe', [[['hy', 'phen', 'at', 'ed'], ['in', 'ter', 'na', 'tion', 'al'], ['on', 'ly'], ['set'], ['set'], ['im', 'por', 'tant'], ['hy', 'phen', 'at', 'ed']], 14, 5, 7, 2, 3, False], ['hyphenated', 'international', 'only set set', 'important', 'hyphenated']), ('partial-repair probe', [[['of'], ['rag', 'ged'], ['Mc', 'Don', 'ald'], ['the'], ['in', 'ter', 'na', 'tion', 'al']], 13, 4, 6, 1, 3, True], ['of ragged', 'McDonald the', 'international']), ('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', [[['set'], ['Ber', 'lin'], ['Ber', 'lin'], ['e', 'Book', 'ing'], ['the']], 14, 4, 7, 1, 3, True], ['set Berlin', 'Berlin eBook-', 'ing the']), ('control layout', [[['of'], ['rag', 'ged'], ['im', 'por', 'tant'], ['set'], ['ty', 'po', 'gra', 'phy']], 16, 1, 7, 1, 3, True], ['of ragged impor-', 'tant set typo-', 'graphy'])]]\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":"dbb66c162d84c09b91b1482fac97bc8dbb584e1ab0a35a98de29f1a572f25d7e","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 = [[('zone exactly met', [[['the'], ['ty', 'po', 'gra', 'phy']], 10, 6, 4, 2, 2, False], ['the typo-', 'graphy']), ('regression: zone boundary', [[['hy', 'phen', 'at', 'ed'], ['e', 'Book', 'ing'], ['on', 'ly'], ['hy', 'phen', 'at', 'ed'], ['e', 'Book', 'ing'], ['on', 'ly']], 11, 2, 6, 1, 2, False], ['hyphenated', 'eBooking', 'only hy-', 'phenated e-', 'Booking', 'only']), ('partial-repair probe', [[['in', 'ter', 'na', 'tion', 'al'], ['a'], ['on', 'ly'], ['in', 'ter', 'na', 'tion', 'al'], ['ty', 'po', 'gra', 'phy']], 9, 5, 5, 1, 2, False], ['interna-', 'tional a', 'only', 'interna-', 'tional', 'typogra-', 'phy']), ('partial-repair probe', [[['Mc', 'Don', 'ald'], ['of'], ['the'], ['Mc', 'Don', 'ald'], ['im', 'por', 'tant'], ['e', 'Book', 'ing'], ['hy', 'phen', 'at', 'ed'], ['on', 'ly']], 8, 4, 4, 1, 2, False], ['McDonald', 'of the', 'McDonald', 'impor-', 'tant', 'eBooking', 'hyphen-', 'ated', 'only']), ('capitalised word protected', [[['the'], ['Mc', 'Don', 'ald']], 10, 2, 4, 2, 2, False], ['the', 'McDonald']), ('control layout', [[['rag', 'ged'], ['of'], ['the'], ['Ber', 'lin'], ['of'], ['Ber', 'lin'], ['set'], ['a'], ['rag', 'ged'], ['of']], 15, 1, 7, 3, 2, False], ['ragged of the', 'Berlin of', 'Berlin set a', 'ragged of']), ('control layout', [[['Ber', 'lin'], ['Ber', 'lin'], ['a'], ['in', 'ter', 'na', 'tion', 'al']], 11, 3, 5, 1, 2, False], ['Berlin', 'Berlin a', 'interna-', 'tional']), ('control layout', [[['Ber', 'lin'], ['e', 'Book', 'ing'], ['rag', 'ged'], ['hy', 'phen', 'at', 'ed']], 13, 3, 7, 3, 3, False], ['Berlin eBook-', 'ing ragged', 'hyphenated'])], [('regression: zone boundary', [[['ty', 'po', 'gra', 'phy'], ['hy', 'phen', 'at', 'ed'], ['of'], ['rag', 'ged'], ['hy', 'phen', 'at', 'ed'], ['e', 'Book', 'ing'], ['e', 'Book', 'ing'], ['im', 'por', 'tant'], ['the'], ['on', 'ly']], 16, 4, 5, 2, 3, False], ['typography hy-', 'phenated of rag-', 'ged hyphenated', 'eBooking eBook-', 'ing important', 'the only']), ('regression: zone boundary', [[['e', 'Book', 'ing'], ['in', 'ter', 'na', 'tion', 'al'], ['e', 'Book', 'ing'], ['Mc', 'Don', 'ald'], ['rag', 'ged'], ['of'], ['im', 'por', 'tant'], ['set'], ['in', 'ter', 'na', 'tion', 'al']], 14, 5, 7, 1, 3, False], ['eBooking in-', 'ternational', 'eBooking', 'McDonald', 'ragged of', 'important set', 'international']), ('partial-repair probe', [[['on', 'ly'], ['Mc', 'Don', 'ald'], ['rag', 'ged'], ['ty', 'po', 'gra', 'phy'], ['ty', 'po', 'gra', 'phy'], ['rag', 'ged'], ['Ber', 'lin'], ['im', 'por', 'tant'], ['a']], 10, 4, 4, 1, 2, False], ['only', 'McDonald', 'ragged', 'typography', 'typography', 'ragged', 'Berlin', 'important', 'a']), ('partial-repair probe', [[['rag', 'ged'], ['Mc', 'Don', 'ald'], ['on', 'ly'], ['ty', 'po', 'gra', 'phy']], 9, 5, 7, 1, 2, False], ['ragged', 'McDonald', 'only', 'typogra-', 'phy']), ('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', [[['of'], ['Ber', 'lin'], ['e', 'Book', 'ing'], ['im', 'por', 'tant'], ['of'], ['Ber', 'lin'], ['the']], 15, 3, 6, 1, 2, True], ['of Berlin e-', 'Booking impor-', 'tant of Berlin', 'the']), ('control layout', [[['ty', 'po', 'gra', 'phy'], ['set'], ['Mc', 'Don', 'ald'], ['the']], 15, 5, 4, 2, 3, True], ['typography set', 'McDonald the'])], [('regression: zone boundary', [[['im', 'por', 'tant'], ['Mc', 'Don', 'ald'], ['hy', 'phen', 'at', 'ed'], ['of'], ['hy', 'phen', 'at', 'ed'], ['rag', 'ged']], 12, 3, 5, 1, 2, True], ['important', 'McDonald hy-', 'phenated of', 'hyphenated', 'ragged']), ('regression: zone boundary', [[['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']), ('partial-repair probe', [[['the'], ['in', 'ter', 'na', 'tion', 'al'], ['on', 'ly'], ['hy', 'phen', 'at', 'ed'], ['in', 'ter', 'na', 'tion', 'al'], ['in', 'ter', 'na', 'tion', 'al'], ['ty', 'po', 'gra', 'phy'], ['ty', 'po', 'gra', 'phy']], 14, 4, 4, 2, 2, False], ['the interna-', 'tional only', 'hyphenated', 'international', 'international', 'typography', 'typography']), ('partial-repair probe', [[['rag', 'ged'], ['Ber', 'lin'], ['on', 'ly'], ['hy', 'phen', 'at', 'ed'], ['set'], ['Ber', 'lin']], 12, 4, 4, 2, 3, True], ['ragged Ber-', 'lin only', 'hyphenated', 'set Berlin']), ('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', [[['im', 'por', 'tant'], ['e', 'Book', 'ing'], ['in', 'ter', 'na', 'tion', 'al'], ['Mc', 'Don', 'ald'], ['of'], ['on', 'ly'], ['e', 'Book', 'ing'], ['rag', 'ged']], 9, 5, 7, 2, 3, False], ['important', 'eBooking', 'interna-', 'tional', 'McDonald', 'of only', 'eBooking', 'ragged']), ('control layout', [[['e', 'Book', 'ing'], ['on', 'ly'], ['Ber', 'lin'], ['in', 'ter', 'na', 'tion', 'al'], ['Ber', 'lin'], ['hy', 'phen', 'at', 'ed'], ['e', 'Book', 'ing']], 14, 3, 6, 1, 2, True], ['eBooking only', 'Berlin inter-', 'national Ber-', 'lin hyphenated', 'eBooking'])], [('regression: zone boundary', [[['e', 'Book', 'ing'], ['rag', 'ged'], ['ty', 'po', 'gra', 'phy'], ['Mc', 'Don', 'ald'], ['Mc', 'Don', 'ald'], ['of'], ['a'], ['on', 'ly']], 15, 4, 4, 1, 3, True], ['eBooking ragged', 'typography Mc-', 'Donald McDonald', 'of a only']), ('regression: zone boundary', [[['rag', 'ged'], ['rag', 'ged'], ['in', 'ter', 'na', 'tion', 'al'], ['a'], ['im', 'por', 'tant'], ['hy', 'phen', 'at', 'ed'], ['rag', 'ged'], ['e', 'Book', 'ing'], ['on', 'ly']], 10, 3, 5, 2, 2, True], ['ragged', 'ragged in-', 'ternation-', 'al a im-', 'portant', 'hyphenated', 'ragged', 'eBooking', 'only']), ('regression: zone boundary', [[['ty', 'po', 'gra', 'phy'], ['Mc', 'Don', 'ald'], ['hy', 'phen', 'at', 'ed'], ['the'], ['im', 'por', 'tant'], ['e', 'Book', 'ing'], ['Mc', 'Don', 'ald'], ['the'], ['in', 'ter', 'na', 'tion', 'al'], ['a']], 14, 5, 5, 1, 2, True], ['typography', 'McDonald hy-', 'phenated the', 'important', 'eBooking Mc-', 'Donald the', 'international', 'a']), ('partial-repair probe', [[['in', 'ter', 'na', 'tion', 'al'], ['a'], ['on', 'ly'], ['in', 'ter', 'na', 'tion', 'al'], ['ty', 'po', 'gra', 'phy']], 9, 5, 5, 1, 2, False], ['interna-', 'tional a', 'only', 'interna-', 'tional', 'typogra-', 'phy']), ('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', [[['of'], ['Ber', 'lin'], ['e', 'Book', 'ing'], ['Ber', 'lin'], ['Mc', 'Don', 'ald'], ['Mc', 'Don', 'ald'], ['Ber', 'lin'], ['e', 'Book', 'ing'], ['Mc', 'Don', 'ald'], ['e', 'Book', 'ing']], 10, 2, 7, 3, 3, False], ['of Berlin', 'eBooking', 'Berlin', 'McDonald', 'McDonald', 'Berlin', 'eBooking', 'McDonald', 'eBooking']), ('control layout', [[['hy', 'phen', 'at', 'ed'], ['im', 'por', 'tant'], ['the'], ['on', 'ly']], 14, 5, 6, 2, 2, True], ['hyphenated', 'important the', 'only'])], [('regression: zone boundary', [[['Mc', 'Don', 'ald'], ['in', 'ter', 'na', 'tion', 'al'], ['rag', 'ged'], ['the'], ['hy', 'phen', 'at', 'ed'], ['the'], ['of'], ['on', 'ly'], ['set']], 9, 5, 5, 1, 2, False], ['McDonald', 'interna-', 'tional', 'ragged', 'the hy-', 'phenated', 'the of', 'only set']), ('regression: zone boundary', [[['hy', 'phen', 'at', 'ed'], ['in', 'ter', 'na', 'tion', 'al'], ['im', 'por', 'tant'], ['the'], ['on', 'ly'], ['im', 'por', 'tant'], ['a'], ['Mc', 'Don', 'ald']], 15, 3, 5, 1, 3, False], ['hyphenated in-', 'ternational im-', 'portant the', 'only important', 'a McDonald']), ('partial-repair probe', [[['hy', 'phen', 'at', 'ed'], ['in', 'ter', 'na', 'tion', 'al'], ['on', 'ly'], ['set'], ['set'], ['im', 'por', 'tant'], ['hy', 'phen', 'at', 'ed']], 14, 5, 7, 2, 3, False], ['hyphenated', 'international', 'only set set', 'important', 'hyphenated']), ('partial-repair probe', [[['of'], ['rag', 'ged'], ['Mc', 'Don', 'ald'], ['the'], ['in', 'ter', 'na', 'tion', 'al']], 13, 4, 6, 1, 3, True], ['of ragged', 'McDonald the', 'international']), ('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', [[['set'], ['Ber', 'lin'], ['Ber', 'lin'], ['e', 'Book', 'ing'], ['the']], 14, 4, 7, 1, 3, True], ['set Berlin', 'Berlin eBook-', 'ing the']), ('control layout', [[['of'], ['rag', 'ged'], ['im', 'por', 'tant'], ['set'], ['ty', 'po', 'gra', 'phy']], 16, 1, 7, 1, 3, True], ['of ragged impor-', 'tant set typo-', 'graphy'])]]\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-zone-boundary","generated_at":"2026-09-29T14:49:51.644111+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 zone test uses > instead of >=.","sha256":"d72d64b990d86edd857e8311b51a5bd93aa7f6b6fa0dd7612a5e761352b2d697","title":"Ragged-right hyphenation zone: zone boundary · 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":42.092,"exit_code":1,"observations":[{"actual":["the typo-","graphy"],"check":"zone exactly met","expected":["the typo-","graphy"],"passed":true},{"actual":["hyphenated","eBooking","only hy-","phenated e-","Booking","only"],"check":"regression: zone boundary","expected":["hyphenated","eBooking","only hy-","phenated e-","Booking","only"],"passed":true},{"actual":["interna-","tional a","only in-","terna-","tional","typogra-","phy"],"check":"partial-repair probe","expected":["interna-","tional a","only","interna-","tional","typogra-","phy"],"passed":false},{"actual":["McDonald","of the","McDonald","impor-","tant e-","Booking","hyphen-","ated on-","ly"],"check":"partial-repair probe","expected":["McDonald","of the","McDonald","impor-","tant","eBooking","hyphen-","ated","only"],"passed":false},{"actual":["the","McDonald"],"check":"capitalised word protected","expected":["the","McDonald"],"passed":true},{"actual":["ragged of the","Berlin of","Berlin set a","ragged of"],"check":"control layout","expected":["ragged of the","Berlin of","Berlin set a","ragged of"],"passed":true},{"actual":["Berlin","Berlin a","interna-","tional"],"check":"control layout","expected":["Berlin","Berlin a","interna-","tional"],"passed":true},{"actual":["Berlin eBook-","ing ragged","hyphenated"],"check":"control layout","expected":["Berlin eBook-","ing ragged","hyphenated"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"zone exactly met\", \"actual\": [\"the typo-\", \"graphy\"], \"expected\": [\"the typo-\", \"graphy\"], \"passed\": true}, {\"check\": \"regression: zone boundary\", \"actual\": [\"hyphenated\", \"eBooking\", \"only hy-\", \"phenated e-\", \"Booking\", \"only\"], \"expected\": [\"hyphenated\", \"eBooking\", \"only hy-\", \"phenated e-\", \"Booking\", \"only\"], \"passed\": true}, {\"check\": \"partial-repair probe\", \"actual\": [\"interna-\", \"tional a\", \"only in-\", \"terna-\", \"tional\", \"typogra-\", \"phy\"], \"expected\": [\"interna-\", \"tional a\", \"only\", \"interna-\", \"tional\", \"typogra-\", \"phy\"], \"passed\": false}, {\"check\": \"partial-repair probe\", \"actual\": [\"McDonald\", \"of the\", \"McDonald\", \"impor-\", \"tant e-\", \"Booking\", \"hyphen-\", \"ated on-\", \"ly\"], \"expected\": [\"McDonald\", \"of the\", \"McDonald\", \"impor-\", \"tant\", \"eBooking\", \"hyphen-\", \"ated\", \"only\"], \"passed\": false}, {\"check\": \"capitalised word protected\", \"actual\": [\"the\", \"McDonald\"], \"expected\": [\"the\", \"McDonald\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"ragged of the\", \"Berlin of\", \"Berlin set a\", \"ragged of\"], \"expected\": [\"ragged of the\", \"Berlin of\", \"Berlin set a\", \"ragged of\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"Berlin\", \"Berlin a\", \"interna-\", \"tional\"], \"expected\": [\"Berlin\", \"Berlin a\", \"interna-\", \"tional\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"Berlin eBook-\", \"ing ragged\", \"hyphenated\"], \"expected\": [\"Berlin eBook-\", \"ing ragged\", \"hyphenated\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.729,"exit_code":1,"observations":[{"actual":["the","typography"],"check":"zone exactly met","expected":["the typo-","graphy"],"passed":false},{"actual":["hyphenated","eBooking","only hy-","phenated","eBooking","only"],"check":"regression: zone boundary","expected":["hyphenated","eBooking","only hy-","phenated e-","Booking","only"],"passed":false},{"actual":["interna-","tional a","only","interna-","tional","typogra-","phy"],"check":"partial-repair probe","expected":["interna-","tional a","only","interna-","tional","typogra-","phy"],"passed":true},{"actual":["McDonald","of the","McDonald","impor-","tant","eBooking","hyphen-","ated","only"],"check":"partial-repair probe","expected":["McDonald","of the","McDonald","impor-","tant","eBooking","hyphen-","ated","only"],"passed":true},{"actual":["the","McDonald"],"check":"capitalised word protected","expected":["the","McDonald"],"passed":true},{"actual":["ragged of the","Berlin of","Berlin set a","ragged of"],"check":"control layout","expected":["ragged of the","Berlin of","Berlin set a","ragged of"],"passed":true},{"actual":["Berlin","Berlin a","interna-","tional"],"check":"control layout","expected":["Berlin","Berlin a","interna-","tional"],"passed":true},{"actual":["Berlin eBook-","ing ragged","hyphenated"],"check":"control layout","expected":["Berlin eBook-","ing ragged","hyphenated"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"zone exactly met\", \"actual\": [\"the\", \"typography\"], \"expected\": [\"the typo-\", \"graphy\"], \"passed\": false}, {\"check\": \"regression: zone boundary\", \"actual\": [\"hyphenated\", \"eBooking\", \"only hy-\", \"phenated\", \"eBooking\", \"only\"], \"expected\": [\"hyphenated\", \"eBooking\", \"only hy-\", \"phenated e-\", \"Booking\", \"only\"], \"passed\": false}, {\"check\": \"partial-repair probe\", \"actual\": [\"interna-\", \"tional a\", \"only\", \"interna-\", \"tional\", \"typogra-\", \"phy\"], \"expected\": [\"interna-\", \"tional a\", \"only\", \"interna-\", \"tional\", \"typogra-\", \"phy\"], \"passed\": true}, {\"check\": \"partial-repair probe\", \"actual\": [\"McDonald\", \"of the\", \"McDonald\", \"impor-\", \"tant\", \"eBooking\", \"hyphen-\", \"ated\", \"only\"], \"expected\": [\"McDonald\", \"of the\", \"McDonald\", \"impor-\", \"tant\", \"eBooking\", \"hyphen-\", \"ated\", \"only\"], \"passed\": true}, {\"check\": \"capitalised word protected\", \"actual\": [\"the\", \"McDonald\"], \"expected\": [\"the\", \"McDonald\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"ragged of the\", \"Berlin of\", \"Berlin set a\", \"ragged of\"], \"expected\": [\"ragged of the\", \"Berlin of\", \"Berlin set a\", \"ragged of\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"Berlin\", \"Berlin a\", \"interna-\", \"tional\"], \"expected\": [\"Berlin\", \"Berlin a\", \"interna-\", \"tional\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"Berlin eBook-\", \"ing ragged\", \"hyphenated\"], \"expected\": [\"Berlin eBook-\", \"ing ragged\", \"hyphenated\"], \"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."}}