{"abstract":"One line too many is narrowed around the drop cap.","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":"Narrowing cap_lines - 1 lines lets text collide with the cap.","family":"w2-typography-line-breaking-drop-cap-cap-line-count","id":"FA-80096","implementations":{"attempt":{"sha256":"a663cb2e41a94de30a8acc78c9c4ef747758a4fa4c5f56893a9c0bf33d5577dd","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 - 1:\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: cap line count', [[4, 2, 7, 3, 8, 6, 3, 7, 1, 6, 6], 20, 3, 5, 1, 2], [[3, 14], [2, 12], [2, 10], [3, 16], [1, 6]]), ('partial-repair probe', [[5, 2, 8, 7, 8], 17, 3, 5, 2, 3], [[2, 7], [1, 8], [1, 7], [1, 8]]), ('regression: cap line count', [[5, 4, 2, 7, 7, 7, 5, 8, 6, 5], 16, 3, 3, 2, 1], [[2, 9], [2, 10], [1, 7], [2, 13], [2, 15], [1, 5]]), ('no cap uses indent', [[5, 3, 4, 6, 2], 12, 0, 3, 1, 3], [[2, 9], [2, 11], [1, 2]]), ('control layout', [[4, 4, 4, 2, 8, 5, 8, 2, 4, 7], 24, 0, 3, 2, 3], [[4, 17], [3, 23], [3, 15]]), ('control layout', [[7, 1, 2, 7], 15, 0, 3, 1, 4], [[2, 9], [2, 10]]), ('control layout', [[1, 3, 4, 7, 7, 7, 1, 1, 1, 4, 2], 22, 3, 2, 2, 2], [[4, 17], [3, 17], [4, 11]])], [('regression: cap line count', [[8, 7, 8, 7, 2, 1, 4, 7, 2, 5, 3, 4], 18, 3, 4, 2, 4], [[1, 7], [1, 7], [1, 8], [4, 17], [3, 16], [2, 8]]), ('regression: cap line count', [[2, 6, 4, 5, 1, 8, 2, 8, 5, 1, 2, 2], 23, 2, 2, 2, 1], [[4, 19], [3, 13], [5, 22]]), ('partial-repair probe', [[4, 6, 1, 3, 2, 6, 7, 7, 4, 2, 7], 21, 3, 5, 1, 1], [[3, 12], [3, 13], [2, 15], [3, 15]]), ('partial-repair probe', [[2, 5, 6, 7, 8, 3], 22, 2, 4, 2, 4], [[3, 14], [2, 16], [1, 3]]), ('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]]), ('control layout', [[1, 2, 3, 2, 5, 8, 3], 18, 0, 2, 1, 4], [[4, 11], [3, 18]]), ('control layout', [[6, 2, 4, 6, 4, 2, 6, 5, 4, 7], 21, 0, 2, 2, 2], [[3, 14], [4, 21], [3, 18]])], [('regression: cap line count', [[5, 5, 1, 2, 3, 5, 2, 6, 5, 6, 1], 22, 0, 3, 1, 1], [[5, 20], [4, 21], [2, 8]]), ('regression: cap line count', [[6, 6, 6, 6, 8], 22, 0, 2, 1, 2], [[3, 20], [2, 15]]), ('partial-repair probe', [[8, 1, 6, 4, 1, 7, 7], 24, 2, 5, 2, 1], [[3, 16], [3, 14], [1, 7]]), ('partial-repair probe', [[7, 7, 3, 3, 6, 5, 4], 20, 2, 4, 1, 4], [[2, 14], [3, 14], [2, 10]]), ('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]]), ('control layout', [[5, 7, 1, 6, 7, 3, 3], 22, 0, 3, 1, 3], [[3, 15], [4, 22]]), ('control layout', [[7, 7, 3, 4, 2, 1, 3], 19, 3, 3, 2, 4], [[2, 14], [4, 13], [1, 3]])], [('regression: cap line count', [[2, 4, 4, 5, 6, 5], 15, 2, 4, 1, 4], [[2, 6], [2, 10], [2, 12]]), ('regression: cap line count', [[3, 5, 6, 3, 7, 1, 2, 3, 2, 4], 17, 3, 5, 1, 2], [[2, 8], [2, 10], [2, 9], [4, 14]]), ('partial-repair probe', [[7, 7, 3, 3, 6, 5, 4], 20, 2, 4, 1, 4], [[2, 14], [3, 14], [2, 10]]), ('regression: cap line count', [[1, 1, 2, 8, 1, 4, 1, 1, 5, 5, 3, 6], 15, 2, 5, 1, 1], [[3, 5], [1, 8], [4, 10], [3, 15], [1, 6]]), ('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]]), ('control layout', [[5, 1, 2, 3], 20, 0, 2, 2, 2], [[4, 14]]), ('control layout', [[8, 2, 5, 2, 7], 19, 3, 4, 2, 3], [[2, 10], [2, 8], [1, 7]])], [('regression: cap line count', [[1, 4, 5, 4, 2, 4, 7, 1], 22, 0, 5, 2, 1], [[5, 20], [3, 14]]), ('regression: cap line count', [[6, 5, 5, 5, 6, 6, 8, 2, 3, 8, 3, 1], 16, 0, 4, 1, 4], [[2, 12], [2, 11], [2, 13], [3, 15], [3, 14]]), ('partial-repair probe', [[1, 5, 5, 4, 2, 3, 3], 13, 2, 2, 1, 3], [[2, 6], [2, 10], [3, 10]]), ('partial-repair probe', [[5, 5, 5, 5, 7, 7, 7, 2], 23, 2, 4, 1, 3], [[3, 16], [2, 13], [3, 18]]), ('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]]), ('control layout', [[3, 1, 1, 8, 2], 20, 2, 3, 1, 4], [[4, 15], [1, 2]]), ('control layout', [[7, 1, 4, 6], 19, 0, 4, 1, 4], [[3, 14], [1, 6]])]]\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":"7640acc8e4ca4e5aef1f1cbe91f97ef7b9a2a29f18867b76ef9d5cf270db3ee1","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: cap line count', [[4, 2, 7, 3, 8, 6, 3, 7, 1, 6, 6], 20, 3, 5, 1, 2], [[3, 14], [2, 12], [2, 10], [3, 16], [1, 6]]), ('partial-repair probe', [[5, 2, 8, 7, 8], 17, 3, 5, 2, 3], [[2, 7], [1, 8], [1, 7], [1, 8]]), ('regression: cap line count', [[5, 4, 2, 7, 7, 7, 5, 8, 6, 5], 16, 3, 3, 2, 1], [[2, 9], [2, 10], [1, 7], [2, 13], [2, 15], [1, 5]]), ('no cap uses indent', [[5, 3, 4, 6, 2], 12, 0, 3, 1, 3], [[2, 9], [2, 11], [1, 2]]), ('control layout', [[4, 4, 4, 2, 8, 5, 8, 2, 4, 7], 24, 0, 3, 2, 3], [[4, 17], [3, 23], [3, 15]]), ('control layout', [[7, 1, 2, 7], 15, 0, 3, 1, 4], [[2, 9], [2, 10]]), ('control layout', [[1, 3, 4, 7, 7, 7, 1, 1, 1, 4, 2], 22, 3, 2, 2, 2], [[4, 17], [3, 17], [4, 11]])], [('regression: cap line count', [[8, 7, 8, 7, 2, 1, 4, 7, 2, 5, 3, 4], 18, 3, 4, 2, 4], [[1, 7], [1, 7], [1, 8], [4, 17], [3, 16], [2, 8]]), ('regression: cap line count', [[2, 6, 4, 5, 1, 8, 2, 8, 5, 1, 2, 2], 23, 2, 2, 2, 1], [[4, 19], [3, 13], [5, 22]]), ('partial-repair probe', [[4, 6, 1, 3, 2, 6, 7, 7, 4, 2, 7], 21, 3, 5, 1, 1], [[3, 12], [3, 13], [2, 15], [3, 15]]), ('partial-repair probe', [[2, 5, 6, 7, 8, 3], 22, 2, 4, 2, 4], [[3, 14], [2, 16], [1, 3]]), ('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]]), ('control layout', [[1, 2, 3, 2, 5, 8, 3], 18, 0, 2, 1, 4], [[4, 11], [3, 18]]), ('control layout', [[6, 2, 4, 6, 4, 2, 6, 5, 4, 7], 21, 0, 2, 2, 2], [[3, 14], [4, 21], [3, 18]])], [('regression: cap line count', [[5, 5, 1, 2, 3, 5, 2, 6, 5, 6, 1], 22, 0, 3, 1, 1], [[5, 20], [4, 21], [2, 8]]), ('regression: cap line count', [[6, 6, 6, 6, 8], 22, 0, 2, 1, 2], [[3, 20], [2, 15]]), ('partial-repair probe', [[8, 1, 6, 4, 1, 7, 7], 24, 2, 5, 2, 1], [[3, 16], [3, 14], [1, 7]]), ('partial-repair probe', [[7, 7, 3, 3, 6, 5, 4], 20, 2, 4, 1, 4], [[2, 14], [3, 14], [2, 10]]), ('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]]), ('control layout', [[5, 7, 1, 6, 7, 3, 3], 22, 0, 3, 1, 3], [[3, 15], [4, 22]]), ('control layout', [[7, 7, 3, 4, 2, 1, 3], 19, 3, 3, 2, 4], [[2, 14], [4, 13], [1, 3]])], [('regression: cap line count', [[2, 4, 4, 5, 6, 5], 15, 2, 4, 1, 4], [[2, 6], [2, 10], [2, 12]]), ('regression: cap line count', [[3, 5, 6, 3, 7, 1, 2, 3, 2, 4], 17, 3, 5, 1, 2], [[2, 8], [2, 10], [2, 9], [4, 14]]), ('partial-repair probe', [[7, 7, 3, 3, 6, 5, 4], 20, 2, 4, 1, 4], [[2, 14], [3, 14], [2, 10]]), ('regression: cap line count', [[1, 1, 2, 8, 1, 4, 1, 1, 5, 5, 3, 6], 15, 2, 5, 1, 1], [[3, 5], [1, 8], [4, 10], [3, 15], [1, 6]]), ('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]]), ('control layout', [[5, 1, 2, 3], 20, 0, 2, 2, 2], [[4, 14]]), ('control layout', [[8, 2, 5, 2, 7], 19, 3, 4, 2, 3], [[2, 10], [2, 8], [1, 7]])], [('regression: cap line count', [[1, 4, 5, 4, 2, 4, 7, 1], 22, 0, 5, 2, 1], [[5, 20], [3, 14]]), ('regression: cap line count', [[6, 5, 5, 5, 6, 6, 8, 2, 3, 8, 3, 1], 16, 0, 4, 1, 4], [[2, 12], [2, 11], [2, 13], [3, 15], [3, 14]]), ('partial-repair probe', [[1, 5, 5, 4, 2, 3, 3], 13, 2, 2, 1, 3], [[2, 6], [2, 10], [3, 10]]), ('partial-repair probe', [[5, 5, 5, 5, 7, 7, 7, 2], 23, 2, 4, 1, 3], [[3, 16], [2, 13], [3, 18]]), ('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]]), ('control layout', [[3, 1, 1, 8, 2], 20, 2, 3, 1, 4], [[4, 15], [1, 2]]), ('control layout', [[7, 1, 4, 6], 19, 0, 4, 1, 4], [[3, 14], [1, 6]])]]\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":"82d82c93044504288ba568f286c49d169e2edea7e5155118855849fd08ec351d","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: cap line count', [[4, 2, 7, 3, 8, 6, 3, 7, 1, 6, 6], 20, 3, 5, 1, 2], [[3, 14], [2, 12], [2, 10], [3, 16], [1, 6]]), ('partial-repair probe', [[5, 2, 8, 7, 8], 17, 3, 5, 2, 3], [[2, 7], [1, 8], [1, 7], [1, 8]]), ('regression: cap line count', [[5, 4, 2, 7, 7, 7, 5, 8, 6, 5], 16, 3, 3, 2, 1], [[2, 9], [2, 10], [1, 7], [2, 13], [2, 15], [1, 5]]), ('no cap uses indent', [[5, 3, 4, 6, 2], 12, 0, 3, 1, 3], [[2, 9], [2, 11], [1, 2]]), ('control layout', [[4, 4, 4, 2, 8, 5, 8, 2, 4, 7], 24, 0, 3, 2, 3], [[4, 17], [3, 23], [3, 15]]), ('control layout', [[7, 1, 2, 7], 15, 0, 3, 1, 4], [[2, 9], [2, 10]]), ('control layout', [[1, 3, 4, 7, 7, 7, 1, 1, 1, 4, 2], 22, 3, 2, 2, 2], [[4, 17], [3, 17], [4, 11]])], [('regression: cap line count', [[8, 7, 8, 7, 2, 1, 4, 7, 2, 5, 3, 4], 18, 3, 4, 2, 4], [[1, 7], [1, 7], [1, 8], [4, 17], [3, 16], [2, 8]]), ('regression: cap line count', [[2, 6, 4, 5, 1, 8, 2, 8, 5, 1, 2, 2], 23, 2, 2, 2, 1], [[4, 19], [3, 13], [5, 22]]), ('partial-repair probe', [[4, 6, 1, 3, 2, 6, 7, 7, 4, 2, 7], 21, 3, 5, 1, 1], [[3, 12], [3, 13], [2, 15], [3, 15]]), ('partial-repair probe', [[2, 5, 6, 7, 8, 3], 22, 2, 4, 2, 4], [[3, 14], [2, 16], [1, 3]]), ('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]]), ('control layout', [[1, 2, 3, 2, 5, 8, 3], 18, 0, 2, 1, 4], [[4, 11], [3, 18]]), ('control layout', [[6, 2, 4, 6, 4, 2, 6, 5, 4, 7], 21, 0, 2, 2, 2], [[3, 14], [4, 21], [3, 18]])], [('regression: cap line count', [[5, 5, 1, 2, 3, 5, 2, 6, 5, 6, 1], 22, 0, 3, 1, 1], [[5, 20], [4, 21], [2, 8]]), ('regression: cap line count', [[6, 6, 6, 6, 8], 22, 0, 2, 1, 2], [[3, 20], [2, 15]]), ('partial-repair probe', [[8, 1, 6, 4, 1, 7, 7], 24, 2, 5, 2, 1], [[3, 16], [3, 14], [1, 7]]), ('partial-repair probe', [[7, 7, 3, 3, 6, 5, 4], 20, 2, 4, 1, 4], [[2, 14], [3, 14], [2, 10]]), ('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]]), ('control layout', [[5, 7, 1, 6, 7, 3, 3], 22, 0, 3, 1, 3], [[3, 15], [4, 22]]), ('control layout', [[7, 7, 3, 4, 2, 1, 3], 19, 3, 3, 2, 4], [[2, 14], [4, 13], [1, 3]])], [('regression: cap line count', [[2, 4, 4, 5, 6, 5], 15, 2, 4, 1, 4], [[2, 6], [2, 10], [2, 12]]), ('regression: cap line count', [[3, 5, 6, 3, 7, 1, 2, 3, 2, 4], 17, 3, 5, 1, 2], [[2, 8], [2, 10], [2, 9], [4, 14]]), ('partial-repair probe', [[7, 7, 3, 3, 6, 5, 4], 20, 2, 4, 1, 4], [[2, 14], [3, 14], [2, 10]]), ('regression: cap line count', [[1, 1, 2, 8, 1, 4, 1, 1, 5, 5, 3, 6], 15, 2, 5, 1, 1], [[3, 5], [1, 8], [4, 10], [3, 15], [1, 6]]), ('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]]), ('control layout', [[5, 1, 2, 3], 20, 0, 2, 2, 2], [[4, 14]]), ('control layout', [[8, 2, 5, 2, 7], 19, 3, 4, 2, 3], [[2, 10], [2, 8], [1, 7]])], [('regression: cap line count', [[1, 4, 5, 4, 2, 4, 7, 1], 22, 0, 5, 2, 1], [[5, 20], [3, 14]]), ('regression: cap line count', [[6, 5, 5, 5, 6, 6, 8, 2, 3, 8, 3, 1], 16, 0, 4, 1, 4], [[2, 12], [2, 11], [2, 13], [3, 15], [3, 14]]), ('partial-repair probe', [[1, 5, 5, 4, 2, 3, 3], 13, 2, 2, 1, 3], [[2, 6], [2, 10], [3, 10]]), ('partial-repair probe', [[5, 5, 5, 5, 7, 7, 7, 2], 23, 2, 4, 1, 3], [[3, 16], [2, 13], [3, 18]]), ('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]]), ('control layout', [[3, 1, 1, 8, 2], 20, 2, 3, 1, 4], [[4, 15], [1, 2]]), ('control layout', [[7, 1, 4, 6], 19, 0, 4, 1, 4], [[3, 14], [1, 6]])]]\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-cap-line-count","generated_at":"2026-09-29T14:49:50.844719+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":"Narrow exactly the first cap_lines lines.","root_cause":"The narrowed-line test uses <= cap_lines.","sha256":"ca74c180817986b4ea219c1c227e8934db1f6e39ad30c022cca1be567f4a0d5e","title":"Drop cap shaped paragraph: cap line count · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":39.69,"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":[[3,14],[2,12],[4,20],[2,13]],"check":"regression: cap line count","expected":[[3,14],[2,12],[2,10],[3,16],[1,6]],"passed":false},{"actual":[[2,7],[1,8],[2,16]],"check":"partial-repair probe","expected":[[2,7],[1,8],[1,7],[1,8]],"passed":false},{"actual":[[2,9],[2,10],[2,15],[2,14],[2,12]],"check":"regression: cap line count","expected":[[2,9],[2,10],[1,7],[2,13],[2,15],[1,5]],"passed":false},{"actual":[[2,9],[2,11],[1,2]],"check":"no cap uses indent","expected":[[2,9],[2,11],[1,2]],"passed":true},{"actual":[[4,17],[3,23],[3,15]],"check":"control layout","expected":[[4,17],[3,23],[3,15]],"passed":true},{"actual":[[2,9],[2,10]],"check":"control layout","expected":[[2,9],[2,10]],"passed":true},{"actual":[[4,17],[3,17],[4,11]],"check":"control layout","expected":[[4,17],[3,17],[4,11]],"passed":true}],"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: cap line count\", \"actual\": [[3, 14], [2, 12], [4, 20], [2, 13]], \"expected\": [[3, 14], [2, 12], [2, 10], [3, 16], [1, 6]], \"passed\": false}, {\"check\": \"partial-repair probe\", \"actual\": [[2, 7], [1, 8], [2, 16]], \"expected\": [[2, 7], [1, 8], [1, 7], [1, 8]], \"passed\": false}, {\"check\": \"regression: cap line count\", \"actual\": [[2, 9], [2, 10], [2, 15], [2, 14], [2, 12]], \"expected\": [[2, 9], [2, 10], [1, 7], [2, 13], [2, 15], [1, 5]], \"passed\": false}, {\"check\": \"no cap uses indent\", \"actual\": [[2, 9], [2, 11], [1, 2]], \"expected\": [[2, 9], [2, 11], [1, 2]], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [[4, 17], [3, 23], [3, 15]], \"expected\": [[4, 17], [3, 23], [3, 15]], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [[2, 9], [2, 10]], \"expected\": [[2, 9], [2, 10]], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [[4, 17], [3, 17], [4, 11]], \"expected\": [[4, 17], [3, 17], [4, 11]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.041,"exit_code":1,"observations":[{"actual":[[2,8],[1,4],[2,9],[2,10],[1,3]],"check":"three-line drop cap","expected":[[2,8],[1,4],[2,9],[3,14]],"passed":false},{"actual":[[3,14],[2,12],[2,10],[2,9],[2,13]],"check":"regression: cap line count","expected":[[3,14],[2,12],[2,10],[3,16],[1,6]],"passed":false},{"actual":[[2,7],[1,8],[1,7],[1,8]],"check":"partial-repair probe","expected":[[2,7],[1,8],[1,7],[1,8]],"passed":true},{"actual":[[2,9],[2,10],[1,7],[1,7],[2,14],[2,12]],"check":"regression: cap line count","expected":[[2,9],[2,10],[1,7],[2,13],[2,15],[1,5]],"passed":false},{"actual":[[1,5],[2,8],[2,9]],"check":"no cap uses indent","expected":[[2,9],[2,11],[1,2]],"passed":false},{"actual":[[4,17],[3,23],[3,15]],"check":"control layout","expected":[[4,17],[3,23],[3,15]],"passed":true},{"actual":[[2,9],[2,10]],"check":"control layout","expected":[[2,9],[2,10]],"passed":true},{"actual":[[4,17],[3,17],[4,11]],"check":"control layout","expected":[[4,17],[3,17],[4,11]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"three-line drop cap\", \"actual\": [[2, 8], [1, 4], [2, 9], [2, 10], [1, 3]], \"expected\": [[2, 8], [1, 4], [2, 9], [3, 14]], \"passed\": false}, {\"check\": \"regression: cap line count\", \"actual\": [[3, 14], [2, 12], [2, 10], [2, 9], [2, 13]], \"expected\": [[3, 14], [2, 12], [2, 10], [3, 16], [1, 6]], \"passed\": false}, {\"check\": \"partial-repair probe\", \"actual\": [[2, 7], [1, 8], [1, 7], [1, 8]], \"expected\": [[2, 7], [1, 8], [1, 7], [1, 8]], \"passed\": true}, {\"check\": \"regression: cap line count\", \"actual\": [[2, 9], [2, 10], [1, 7], [1, 7], [2, 14], [2, 12]], \"expected\": [[2, 9], [2, 10], [1, 7], [2, 13], [2, 15], [1, 5]], \"passed\": false}, {\"check\": \"no cap uses indent\", \"actual\": [[1, 5], [2, 8], [2, 9]], \"expected\": [[2, 9], [2, 11], [1, 2]], \"passed\": false}, {\"check\": \"control layout\", \"actual\": [[4, 17], [3, 23], [3, 15]], \"expected\": [[4, 17], [3, 23], [3, 15]], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [[2, 9], [2, 10]], \"expected\": [[2, 9], [2, 10]], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [[4, 17], [3, 17], [4, 11]], \"expected\": [[4, 17], [3, 17], [4, 11]], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.14,"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":[[3,14],[2,12],[2,10],[3,16],[1,6]],"check":"regression: cap line count","expected":[[3,14],[2,12],[2,10],[3,16],[1,6]],"passed":true},{"actual":[[2,7],[1,8],[1,7],[1,8]],"check":"partial-repair probe","expected":[[2,7],[1,8],[1,7],[1,8]],"passed":true},{"actual":[[2,9],[2,10],[1,7],[2,13],[2,15],[1,5]],"check":"regression: cap line count","expected":[[2,9],[2,10],[1,7],[2,13],[2,15],[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":[[4,17],[3,23],[3,15]],"check":"control layout","expected":[[4,17],[3,23],[3,15]],"passed":true},{"actual":[[2,9],[2,10]],"check":"control layout","expected":[[2,9],[2,10]],"passed":true},{"actual":[[4,17],[3,17],[4,11]],"check":"control layout","expected":[[4,17],[3,17],[4,11]],"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: cap line count\", \"actual\": [[3, 14], [2, 12], [2, 10], [3, 16], [1, 6]], \"expected\": [[3, 14], [2, 12], [2, 10], [3, 16], [1, 6]], \"passed\": true}, {\"check\": \"partial-repair probe\", \"actual\": [[2, 7], [1, 8], [1, 7], [1, 8]], \"expected\": [[2, 7], [1, 8], [1, 7], [1, 8]], \"passed\": true}, {\"check\": \"regression: cap line count\", \"actual\": [[2, 9], [2, 10], [1, 7], [2, 13], [2, 15], [1, 5]], \"expected\": [[2, 9], [2, 10], [1, 7], [2, 13], [2, 15], [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\": \"control layout\", \"actual\": [[4, 17], [3, 23], [3, 15]], \"expected\": [[4, 17], [3, 23], [3, 15]], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [[2, 9], [2, 10]], \"expected\": [[2, 9], [2, 10]], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [[4, 17], [3, 17], [4, 11]], \"expected\": [[4, 17], [3, 17], [4, 11]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}