{"abstract":"Rebalancing produces an overfull last line.","category":"Typography line breaking","checks":8,"contract":"Input [words, width, minimum last-line length]. Greedy fill (unit spaces; overwide word alone). Then while there are at least two lines and the last line string is shorter than the minimum, move the last word of the previous line down if that line keeps at least one word and the new last line fits. Return lines.","evaluation_group":"w2-typography-line-breaking-runt-last-line","failed_approach":"Using >= rejects moves that exactly fill the line.","family":"w2-typography-line-breaking-runt-last-line-moved-line-fit","id":"FA-80136","implementations":{"attempt":{"sha256":"e0905af980d60e5176c57b3bb77d175ebcad8628d18187e469ae26a5820d8156","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    words, width, min_last = x\n    lines = []\n    cur = ''\n    for w in words:\n        cand = w if not cur else cur + ' ' + w\n        if len(cand) <= width or not cur:\n            cur = cand\n        else:\n            lines.append(cur)\n            cur = w\n    lines.append(cur)\n    while len(lines) >= 2 and len(lines[-1]) < min_last:\n        prev = lines[-2].split(' ')\n        if len(prev) < 2:\n            break\n        moved = prev[-1] + ' ' + lines[-1]\n        if len(moved) >= width:\n            break\n        lines[-2] = ' '.join(prev[:-1])\n        lines[-1] = moved\n    return lines\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: moved line fit', [['serif', 'measure', 'measure', 'a', 'baseline', 'measure', 'at', 'at', 'serif', 'serif'], 10, 8], ['serif', 'measure', 'measure a', 'baseline', 'measure at', 'at serif', 'serif']), ('regression: moved line fit', [['kerning', 'a', 'a', 'type', 'x', 'x', 'is', 'grid', 'on'], 8, 8], ['kerning', 'a a type', 'x x is', 'grid on']), ('partial-repair probe', [['type', 'the', 'kerning', 'the', 'the', 'kerning', 'the'], 11, 8], ['type the', 'kerning the', 'the', 'kerning the']), ('partial-repair probe', [['of', 'at', 'ink', 'measure', 'at', 'the', 'measure', 'ink'], 11, 6], ['of at ink', 'measure at', 'the', 'measure ink']), ('runt limited by width', [['kerning', 'baseline', 'x'], 10, 4], ['kerning', 'baseline x']), ('one-word runt pulled down', [['the', 'type', 'grid', 'is', 'a'], 12, 5], ['the type', 'grid is a']), ('control layout', [['kerning', 'on', 'baseline', 'ink', 'of', 'on', 'serif', 'on', 'type', 'ink', 'at'], 16, 4], ['kerning on', 'baseline ink of', 'on serif on type', 'ink at']), ('control layout', [['is', 'of', 'the', 'of', 'is', 'of'], 18, 8], ['is of the of is of'])], [('regression: moved line fit', [['serif', 'the', 'baseline', 'serif', 'serif', 'a', 'on', 'ink', 'x', 'ink', 'the', 'is'], 7, 8], ['serif', 'the', 'baseline', 'serif', 'serif a', 'on ink', 'x ink', 'the is']), ('regression: moved line fit', [['kerning', 'a', 'a', 'type', 'x', 'x', 'is', 'grid', 'on'], 8, 8], ['kerning', 'a a type', 'x x is', 'grid on']), ('partial-repair probe', [['of', 'at', 'ink', 'measure', 'at', 'the', 'measure', 'ink'], 11, 6], ['of at ink', 'measure at', 'the', 'measure ink']), ('partial-repair probe', [['grid', 'is', 'x', 'baseline', 'the', 'serif', 'a', 'serif', 'of', 'kerning', 'at', 'the'], 14, 9], ['grid is x', 'baseline the', 'serif a serif', 'of', 'kerning at the']), ('runt limited by width', [['kerning', 'baseline', 'x'], 10, 4], ['kerning', 'baseline x']), ('one-word runt pulled down', [['the', 'type', 'grid', 'is', 'a'], 12, 5], ['the type', 'grid is a']), ('control layout', [['is', 'the', 'serif', 'grid', 'serif', 'of', 'serif'], 13, 3], ['is the serif', 'grid serif of', 'serif']), ('control layout', [['kerning', 'type', 'baseline', 'on', 'type', 'a', 'is'], 16, 7], ['kerning type', 'baseline on', 'type a is'])], [('regression: moved line fit', [['ink', 'the', 'a', 'ink', 'measure'], 8, 9], ['ink the', 'a ink', 'measure']), ('regression: moved line fit', [['grid', 'type', 'measure', 'grid', 'x', 'baseline'], 8, 9], ['grid', 'type', 'measure', 'grid x', 'baseline']), ('partial-repair probe', [['x', 'at', 'kerning', 'baseline'], 16, 9], ['x at', 'kerning baseline']), ('partial-repair probe', [['ink', 'at', 'baseline', 'measure'], 16, 9], ['ink at', 'baseline measure']), ('runt limited by width', [['kerning', 'baseline', 'x'], 10, 4], ['kerning', 'baseline x']), ('one-word runt pulled down', [['the', 'type', 'grid', 'is', 'a'], 12, 5], ['the type', 'grid is a']), ('control layout', [['the', 'measure', 'grid', 'grid', 'ink', 'kerning', 'measure', 'of'], 16, 8], ['the measure grid', 'grid ink kerning', 'measure of']), ('control layout', [['on', 'ink', 'at', 'on', 'at', 'ink', 'the'], 16, 3], ['on ink at on at', 'ink the'])], [('regression: moved line fit', [['kerning', 'a', 'a', 'type', 'x', 'x', 'is', 'grid', 'on'], 8, 8], ['kerning', 'a a type', 'x x is', 'grid on']), ('regression: moved line fit', [['serif', 'the', 'baseline', 'serif', 'serif', 'a', 'on', 'ink', 'x', 'ink', 'the', 'is'], 7, 8], ['serif', 'the', 'baseline', 'serif', 'serif a', 'on ink', 'x ink', 'the is']), ('partial-repair probe', [['x', 'at', 'kerning', 'baseline'], 16, 9], ['x at', 'kerning baseline']), ('partial-repair probe', [['on', 'kerning', 'type', 'ink', 'kerning', 'of', 'serif', 'the'], 9, 8], ['on', 'kerning', 'type ink', 'kerning', 'of', 'serif the']), ('one-word runt pulled down', [['the', 'type', 'grid', 'is', 'a'], 12, 5], ['the type', 'grid is a']), ('runt limited by width', [['kerning', 'baseline', 'x'], 10, 4], ['kerning', 'baseline x']), ('control layout', [['at', 'kerning', 'ink', 'kerning', 'serif', 'a'], 15, 5], ['at kerning ink', 'kerning serif a']), ('control layout', [['baseline', 'of', 'on', 'on', 'ink', 'measure', 'ink', 'x'], 16, 7], ['baseline of on', 'on ink', 'measure ink x'])], [('regression: moved line fit', [['grid', 'type', 'measure', 'grid', 'x', 'baseline'], 8, 9], ['grid', 'type', 'measure', 'grid x', 'baseline']), ('regression: moved line fit', [['at', 'on', 'serif'], 7, 7], ['at on', 'serif']), ('partial-repair probe', [['on', 'kerning', 'type', 'ink', 'kerning', 'of', 'serif', 'the'], 9, 8], ['on', 'kerning', 'type ink', 'kerning', 'of', 'serif the']), ('partial-repair probe', [['grid', 'is', 'x', 'baseline', 'the', 'serif', 'a', 'serif', 'of', 'kerning', 'at', 'the'], 14, 9], ['grid is x', 'baseline the', 'serif a serif', 'of', 'kerning at the']), ('runt limited by width', [['kerning', 'baseline', 'x'], 10, 4], ['kerning', 'baseline x']), ('one-word runt pulled down', [['the', 'type', 'grid', 'is', 'a'], 12, 5], ['the type', 'grid is a']), ('control layout', [['the', 'kerning', 'on', 'baseline'], 19, 8], ['the kerning on', 'baseline']), ('control layout', [['the', 'x', 'is', 'of', 'serif'], 19, 8], ['the x is of serif'])]]\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":"136d7f7f8ac763b51c373a9a45a4f5931de6589c8188ede465267b6cd7e6204e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    words, width, min_last = x\n    lines = []\n    cur = ''\n    for w in words:\n        cand = w if not cur else cur + ' ' + w\n        if len(cand) <= width or not cur:\n            cur = cand\n        else:\n            lines.append(cur)\n            cur = w\n    lines.append(cur)\n    while len(lines) >= 2 and len(lines[-1]) < min_last:\n        prev = lines[-2].split(' ')\n        if len(prev) < 2:\n            break\n        moved = prev[-1] + ' ' + lines[-1]\n        if len(lines[-1]) > width:\n            break\n        lines[-2] = ' '.join(prev[:-1])\n        lines[-1] = moved\n    return lines\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: moved line fit', [['serif', 'measure', 'measure', 'a', 'baseline', 'measure', 'at', 'at', 'serif', 'serif'], 10, 8], ['serif', 'measure', 'measure a', 'baseline', 'measure at', 'at serif', 'serif']), ('regression: moved line fit', [['kerning', 'a', 'a', 'type', 'x', 'x', 'is', 'grid', 'on'], 8, 8], ['kerning', 'a a type', 'x x is', 'grid on']), ('partial-repair probe', [['type', 'the', 'kerning', 'the', 'the', 'kerning', 'the'], 11, 8], ['type the', 'kerning the', 'the', 'kerning the']), ('partial-repair probe', [['of', 'at', 'ink', 'measure', 'at', 'the', 'measure', 'ink'], 11, 6], ['of at ink', 'measure at', 'the', 'measure ink']), ('runt limited by width', [['kerning', 'baseline', 'x'], 10, 4], ['kerning', 'baseline x']), ('one-word runt pulled down', [['the', 'type', 'grid', 'is', 'a'], 12, 5], ['the type', 'grid is a']), ('control layout', [['kerning', 'on', 'baseline', 'ink', 'of', 'on', 'serif', 'on', 'type', 'ink', 'at'], 16, 4], ['kerning on', 'baseline ink of', 'on serif on type', 'ink at']), ('control layout', [['is', 'of', 'the', 'of', 'is', 'of'], 18, 8], ['is of the of is of'])], [('regression: moved line fit', [['serif', 'the', 'baseline', 'serif', 'serif', 'a', 'on', 'ink', 'x', 'ink', 'the', 'is'], 7, 8], ['serif', 'the', 'baseline', 'serif', 'serif a', 'on ink', 'x ink', 'the is']), ('regression: moved line fit', [['kerning', 'a', 'a', 'type', 'x', 'x', 'is', 'grid', 'on'], 8, 8], ['kerning', 'a a type', 'x x is', 'grid on']), ('partial-repair probe', [['of', 'at', 'ink', 'measure', 'at', 'the', 'measure', 'ink'], 11, 6], ['of at ink', 'measure at', 'the', 'measure ink']), ('partial-repair probe', [['grid', 'is', 'x', 'baseline', 'the', 'serif', 'a', 'serif', 'of', 'kerning', 'at', 'the'], 14, 9], ['grid is x', 'baseline the', 'serif a serif', 'of', 'kerning at the']), ('runt limited by width', [['kerning', 'baseline', 'x'], 10, 4], ['kerning', 'baseline x']), ('one-word runt pulled down', [['the', 'type', 'grid', 'is', 'a'], 12, 5], ['the type', 'grid is a']), ('control layout', [['is', 'the', 'serif', 'grid', 'serif', 'of', 'serif'], 13, 3], ['is the serif', 'grid serif of', 'serif']), ('control layout', [['kerning', 'type', 'baseline', 'on', 'type', 'a', 'is'], 16, 7], ['kerning type', 'baseline on', 'type a is'])], [('regression: moved line fit', [['ink', 'the', 'a', 'ink', 'measure'], 8, 9], ['ink the', 'a ink', 'measure']), ('regression: moved line fit', [['grid', 'type', 'measure', 'grid', 'x', 'baseline'], 8, 9], ['grid', 'type', 'measure', 'grid x', 'baseline']), ('partial-repair probe', [['x', 'at', 'kerning', 'baseline'], 16, 9], ['x at', 'kerning baseline']), ('partial-repair probe', [['ink', 'at', 'baseline', 'measure'], 16, 9], ['ink at', 'baseline measure']), ('runt limited by width', [['kerning', 'baseline', 'x'], 10, 4], ['kerning', 'baseline x']), ('one-word runt pulled down', [['the', 'type', 'grid', 'is', 'a'], 12, 5], ['the type', 'grid is a']), ('control layout', [['the', 'measure', 'grid', 'grid', 'ink', 'kerning', 'measure', 'of'], 16, 8], ['the measure grid', 'grid ink kerning', 'measure of']), ('control layout', [['on', 'ink', 'at', 'on', 'at', 'ink', 'the'], 16, 3], ['on ink at on at', 'ink the'])], [('regression: moved line fit', [['kerning', 'a', 'a', 'type', 'x', 'x', 'is', 'grid', 'on'], 8, 8], ['kerning', 'a a type', 'x x is', 'grid on']), ('regression: moved line fit', [['serif', 'the', 'baseline', 'serif', 'serif', 'a', 'on', 'ink', 'x', 'ink', 'the', 'is'], 7, 8], ['serif', 'the', 'baseline', 'serif', 'serif a', 'on ink', 'x ink', 'the is']), ('partial-repair probe', [['x', 'at', 'kerning', 'baseline'], 16, 9], ['x at', 'kerning baseline']), ('partial-repair probe', [['on', 'kerning', 'type', 'ink', 'kerning', 'of', 'serif', 'the'], 9, 8], ['on', 'kerning', 'type ink', 'kerning', 'of', 'serif the']), ('one-word runt pulled down', [['the', 'type', 'grid', 'is', 'a'], 12, 5], ['the type', 'grid is a']), ('runt limited by width', [['kerning', 'baseline', 'x'], 10, 4], ['kerning', 'baseline x']), ('control layout', [['at', 'kerning', 'ink', 'kerning', 'serif', 'a'], 15, 5], ['at kerning ink', 'kerning serif a']), ('control layout', [['baseline', 'of', 'on', 'on', 'ink', 'measure', 'ink', 'x'], 16, 7], ['baseline of on', 'on ink', 'measure ink x'])], [('regression: moved line fit', [['grid', 'type', 'measure', 'grid', 'x', 'baseline'], 8, 9], ['grid', 'type', 'measure', 'grid x', 'baseline']), ('regression: moved line fit', [['at', 'on', 'serif'], 7, 7], ['at on', 'serif']), ('partial-repair probe', [['on', 'kerning', 'type', 'ink', 'kerning', 'of', 'serif', 'the'], 9, 8], ['on', 'kerning', 'type ink', 'kerning', 'of', 'serif the']), ('partial-repair probe', [['grid', 'is', 'x', 'baseline', 'the', 'serif', 'a', 'serif', 'of', 'kerning', 'at', 'the'], 14, 9], ['grid is x', 'baseline the', 'serif a serif', 'of', 'kerning at the']), ('runt limited by width', [['kerning', 'baseline', 'x'], 10, 4], ['kerning', 'baseline x']), ('one-word runt pulled down', [['the', 'type', 'grid', 'is', 'a'], 12, 5], ['the type', 'grid is a']), ('control layout', [['the', 'kerning', 'on', 'baseline'], 19, 8], ['the kerning on', 'baseline']), ('control layout', [['the', 'x', 'is', 'of', 'serif'], 19, 8], ['the x is of serif'])]]\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":"4dfcf01b1fb1dfa8a3a4c041a911dba2faefe9c000aa1c4763ceaf97c63f2f79","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    words, width, min_last = x\n    lines = []\n    cur = ''\n    for w in words:\n        cand = w if not cur else cur + ' ' + w\n        if len(cand) <= width or not cur:\n            cur = cand\n        else:\n            lines.append(cur)\n            cur = w\n    lines.append(cur)\n    while len(lines) >= 2 and len(lines[-1]) < min_last:\n        prev = lines[-2].split(' ')\n        if len(prev) < 2:\n            break\n        moved = prev[-1] + ' ' + lines[-1]\n        if len(moved) > width:\n            break\n        lines[-2] = ' '.join(prev[:-1])\n        lines[-1] = moved\n    return lines\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('regression: moved line fit', [['serif', 'measure', 'measure', 'a', 'baseline', 'measure', 'at', 'at', 'serif', 'serif'], 10, 8], ['serif', 'measure', 'measure a', 'baseline', 'measure at', 'at serif', 'serif']), ('regression: moved line fit', [['kerning', 'a', 'a', 'type', 'x', 'x', 'is', 'grid', 'on'], 8, 8], ['kerning', 'a a type', 'x x is', 'grid on']), ('partial-repair probe', [['type', 'the', 'kerning', 'the', 'the', 'kerning', 'the'], 11, 8], ['type the', 'kerning the', 'the', 'kerning the']), ('partial-repair probe', [['of', 'at', 'ink', 'measure', 'at', 'the', 'measure', 'ink'], 11, 6], ['of at ink', 'measure at', 'the', 'measure ink']), ('runt limited by width', [['kerning', 'baseline', 'x'], 10, 4], ['kerning', 'baseline x']), ('one-word runt pulled down', [['the', 'type', 'grid', 'is', 'a'], 12, 5], ['the type', 'grid is a']), ('control layout', [['kerning', 'on', 'baseline', 'ink', 'of', 'on', 'serif', 'on', 'type', 'ink', 'at'], 16, 4], ['kerning on', 'baseline ink of', 'on serif on type', 'ink at']), ('control layout', [['is', 'of', 'the', 'of', 'is', 'of'], 18, 8], ['is of the of is of'])], [('regression: moved line fit', [['serif', 'the', 'baseline', 'serif', 'serif', 'a', 'on', 'ink', 'x', 'ink', 'the', 'is'], 7, 8], ['serif', 'the', 'baseline', 'serif', 'serif a', 'on ink', 'x ink', 'the is']), ('regression: moved line fit', [['kerning', 'a', 'a', 'type', 'x', 'x', 'is', 'grid', 'on'], 8, 8], ['kerning', 'a a type', 'x x is', 'grid on']), ('partial-repair probe', [['of', 'at', 'ink', 'measure', 'at', 'the', 'measure', 'ink'], 11, 6], ['of at ink', 'measure at', 'the', 'measure ink']), ('partial-repair probe', [['grid', 'is', 'x', 'baseline', 'the', 'serif', 'a', 'serif', 'of', 'kerning', 'at', 'the'], 14, 9], ['grid is x', 'baseline the', 'serif a serif', 'of', 'kerning at the']), ('runt limited by width', [['kerning', 'baseline', 'x'], 10, 4], ['kerning', 'baseline x']), ('one-word runt pulled down', [['the', 'type', 'grid', 'is', 'a'], 12, 5], ['the type', 'grid is a']), ('control layout', [['is', 'the', 'serif', 'grid', 'serif', 'of', 'serif'], 13, 3], ['is the serif', 'grid serif of', 'serif']), ('control layout', [['kerning', 'type', 'baseline', 'on', 'type', 'a', 'is'], 16, 7], ['kerning type', 'baseline on', 'type a is'])], [('regression: moved line fit', [['ink', 'the', 'a', 'ink', 'measure'], 8, 9], ['ink the', 'a ink', 'measure']), ('regression: moved line fit', [['grid', 'type', 'measure', 'grid', 'x', 'baseline'], 8, 9], ['grid', 'type', 'measure', 'grid x', 'baseline']), ('partial-repair probe', [['x', 'at', 'kerning', 'baseline'], 16, 9], ['x at', 'kerning baseline']), ('partial-repair probe', [['ink', 'at', 'baseline', 'measure'], 16, 9], ['ink at', 'baseline measure']), ('runt limited by width', [['kerning', 'baseline', 'x'], 10, 4], ['kerning', 'baseline x']), ('one-word runt pulled down', [['the', 'type', 'grid', 'is', 'a'], 12, 5], ['the type', 'grid is a']), ('control layout', [['the', 'measure', 'grid', 'grid', 'ink', 'kerning', 'measure', 'of'], 16, 8], ['the measure grid', 'grid ink kerning', 'measure of']), ('control layout', [['on', 'ink', 'at', 'on', 'at', 'ink', 'the'], 16, 3], ['on ink at on at', 'ink the'])], [('regression: moved line fit', [['kerning', 'a', 'a', 'type', 'x', 'x', 'is', 'grid', 'on'], 8, 8], ['kerning', 'a a type', 'x x is', 'grid on']), ('regression: moved line fit', [['serif', 'the', 'baseline', 'serif', 'serif', 'a', 'on', 'ink', 'x', 'ink', 'the', 'is'], 7, 8], ['serif', 'the', 'baseline', 'serif', 'serif a', 'on ink', 'x ink', 'the is']), ('partial-repair probe', [['x', 'at', 'kerning', 'baseline'], 16, 9], ['x at', 'kerning baseline']), ('partial-repair probe', [['on', 'kerning', 'type', 'ink', 'kerning', 'of', 'serif', 'the'], 9, 8], ['on', 'kerning', 'type ink', 'kerning', 'of', 'serif the']), ('one-word runt pulled down', [['the', 'type', 'grid', 'is', 'a'], 12, 5], ['the type', 'grid is a']), ('runt limited by width', [['kerning', 'baseline', 'x'], 10, 4], ['kerning', 'baseline x']), ('control layout', [['at', 'kerning', 'ink', 'kerning', 'serif', 'a'], 15, 5], ['at kerning ink', 'kerning serif a']), ('control layout', [['baseline', 'of', 'on', 'on', 'ink', 'measure', 'ink', 'x'], 16, 7], ['baseline of on', 'on ink', 'measure ink x'])], [('regression: moved line fit', [['grid', 'type', 'measure', 'grid', 'x', 'baseline'], 8, 9], ['grid', 'type', 'measure', 'grid x', 'baseline']), ('regression: moved line fit', [['at', 'on', 'serif'], 7, 7], ['at on', 'serif']), ('partial-repair probe', [['on', 'kerning', 'type', 'ink', 'kerning', 'of', 'serif', 'the'], 9, 8], ['on', 'kerning', 'type ink', 'kerning', 'of', 'serif the']), ('partial-repair probe', [['grid', 'is', 'x', 'baseline', 'the', 'serif', 'a', 'serif', 'of', 'kerning', 'at', 'the'], 14, 9], ['grid is x', 'baseline the', 'serif a serif', 'of', 'kerning at the']), ('runt limited by width', [['kerning', 'baseline', 'x'], 10, 4], ['kerning', 'baseline x']), ('one-word runt pulled down', [['the', 'type', 'grid', 'is', 'a'], 12, 5], ['the type', 'grid is a']), ('control layout', [['the', 'kerning', 'on', 'baseline'], 19, 8], ['the kerning on', 'baseline']), ('control layout', [['the', 'x', 'is', 'of', 'serif'], 19, 8], ['the x is of serif'])]]\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-runt-last-line-moved-line-fit","generated_at":"2026-09-29T14:49:50.976878+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":"Check the width of the last line after the move.","root_cause":"The fit check measures the old last line instead of the new one.","sha256":"0639b1f14c8b841e78882b99356fd167d224ec9bfa89c10ba39609b99657d33e","title":"Runt last-line prevention: moved line fit · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.584,"exit_code":1,"observations":[{"actual":["serif","measure","measure a","baseline","measure at","at serif","serif"],"check":"regression: moved line fit","expected":["serif","measure","measure a","baseline","measure at","at serif","serif"],"passed":true},{"actual":["kerning","a a type","x x is","grid on"],"check":"regression: moved line fit","expected":["kerning","a a type","x x is","grid on"],"passed":true},{"actual":["type the","kerning the","the kerning","the"],"check":"partial-repair probe","expected":["type the","kerning the","the","kerning the"],"passed":false},{"actual":["of at ink","measure at","the measure","ink"],"check":"partial-repair probe","expected":["of at ink","measure at","the","measure ink"],"passed":false},{"actual":["kerning","baseline x"],"check":"runt limited by width","expected":["kerning","baseline x"],"passed":true},{"actual":["the type","grid is a"],"check":"one-word runt pulled down","expected":["the type","grid is a"],"passed":true},{"actual":["kerning on","baseline ink of","on serif on type","ink at"],"check":"control layout","expected":["kerning on","baseline ink of","on serif on type","ink at"],"passed":true},{"actual":["is of the of is of"],"check":"control layout","expected":["is of the of is of"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: moved line fit\", \"actual\": [\"serif\", \"measure\", \"measure a\", \"baseline\", \"measure at\", \"at serif\", \"serif\"], \"expected\": [\"serif\", \"measure\", \"measure a\", \"baseline\", \"measure at\", \"at serif\", \"serif\"], \"passed\": true}, {\"check\": \"regression: moved line fit\", \"actual\": [\"kerning\", \"a a type\", \"x x is\", \"grid on\"], \"expected\": [\"kerning\", \"a a type\", \"x x is\", \"grid on\"], \"passed\": true}, {\"check\": \"partial-repair probe\", \"actual\": [\"type the\", \"kerning the\", \"the kerning\", \"the\"], \"expected\": [\"type the\", \"kerning the\", \"the\", \"kerning the\"], \"passed\": false}, {\"check\": \"partial-repair probe\", \"actual\": [\"of at ink\", \"measure at\", \"the measure\", \"ink\"], \"expected\": [\"of at ink\", \"measure at\", \"the\", \"measure ink\"], \"passed\": false}, {\"check\": \"runt limited by width\", \"actual\": [\"kerning\", \"baseline x\"], \"expected\": [\"kerning\", \"baseline x\"], \"passed\": true}, {\"check\": \"one-word runt pulled down\", \"actual\": [\"the type\", \"grid is a\"], \"expected\": [\"the type\", \"grid is a\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"kerning on\", \"baseline ink of\", \"on serif on type\", \"ink at\"], \"expected\": [\"kerning on\", \"baseline ink of\", \"on serif on type\", \"ink at\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"is of the of is of\"], \"expected\": [\"is of the of is of\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.103,"exit_code":1,"observations":[{"actual":["serif","measure","measure a","baseline","measure at","at","serif serif"],"check":"regression: moved line fit","expected":["serif","measure","measure a","baseline","measure at","at serif","serif"],"passed":false},{"actual":["kerning","a a type","x x","is grid on"],"check":"regression: moved line fit","expected":["kerning","a a type","x x is","grid on"],"passed":false},{"actual":["type the","kerning the","the","kerning the"],"check":"partial-repair probe","expected":["type the","kerning the","the","kerning the"],"passed":true},{"actual":["of at ink","measure at","the","measure ink"],"check":"partial-repair probe","expected":["of at ink","measure at","the","measure ink"],"passed":true},{"actual":["kerning","baseline x"],"check":"runt limited by width","expected":["kerning","baseline x"],"passed":true},{"actual":["the type","grid is a"],"check":"one-word runt pulled down","expected":["the type","grid is a"],"passed":true},{"actual":["kerning on","baseline ink of","on serif on type","ink at"],"check":"control layout","expected":["kerning on","baseline ink of","on serif on type","ink at"],"passed":true},{"actual":["is of the of is of"],"check":"control layout","expected":["is of the of is of"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: moved line fit\", \"actual\": [\"serif\", \"measure\", \"measure a\", \"baseline\", \"measure at\", \"at\", \"serif serif\"], \"expected\": [\"serif\", \"measure\", \"measure a\", \"baseline\", \"measure at\", \"at serif\", \"serif\"], \"passed\": false}, {\"check\": \"regression: moved line fit\", \"actual\": [\"kerning\", \"a a type\", \"x x\", \"is grid on\"], \"expected\": [\"kerning\", \"a a type\", \"x x is\", \"grid on\"], \"passed\": false}, {\"check\": \"partial-repair probe\", \"actual\": [\"type the\", \"kerning the\", \"the\", \"kerning the\"], \"expected\": [\"type the\", \"kerning the\", \"the\", \"kerning the\"], \"passed\": true}, {\"check\": \"partial-repair probe\", \"actual\": [\"of at ink\", \"measure at\", \"the\", \"measure ink\"], \"expected\": [\"of at ink\", \"measure at\", \"the\", \"measure ink\"], \"passed\": true}, {\"check\": \"runt limited by width\", \"actual\": [\"kerning\", \"baseline x\"], \"expected\": [\"kerning\", \"baseline x\"], \"passed\": true}, {\"check\": \"one-word runt pulled down\", \"actual\": [\"the type\", \"grid is a\"], \"expected\": [\"the type\", \"grid is a\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"kerning on\", \"baseline ink of\", \"on serif on type\", \"ink at\"], \"expected\": [\"kerning on\", \"baseline ink of\", \"on serif on type\", \"ink at\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"is of the of is of\"], \"expected\": [\"is of the of is of\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":42.454,"exit_code":0,"observations":[{"actual":["serif","measure","measure a","baseline","measure at","at serif","serif"],"check":"regression: moved line fit","expected":["serif","measure","measure a","baseline","measure at","at serif","serif"],"passed":true},{"actual":["kerning","a a type","x x is","grid on"],"check":"regression: moved line fit","expected":["kerning","a a type","x x is","grid on"],"passed":true},{"actual":["type the","kerning the","the","kerning the"],"check":"partial-repair probe","expected":["type the","kerning the","the","kerning the"],"passed":true},{"actual":["of at ink","measure at","the","measure ink"],"check":"partial-repair probe","expected":["of at ink","measure at","the","measure ink"],"passed":true},{"actual":["kerning","baseline x"],"check":"runt limited by width","expected":["kerning","baseline x"],"passed":true},{"actual":["the type","grid is a"],"check":"one-word runt pulled down","expected":["the type","grid is a"],"passed":true},{"actual":["kerning on","baseline ink of","on serif on type","ink at"],"check":"control layout","expected":["kerning on","baseline ink of","on serif on type","ink at"],"passed":true},{"actual":["is of the of is of"],"check":"control layout","expected":["is of the of is of"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"regression: moved line fit\", \"actual\": [\"serif\", \"measure\", \"measure a\", \"baseline\", \"measure at\", \"at serif\", \"serif\"], \"expected\": [\"serif\", \"measure\", \"measure a\", \"baseline\", \"measure at\", \"at serif\", \"serif\"], \"passed\": true}, {\"check\": \"regression: moved line fit\", \"actual\": [\"kerning\", \"a a type\", \"x x is\", \"grid on\"], \"expected\": [\"kerning\", \"a a type\", \"x x is\", \"grid on\"], \"passed\": true}, {\"check\": \"partial-repair probe\", \"actual\": [\"type the\", \"kerning the\", \"the\", \"kerning the\"], \"expected\": [\"type the\", \"kerning the\", \"the\", \"kerning the\"], \"passed\": true}, {\"check\": \"partial-repair probe\", \"actual\": [\"of at ink\", \"measure at\", \"the\", \"measure ink\"], \"expected\": [\"of at ink\", \"measure at\", \"the\", \"measure ink\"], \"passed\": true}, {\"check\": \"runt limited by width\", \"actual\": [\"kerning\", \"baseline x\"], \"expected\": [\"kerning\", \"baseline x\"], \"passed\": true}, {\"check\": \"one-word runt pulled down\", \"actual\": [\"the type\", \"grid is a\"], \"expected\": [\"the type\", \"grid is a\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"kerning on\", \"baseline ink of\", \"on serif on type\", \"ink at\"], \"expected\": [\"kerning on\", \"baseline ink of\", \"on serif on type\", \"ink at\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"is of the of is of\"], \"expected\": [\"is of the of is of\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}