{"abstract":"The first line measures the initial letter twice.","category":"Typography line breaking","checks":8,"contract":"Input [word widths, width, cap lines, cap width, gap, indent]. With a drop cap its first letter moves into the cap (first word loses one unit) and the first cap-lines lines are narrowed by cap width + gap; the first-line indent applies only without a cap. Greedy fill with unit spaces; a word too wide for an empty line is set alone. Return [[words on line, used width]].","evaluation_group":"w2-typography-line-breaking-drop-cap","failed_approach":"Trimming even without a cap shortens ordinary paragraphs.","family":"w2-typography-line-breaking-drop-cap-initial-letter-consumption","id":"FA-80111","implementations":{"attempt":{"sha256":"afc8f4adc8489904db706b33f355fabce81bb5a1c5c1239edd1122f8d74a0216","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    words, width, cap_lines, cap_width, gap, indent = x\n    lens = list(words)\n    if cap_lines >= 0:\n        lens[0] = lens[0] - 1\n    def avail(li):\n        base = width\n        if li < cap_lines:\n            base -= cap_width + gap\n        elif cap_lines == 0 and li == 0:\n            base -= indent\n        return base\n    lines = []\n    cur = []\n    used = 0\n    for w in lens:\n        li = len(lines)\n        need = w if not cur else used + 1 + w\n        if need <= avail(li) or not cur:\n            cur.append(w)\n            used = need\n        else:\n            lines.append([len(cur), used])\n            cur = [w]\n            used = w\n    if cur:\n        lines.append([len(cur), used])\n    return lines\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('three-line drop cap', [[5, 3, 4, 6, 2, 5, 4, 3], 14, 3, 3, 1, 2], [[2, 8], [1, 4], [2, 9], [3, 14]]), ('regression: initial letter consumption', [[7, 1, 4, 6, 4, 3, 7, 5], 13, 2, 5, 2, 3], [[1, 6], [2, 6], [2, 11], [2, 11], [1, 5]]), ('partial-repair probe', [[7, 1, 8, 5], 16, 0, 5, 1, 3], [[2, 9], [2, 14]]), ('partial-repair probe', [[1, 8, 8, 5, 8, 1, 2, 5], 17, 0, 2, 1, 3], [[2, 10], [2, 14], [3, 13], [1, 5]]), ('no cap uses indent', [[5, 3, 4, 6, 2], 12, 0, 3, 1, 3], [[2, 9], [2, 11], [1, 2]]), ('partial-repair probe', [[5, 2, 6, 6, 2, 6, 3, 3, 5, 3], 16, 0, 2, 1, 3], [[2, 8], [3, 16], [3, 14], [2, 9]]), ('partial-repair probe', [[6, 6, 8, 8, 8, 2, 3], 15, 0, 5, 1, 4], [[1, 6], [2, 15], [1, 8], [3, 15]]), ('partial-repair probe', [[1, 2, 6, 7, 1, 8], 20, 0, 3, 2, 2], [[3, 11], [3, 18]])], [('regression: initial letter consumption', [[8, 1, 6, 4, 1, 7, 7], 24, 2, 5, 2, 1], [[3, 16], [3, 14], [1, 7]]), ('regression: initial letter consumption', [[1, 2, 7, 6, 5, 2, 3], 17, 3, 5, 1, 3], [[3, 11], [1, 6], [2, 8], [1, 3]]), ('partial-repair probe', [[1, 8, 7, 5, 7, 8], 15, 0, 2, 2, 3], [[2, 10], [2, 13], [1, 7], [1, 8]]), ('partial-repair probe', [[2, 3, 3, 1, 7, 5, 6, 1, 3, 3, 5], 14, 0, 3, 1, 2], [[4, 12], [2, 13], [3, 12], [2, 9]]), ('three-line drop cap', [[5, 3, 4, 6, 2, 5, 4, 3], 14, 3, 3, 1, 2], [[2, 8], [1, 4], [2, 9], [3, 14]]), ('no cap uses indent', [[5, 3, 4, 6, 2], 12, 0, 3, 1, 3], [[2, 9], [2, 11], [1, 2]]), ('regression: initial letter consumption', [[3, 4, 3, 1, 5, 7, 5, 6, 6, 5, 5], 19, 2, 4, 2, 2], [[4, 13], [2, 13], [3, 19], [2, 11]]), ('partial-repair probe', [[6, 8, 2, 2, 5, 4, 5, 7], 24, 0, 2, 1, 2], [[4, 21], [4, 24]])], [('regression: initial letter consumption', [[2, 6, 7, 8, 2, 8, 5, 5, 1, 1, 5], 12, 3, 2, 1, 1], [[2, 8], [1, 7], [1, 8], [2, 11], [2, 11], [3, 9]]), ('regression: initial letter consumption', [[7, 2, 3, 8, 2, 8, 7], 22, 2, 5, 1, 1], [[3, 13], [2, 11], [2, 16]]), ('partial-repair probe', [[1, 6, 4, 2, 2, 2, 8], 15, 0, 4, 1, 3], [[2, 8], [4, 13], [1, 8]]), ('partial-repair probe', [[8, 1, 7, 5, 5, 4, 4, 8, 7], 22, 0, 5, 1, 2], [[3, 18], [4, 21], [2, 16]]), ('three-line drop cap', [[5, 3, 4, 6, 2, 5, 4, 3], 14, 3, 3, 1, 2], [[2, 8], [1, 4], [2, 9], [3, 14]]), ('no cap uses indent', [[5, 3, 4, 6, 2], 12, 0, 3, 1, 3], [[2, 9], [2, 11], [1, 2]]), ('partial-repair probe', [[3, 7, 4, 7], 24, 0, 2, 2, 4], [[3, 16], [1, 7]]), ('partial-repair probe', [[8, 2, 3, 5, 8, 1, 2], 12, 0, 4, 1, 1], [[2, 11], [2, 9], [2, 10], [1, 2]])], [('regression: initial letter consumption', [[2, 6, 7, 8, 1, 2, 5, 6, 8], 21, 2, 2, 2, 4], [[3, 16], [3, 13], [3, 21]]), ('regression: initial letter consumption', [[7, 6, 8, 6, 7, 6, 3, 5, 3, 6, 4], 13, 2, 4, 1, 1], [[1, 6], [1, 6], [1, 8], [1, 6], [1, 7], [2, 10], [2, 9], [2, 11]]), ('partial-repair probe', [[7, 4, 4, 1], 21, 0, 2, 2, 3], [[3, 17], [1, 1]]), ('partial-repair probe', [[3, 2, 8, 1, 5, 6, 1, 5, 8], 16, 0, 4, 2, 2], [[2, 6], [3, 16], [3, 14], [1, 8]]), ('no cap uses indent', [[5, 3, 4, 6, 2], 12, 0, 3, 1, 3], [[2, 9], [2, 11], [1, 2]]), ('three-line drop cap', [[5, 3, 4, 6, 2, 5, 4, 3], 14, 3, 3, 1, 2], [[2, 8], [1, 4], [2, 9], [3, 14]]), ('partial-repair probe', [[7, 6, 7, 4, 5, 3, 3, 5, 3, 5], 23, 0, 3, 2, 4], [[2, 14], [4, 22], [4, 19]]), ('regression: initial letter consumption', [[5, 4, 1, 4, 5, 5, 2, 7], 21, 3, 2, 1, 2], [[4, 16], [3, 14], [1, 7]])], [('regression: initial letter consumption', [[3, 1, 5, 1, 6], 22, 2, 5, 2, 4], [[4, 12], [1, 6]]), ('regression: initial letter consumption', [[6, 6, 3, 1, 6], 19, 2, 5, 1, 3], [[2, 12], [3, 12]]), ('partial-repair probe', [[3, 5, 6, 1, 6, 8, 2, 6, 1], 15, 0, 2, 2, 3], [[2, 9], [3, 15], [2, 11], [2, 8]]), ('partial-repair probe', [[2, 2, 2, 2, 1, 7, 6, 1, 1, 8, 3, 4], 23, 0, 4, 1, 2], [[6, 21], [5, 23], [1, 4]]), ('three-line drop cap', [[5, 3, 4, 6, 2, 5, 4, 3], 14, 3, 3, 1, 2], [[2, 8], [1, 4], [2, 9], [3, 14]]), ('no cap uses indent', [[5, 3, 4, 6, 2], 12, 0, 3, 1, 3], [[2, 9], [2, 11], [1, 2]]), ('regression: initial letter consumption', [[4, 3, 6, 1, 3, 3, 4, 6], 15, 3, 4, 1, 3], [[2, 7], [2, 8], [2, 7], [2, 11]]), ('regression: initial letter consumption', [[1, 5, 6, 6, 3, 7], 22, 2, 4, 2, 4], [[3, 13], [2, 10], [1, 7]])]]\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":"0c158608dec0a084ad216121a96e05fb9eae6f6b37e3da5f000f539db5d5862f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    words, width, cap_lines, cap_width, gap, indent = x\n    lens = list(words)\n    if cap_lines > 0:\n        lens[0] = lens[0]\n    def avail(li):\n        base = width\n        if li < cap_lines:\n            base -= cap_width + gap\n        elif cap_lines == 0 and li == 0:\n            base -= indent\n        return base\n    lines = []\n    cur = []\n    used = 0\n    for w in lens:\n        li = len(lines)\n        need = w if not cur else used + 1 + w\n        if need <= avail(li) or not cur:\n            cur.append(w)\n            used = need\n        else:\n            lines.append([len(cur), used])\n            cur = [w]\n            used = w\n    if cur:\n        lines.append([len(cur), used])\n    return lines\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('three-line drop cap', [[5, 3, 4, 6, 2, 5, 4, 3], 14, 3, 3, 1, 2], [[2, 8], [1, 4], [2, 9], [3, 14]]), ('regression: initial letter consumption', [[7, 1, 4, 6, 4, 3, 7, 5], 13, 2, 5, 2, 3], [[1, 6], [2, 6], [2, 11], [2, 11], [1, 5]]), ('partial-repair probe', [[7, 1, 8, 5], 16, 0, 5, 1, 3], [[2, 9], [2, 14]]), ('partial-repair probe', [[1, 8, 8, 5, 8, 1, 2, 5], 17, 0, 2, 1, 3], [[2, 10], [2, 14], [3, 13], [1, 5]]), ('no cap uses indent', [[5, 3, 4, 6, 2], 12, 0, 3, 1, 3], [[2, 9], [2, 11], [1, 2]]), ('partial-repair probe', [[5, 2, 6, 6, 2, 6, 3, 3, 5, 3], 16, 0, 2, 1, 3], [[2, 8], [3, 16], [3, 14], [2, 9]]), ('partial-repair probe', [[6, 6, 8, 8, 8, 2, 3], 15, 0, 5, 1, 4], [[1, 6], [2, 15], [1, 8], [3, 15]]), ('partial-repair probe', [[1, 2, 6, 7, 1, 8], 20, 0, 3, 2, 2], [[3, 11], [3, 18]])], [('regression: initial letter consumption', [[8, 1, 6, 4, 1, 7, 7], 24, 2, 5, 2, 1], [[3, 16], [3, 14], [1, 7]]), ('regression: initial letter consumption', [[1, 2, 7, 6, 5, 2, 3], 17, 3, 5, 1, 3], [[3, 11], [1, 6], [2, 8], [1, 3]]), ('partial-repair probe', [[1, 8, 7, 5, 7, 8], 15, 0, 2, 2, 3], [[2, 10], [2, 13], [1, 7], [1, 8]]), ('partial-repair probe', [[2, 3, 3, 1, 7, 5, 6, 1, 3, 3, 5], 14, 0, 3, 1, 2], [[4, 12], [2, 13], [3, 12], [2, 9]]), ('three-line drop cap', [[5, 3, 4, 6, 2, 5, 4, 3], 14, 3, 3, 1, 2], [[2, 8], [1, 4], [2, 9], [3, 14]]), ('no cap uses indent', [[5, 3, 4, 6, 2], 12, 0, 3, 1, 3], [[2, 9], [2, 11], [1, 2]]), ('regression: initial letter consumption', [[3, 4, 3, 1, 5, 7, 5, 6, 6, 5, 5], 19, 2, 4, 2, 2], [[4, 13], [2, 13], [3, 19], [2, 11]]), ('partial-repair probe', [[6, 8, 2, 2, 5, 4, 5, 7], 24, 0, 2, 1, 2], [[4, 21], [4, 24]])], [('regression: initial letter consumption', [[2, 6, 7, 8, 2, 8, 5, 5, 1, 1, 5], 12, 3, 2, 1, 1], [[2, 8], [1, 7], [1, 8], [2, 11], [2, 11], [3, 9]]), ('regression: initial letter consumption', [[7, 2, 3, 8, 2, 8, 7], 22, 2, 5, 1, 1], [[3, 13], [2, 11], [2, 16]]), ('partial-repair probe', [[1, 6, 4, 2, 2, 2, 8], 15, 0, 4, 1, 3], [[2, 8], [4, 13], [1, 8]]), ('partial-repair probe', [[8, 1, 7, 5, 5, 4, 4, 8, 7], 22, 0, 5, 1, 2], [[3, 18], [4, 21], [2, 16]]), ('three-line drop cap', [[5, 3, 4, 6, 2, 5, 4, 3], 14, 3, 3, 1, 2], [[2, 8], [1, 4], [2, 9], [3, 14]]), ('no cap uses indent', [[5, 3, 4, 6, 2], 12, 0, 3, 1, 3], [[2, 9], [2, 11], [1, 2]]), ('partial-repair probe', [[3, 7, 4, 7], 24, 0, 2, 2, 4], [[3, 16], [1, 7]]), ('partial-repair probe', [[8, 2, 3, 5, 8, 1, 2], 12, 0, 4, 1, 1], [[2, 11], [2, 9], [2, 10], [1, 2]])], [('regression: initial letter consumption', [[2, 6, 7, 8, 1, 2, 5, 6, 8], 21, 2, 2, 2, 4], [[3, 16], [3, 13], [3, 21]]), ('regression: initial letter consumption', [[7, 6, 8, 6, 7, 6, 3, 5, 3, 6, 4], 13, 2, 4, 1, 1], [[1, 6], [1, 6], [1, 8], [1, 6], [1, 7], [2, 10], [2, 9], [2, 11]]), ('partial-repair probe', [[7, 4, 4, 1], 21, 0, 2, 2, 3], [[3, 17], [1, 1]]), ('partial-repair probe', [[3, 2, 8, 1, 5, 6, 1, 5, 8], 16, 0, 4, 2, 2], [[2, 6], [3, 16], [3, 14], [1, 8]]), ('no cap uses indent', [[5, 3, 4, 6, 2], 12, 0, 3, 1, 3], [[2, 9], [2, 11], [1, 2]]), ('three-line drop cap', [[5, 3, 4, 6, 2, 5, 4, 3], 14, 3, 3, 1, 2], [[2, 8], [1, 4], [2, 9], [3, 14]]), ('partial-repair probe', [[7, 6, 7, 4, 5, 3, 3, 5, 3, 5], 23, 0, 3, 2, 4], [[2, 14], [4, 22], [4, 19]]), ('regression: initial letter consumption', [[5, 4, 1, 4, 5, 5, 2, 7], 21, 3, 2, 1, 2], [[4, 16], [3, 14], [1, 7]])], [('regression: initial letter consumption', [[3, 1, 5, 1, 6], 22, 2, 5, 2, 4], [[4, 12], [1, 6]]), ('regression: initial letter consumption', [[6, 6, 3, 1, 6], 19, 2, 5, 1, 3], [[2, 12], [3, 12]]), ('partial-repair probe', [[3, 5, 6, 1, 6, 8, 2, 6, 1], 15, 0, 2, 2, 3], [[2, 9], [3, 15], [2, 11], [2, 8]]), ('partial-repair probe', [[2, 2, 2, 2, 1, 7, 6, 1, 1, 8, 3, 4], 23, 0, 4, 1, 2], [[6, 21], [5, 23], [1, 4]]), ('three-line drop cap', [[5, 3, 4, 6, 2, 5, 4, 3], 14, 3, 3, 1, 2], [[2, 8], [1, 4], [2, 9], [3, 14]]), ('no cap uses indent', [[5, 3, 4, 6, 2], 12, 0, 3, 1, 3], [[2, 9], [2, 11], [1, 2]]), ('regression: initial letter consumption', [[4, 3, 6, 1, 3, 3, 4, 6], 15, 3, 4, 1, 3], [[2, 7], [2, 8], [2, 7], [2, 11]]), ('regression: initial letter consumption', [[1, 5, 6, 6, 3, 7], 22, 2, 4, 2, 4], [[3, 13], [2, 10], [1, 7]])]]\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":"4d5d6bccc37cf5991b0fade8460243c855e8e12c62da218899cf514dab1d5973","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    words, width, cap_lines, cap_width, gap, indent = x\n    lens = list(words)\n    if cap_lines > 0:\n        lens[0] = lens[0] - 1\n    def avail(li):\n        base = width\n        if li < cap_lines:\n            base -= cap_width + gap\n        elif cap_lines == 0 and li == 0:\n            base -= indent\n        return base\n    lines = []\n    cur = []\n    used = 0\n    for w in lens:\n        li = len(lines)\n        need = w if not cur else used + 1 + w\n        if need <= avail(li) or not cur:\n            cur.append(w)\n            used = need\n        else:\n            lines.append([len(cur), used])\n            cur = [w]\n            used = w\n    if cur:\n        lines.append([len(cur), used])\n    return lines\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('three-line drop cap', [[5, 3, 4, 6, 2, 5, 4, 3], 14, 3, 3, 1, 2], [[2, 8], [1, 4], [2, 9], [3, 14]]), ('regression: initial letter consumption', [[7, 1, 4, 6, 4, 3, 7, 5], 13, 2, 5, 2, 3], [[1, 6], [2, 6], [2, 11], [2, 11], [1, 5]]), ('partial-repair probe', [[7, 1, 8, 5], 16, 0, 5, 1, 3], [[2, 9], [2, 14]]), ('partial-repair probe', [[1, 8, 8, 5, 8, 1, 2, 5], 17, 0, 2, 1, 3], [[2, 10], [2, 14], [3, 13], [1, 5]]), ('no cap uses indent', [[5, 3, 4, 6, 2], 12, 0, 3, 1, 3], [[2, 9], [2, 11], [1, 2]]), ('partial-repair probe', [[5, 2, 6, 6, 2, 6, 3, 3, 5, 3], 16, 0, 2, 1, 3], [[2, 8], [3, 16], [3, 14], [2, 9]]), ('partial-repair probe', [[6, 6, 8, 8, 8, 2, 3], 15, 0, 5, 1, 4], [[1, 6], [2, 15], [1, 8], [3, 15]]), ('partial-repair probe', [[1, 2, 6, 7, 1, 8], 20, 0, 3, 2, 2], [[3, 11], [3, 18]])], [('regression: initial letter consumption', [[8, 1, 6, 4, 1, 7, 7], 24, 2, 5, 2, 1], [[3, 16], [3, 14], [1, 7]]), ('regression: initial letter consumption', [[1, 2, 7, 6, 5, 2, 3], 17, 3, 5, 1, 3], [[3, 11], [1, 6], [2, 8], [1, 3]]), ('partial-repair probe', [[1, 8, 7, 5, 7, 8], 15, 0, 2, 2, 3], [[2, 10], [2, 13], [1, 7], [1, 8]]), ('partial-repair probe', [[2, 3, 3, 1, 7, 5, 6, 1, 3, 3, 5], 14, 0, 3, 1, 2], [[4, 12], [2, 13], [3, 12], [2, 9]]), ('three-line drop cap', [[5, 3, 4, 6, 2, 5, 4, 3], 14, 3, 3, 1, 2], [[2, 8], [1, 4], [2, 9], [3, 14]]), ('no cap uses indent', [[5, 3, 4, 6, 2], 12, 0, 3, 1, 3], [[2, 9], [2, 11], [1, 2]]), ('regression: initial letter consumption', [[3, 4, 3, 1, 5, 7, 5, 6, 6, 5, 5], 19, 2, 4, 2, 2], [[4, 13], [2, 13], [3, 19], [2, 11]]), ('partial-repair probe', [[6, 8, 2, 2, 5, 4, 5, 7], 24, 0, 2, 1, 2], [[4, 21], [4, 24]])], [('regression: initial letter consumption', [[2, 6, 7, 8, 2, 8, 5, 5, 1, 1, 5], 12, 3, 2, 1, 1], [[2, 8], [1, 7], [1, 8], [2, 11], [2, 11], [3, 9]]), ('regression: initial letter consumption', [[7, 2, 3, 8, 2, 8, 7], 22, 2, 5, 1, 1], [[3, 13], [2, 11], [2, 16]]), ('partial-repair probe', [[1, 6, 4, 2, 2, 2, 8], 15, 0, 4, 1, 3], [[2, 8], [4, 13], [1, 8]]), ('partial-repair probe', [[8, 1, 7, 5, 5, 4, 4, 8, 7], 22, 0, 5, 1, 2], [[3, 18], [4, 21], [2, 16]]), ('three-line drop cap', [[5, 3, 4, 6, 2, 5, 4, 3], 14, 3, 3, 1, 2], [[2, 8], [1, 4], [2, 9], [3, 14]]), ('no cap uses indent', [[5, 3, 4, 6, 2], 12, 0, 3, 1, 3], [[2, 9], [2, 11], [1, 2]]), ('partial-repair probe', [[3, 7, 4, 7], 24, 0, 2, 2, 4], [[3, 16], [1, 7]]), ('partial-repair probe', [[8, 2, 3, 5, 8, 1, 2], 12, 0, 4, 1, 1], [[2, 11], [2, 9], [2, 10], [1, 2]])], [('regression: initial letter consumption', [[2, 6, 7, 8, 1, 2, 5, 6, 8], 21, 2, 2, 2, 4], [[3, 16], [3, 13], [3, 21]]), ('regression: initial letter consumption', [[7, 6, 8, 6, 7, 6, 3, 5, 3, 6, 4], 13, 2, 4, 1, 1], [[1, 6], [1, 6], [1, 8], [1, 6], [1, 7], [2, 10], [2, 9], [2, 11]]), ('partial-repair probe', [[7, 4, 4, 1], 21, 0, 2, 2, 3], [[3, 17], [1, 1]]), ('partial-repair probe', [[3, 2, 8, 1, 5, 6, 1, 5, 8], 16, 0, 4, 2, 2], [[2, 6], [3, 16], [3, 14], [1, 8]]), ('no cap uses indent', [[5, 3, 4, 6, 2], 12, 0, 3, 1, 3], [[2, 9], [2, 11], [1, 2]]), ('three-line drop cap', [[5, 3, 4, 6, 2, 5, 4, 3], 14, 3, 3, 1, 2], [[2, 8], [1, 4], [2, 9], [3, 14]]), ('partial-repair probe', [[7, 6, 7, 4, 5, 3, 3, 5, 3, 5], 23, 0, 3, 2, 4], [[2, 14], [4, 22], [4, 19]]), ('regression: initial letter consumption', [[5, 4, 1, 4, 5, 5, 2, 7], 21, 3, 2, 1, 2], [[4, 16], [3, 14], [1, 7]])], [('regression: initial letter consumption', [[3, 1, 5, 1, 6], 22, 2, 5, 2, 4], [[4, 12], [1, 6]]), ('regression: initial letter consumption', [[6, 6, 3, 1, 6], 19, 2, 5, 1, 3], [[2, 12], [3, 12]]), ('partial-repair probe', [[3, 5, 6, 1, 6, 8, 2, 6, 1], 15, 0, 2, 2, 3], [[2, 9], [3, 15], [2, 11], [2, 8]]), ('partial-repair probe', [[2, 2, 2, 2, 1, 7, 6, 1, 1, 8, 3, 4], 23, 0, 4, 1, 2], [[6, 21], [5, 23], [1, 4]]), ('three-line drop cap', [[5, 3, 4, 6, 2, 5, 4, 3], 14, 3, 3, 1, 2], [[2, 8], [1, 4], [2, 9], [3, 14]]), ('no cap uses indent', [[5, 3, 4, 6, 2], 12, 0, 3, 1, 3], [[2, 9], [2, 11], [1, 2]]), ('regression: initial letter consumption', [[4, 3, 6, 1, 3, 3, 4, 6], 15, 3, 4, 1, 3], [[2, 7], [2, 8], [2, 7], [2, 11]]), ('regression: initial letter consumption', [[1, 5, 6, 6, 3, 7], 22, 2, 4, 2, 4], [[3, 13], [2, 10], [1, 7]])]]\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-drop-cap-initial-letter-consumption","generated_at":"2026-09-29T14:49:50.893641+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":"Remove one unit from the first word when a cap is present.","root_cause":"The first word keeps its full width although its first letter moved into the cap.","sha256":"89ffdae90f9b7738c0475a132272615229b70fb64f2e0e60e853c142ecfa72ef","title":"Drop cap shaped paragraph: initial letter consumption · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.969,"exit_code":1,"observations":[{"actual":[[2,8],[1,4],[2,9],[3,14]],"check":"three-line drop cap","expected":[[2,8],[1,4],[2,9],[3,14]],"passed":true},{"actual":[[1,6],[2,6],[2,11],[2,11],[1,5]],"check":"regression: initial letter consumption","expected":[[1,6],[2,6],[2,11],[2,11],[1,5]],"passed":true},{"actual":[[2,8],[2,14]],"check":"partial-repair probe","expected":[[2,9],[2,14]],"passed":false},{"actual":[[2,9],[2,14],[3,13],[1,5]],"check":"partial-repair probe","expected":[[2,10],[2,14],[3,13],[1,5]],"passed":false},{"actual":[[2,8],[2,11],[1,2]],"check":"no cap uses indent","expected":[[2,9],[2,11],[1,2]],"passed":false},{"actual":[[2,7],[3,16],[3,14],[2,9]],"check":"partial-repair probe","expected":[[2,8],[3,16],[3,14],[2,9]],"passed":false},{"actual":[[1,5],[2,15],[1,8],[3,15]],"check":"partial-repair probe","expected":[[1,6],[2,15],[1,8],[3,15]],"passed":false},{"actual":[[4,18],[2,10]],"check":"partial-repair probe","expected":[[3,11],[3,18]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"three-line drop cap\", \"actual\": [[2, 8], [1, 4], [2, 9], [3, 14]], \"expected\": [[2, 8], [1, 4], [2, 9], [3, 14]], \"passed\": true}, {\"check\": \"regression: initial letter consumption\", \"actual\": [[1, 6], [2, 6], [2, 11], [2, 11], [1, 5]], \"expected\": [[1, 6], [2, 6], [2, 11], [2, 11], [1, 5]], \"passed\": true}, {\"check\": \"partial-repair probe\", \"actual\": [[2, 8], [2, 14]], \"expected\": [[2, 9], [2, 14]], \"passed\": false}, {\"check\": \"partial-repair probe\", \"actual\": [[2, 9], [2, 14], [3, 13], [1, 5]], \"expected\": [[2, 10], [2, 14], [3, 13], [1, 5]], \"passed\": false}, {\"check\": \"no cap uses indent\", \"actual\": [[2, 8], [2, 11], [1, 2]], \"expected\": [[2, 9], [2, 11], [1, 2]], \"passed\": false}, {\"check\": \"partial-repair probe\", \"actual\": [[2, 7], [3, 16], [3, 14], [2, 9]], \"expected\": [[2, 8], [3, 16], [3, 14], [2, 9]], \"passed\": false}, {\"check\": \"partial-repair probe\", \"actual\": [[1, 5], [2, 15], [1, 8], [3, 15]], \"expected\": [[1, 6], [2, 15], [1, 8], [3, 15]], \"passed\": false}, {\"check\": \"partial-repair probe\", \"actual\": [[4, 18], [2, 10]], \"expected\": [[3, 11], [3, 18]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.364,"exit_code":1,"observations":[{"actual":[[2,9],[1,4],[2,9],[3,14]],"check":"three-line drop cap","expected":[[2,8],[1,4],[2,9],[3,14]],"passed":false},{"actual":[[1,7],[2,6],[2,11],[2,11],[1,5]],"check":"regression: initial letter consumption","expected":[[1,6],[2,6],[2,11],[2,11],[1,5]],"passed":false},{"actual":[[2,9],[2,14]],"check":"partial-repair probe","expected":[[2,9],[2,14]],"passed":true},{"actual":[[2,10],[2,14],[3,13],[1,5]],"check":"partial-repair probe","expected":[[2,10],[2,14],[3,13],[1,5]],"passed":true},{"actual":[[2,9],[2,11],[1,2]],"check":"no cap uses indent","expected":[[2,9],[2,11],[1,2]],"passed":true},{"actual":[[2,8],[3,16],[3,14],[2,9]],"check":"partial-repair probe","expected":[[2,8],[3,16],[3,14],[2,9]],"passed":true},{"actual":[[1,6],[2,15],[1,8],[3,15]],"check":"partial-repair probe","expected":[[1,6],[2,15],[1,8],[3,15]],"passed":true},{"actual":[[3,11],[3,18]],"check":"partial-repair probe","expected":[[3,11],[3,18]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"three-line drop cap\", \"actual\": [[2, 9], [1, 4], [2, 9], [3, 14]], \"expected\": [[2, 8], [1, 4], [2, 9], [3, 14]], \"passed\": false}, {\"check\": \"regression: initial letter consumption\", \"actual\": [[1, 7], [2, 6], [2, 11], [2, 11], [1, 5]], \"expected\": [[1, 6], [2, 6], [2, 11], [2, 11], [1, 5]], \"passed\": false}, {\"check\": \"partial-repair probe\", \"actual\": [[2, 9], [2, 14]], \"expected\": [[2, 9], [2, 14]], \"passed\": true}, {\"check\": \"partial-repair probe\", \"actual\": [[2, 10], [2, 14], [3, 13], [1, 5]], \"expected\": [[2, 10], [2, 14], [3, 13], [1, 5]], \"passed\": true}, {\"check\": \"no cap uses indent\", \"actual\": [[2, 9], [2, 11], [1, 2]], \"expected\": [[2, 9], [2, 11], [1, 2]], \"passed\": true}, {\"check\": \"partial-repair probe\", \"actual\": [[2, 8], [3, 16], [3, 14], [2, 9]], \"expected\": [[2, 8], [3, 16], [3, 14], [2, 9]], \"passed\": true}, {\"check\": \"partial-repair probe\", \"actual\": [[1, 6], [2, 15], [1, 8], [3, 15]], \"expected\": [[1, 6], [2, 15], [1, 8], [3, 15]], \"passed\": true}, {\"check\": \"partial-repair probe\", \"actual\": [[3, 11], [3, 18]], \"expected\": [[3, 11], [3, 18]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.443,"exit_code":0,"observations":[{"actual":[[2,8],[1,4],[2,9],[3,14]],"check":"three-line drop cap","expected":[[2,8],[1,4],[2,9],[3,14]],"passed":true},{"actual":[[1,6],[2,6],[2,11],[2,11],[1,5]],"check":"regression: initial letter consumption","expected":[[1,6],[2,6],[2,11],[2,11],[1,5]],"passed":true},{"actual":[[2,9],[2,14]],"check":"partial-repair probe","expected":[[2,9],[2,14]],"passed":true},{"actual":[[2,10],[2,14],[3,13],[1,5]],"check":"partial-repair probe","expected":[[2,10],[2,14],[3,13],[1,5]],"passed":true},{"actual":[[2,9],[2,11],[1,2]],"check":"no cap uses indent","expected":[[2,9],[2,11],[1,2]],"passed":true},{"actual":[[2,8],[3,16],[3,14],[2,9]],"check":"partial-repair probe","expected":[[2,8],[3,16],[3,14],[2,9]],"passed":true},{"actual":[[1,6],[2,15],[1,8],[3,15]],"check":"partial-repair probe","expected":[[1,6],[2,15],[1,8],[3,15]],"passed":true},{"actual":[[3,11],[3,18]],"check":"partial-repair probe","expected":[[3,11],[3,18]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"three-line drop cap\", \"actual\": [[2, 8], [1, 4], [2, 9], [3, 14]], \"expected\": [[2, 8], [1, 4], [2, 9], [3, 14]], \"passed\": true}, {\"check\": \"regression: initial letter consumption\", \"actual\": [[1, 6], [2, 6], [2, 11], [2, 11], [1, 5]], \"expected\": [[1, 6], [2, 6], [2, 11], [2, 11], [1, 5]], \"passed\": true}, {\"check\": \"partial-repair probe\", \"actual\": [[2, 9], [2, 14]], \"expected\": [[2, 9], [2, 14]], \"passed\": true}, {\"check\": \"partial-repair probe\", \"actual\": [[2, 10], [2, 14], [3, 13], [1, 5]], \"expected\": [[2, 10], [2, 14], [3, 13], [1, 5]], \"passed\": true}, {\"check\": \"no cap uses indent\", \"actual\": [[2, 9], [2, 11], [1, 2]], \"expected\": [[2, 9], [2, 11], [1, 2]], \"passed\": true}, {\"check\": \"partial-repair probe\", \"actual\": [[2, 8], [3, 16], [3, 14], [2, 9]], \"expected\": [[2, 8], [3, 16], [3, 14], [2, 9]], \"passed\": true}, {\"check\": \"partial-repair probe\", \"actual\": [[1, 6], [2, 15], [1, 8], [3, 15]], \"expected\": [[1, 6], [2, 15], [1, 8], [3, 15]], \"passed\": true}, {\"check\": \"partial-repair probe\", \"actual\": [[3, 11], [3, 18]], \"expected\": [[3, 11], [3, 18]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}