{"abstract":"Lines set at exactly the minimum space are rejected as overfull.","category":"Typography line breaking","checks":8,"contract":"Input [word widths, target width, is_last, natural space, min space, max space]. Last lines and single-word lines are set ragged with natural spaces. Otherwise distribute target-sum(words) over the gaps: equal share with the remainder units added to the rightmost gaps; a share below min space is [\"overfull\"]; if any gap would exceed max space fall back to ragged. Return word x positions.","contract_signature":"x","evaluation_group":"w2-typography-line-breaking-justify-spaces","failed_approach":"Comparing the whole space budget with the minimum misses multi-gap lines.","family":"w2-typography-line-breaking-justify-spaces-minimum-space-check","id":"FA-80076","implementations":{"attempt":{"sha256":"88e135d7023edeee38bcdfbfe1f59f9d031920ba927b6829fd1cdb085a60f9e8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    words, target, is_last, sp, lo, hi = x\n    n = len(words)\n    gaps = n - 1\n    def natural():\n        pos, xx = [], 0\n        for w in words:\n            pos.append(xx)\n            xx += w + sp\n        return pos\n    if is_last or gaps == 0:\n        return natural()\n    space = target - sum(words)\n    per, rem = divmod(space, gaps)\n    if space < lo:\n        return ['overfull']\n    if per + (1 if rem else 0) > hi:\n        return natural()\n    pos, xx = [], 0\n    for k, w in enumerate(words):\n        pos.append(xx)\n        if k < gaps:\n            xx += w + per + (1 if k >= gaps - rem else 0)\n    return pos\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('exactly minimum share', [[3, 3, 3], 11, False, 2, 1, 4], [0, 4, 8]), ('regression: minimum space check', [[5, 2], 10, False, 3, 3, 7], [0, 8]), ('partial-repair probe', [[7, 2, 5, 6, 9], 33, False, 2, 2, 3], ['overfull']), ('partial-repair probe', [[2, 5, 2], 12, False, 2, 2, 4], ['overfull']), ('remainder goes to right gaps', [[3, 4, 5, 2], 20, False, 2, 1, 4], [0, 5, 11, 18]), ('single word line', [[7], 20, False, 2, 1, 4], [0]), ('control layout', [[5, 7, 9, 9, 7], 53, False, 2, 2, 5], [0, 9, 20, 33, 46]), ('control layout', [[8, 7, 3], 35, True, 2, 1, 6], [0, 10, 19])], [('regression: minimum space check', [[4, 6, 3], 20, False, 3, 3, 7], [0, 7, 17]), ('regression: minimum space check', [[8, 2], 12, False, 3, 2, 5], [0, 10]), ('partial-repair probe', [[7, 8, 8, 5, 8, 3], 41, False, 2, 1, 6], ['overfull']), ('partial-repair probe', [[9, 6, 3, 5], 28, False, 2, 2, 5], ['overfull']), ('exactly minimum share', [[3, 3, 3], 11, False, 2, 1, 4], [0, 4, 8]), ('remainder goes to right gaps', [[3, 4, 5, 2], 20, False, 2, 1, 4], [0, 5, 11, 18]), ('control layout', [[6, 3], 10, True, 3, 3, 4], [0, 9]), ('control layout', [[4], 7, False, 2, 1, 3], [0])], [('regression: minimum space check', [[5, 7, 5, 6, 9, 5], 43, False, 3, 1, 6], [0, 6, 14, 20, 27, 38]), ('regression: minimum space check', [[6, 4, 4, 7, 3, 5], 38, False, 3, 1, 6], [0, 7, 13, 19, 28, 33]), ('partial-repair probe', [[6, 5, 9], 23, False, 2, 2, 3], ['overfull']), ('partial-repair probe', [[8, 6, 4], 22, False, 3, 3, 5], ['overfull']), ('last line ragged', [[3, 4, 5], 20, True, 2, 1, 6], [0, 5, 11]), ('exactly minimum share', [[3, 3, 3], 11, False, 2, 1, 4], [0, 4, 8]), ('control layout', [[7], 10, False, 2, 1, 4], [0]), ('control layout', [[7], 10, False, 3, 3, 7], [0])], [('regression: minimum space check', [[4, 6, 3], 20, False, 3, 3, 7], [0, 7, 17]), ('regression: minimum space check', [[2, 2, 5, 5, 2], 24, False, 3, 2, 7], [0, 4, 8, 15, 22]), ('partial-repair probe', [[8, 5, 3, 2, 5, 9], 35, False, 2, 1, 3], ['overfull']), ('partial-repair probe', [[5, 7, 8, 5, 5], 31, False, 3, 1, 5], ['overfull']), ('single word line', [[7], 20, False, 2, 1, 4], [0]), ('exactly minimum share', [[3, 3, 3], 11, False, 2, 1, 4], [0, 4, 8]), ('control layout', [[4, 7, 7, 4, 6, 3], 50, False, 2, 2, 3], [0, 6, 15, 24, 30, 38]), ('control layout', [[5, 6, 7], 24, False, 3, 2, 7], [0, 8, 17])], [('regression: minimum space check', [[6, 3, 2], 14, False, 2, 1, 5], [0, 7, 12]), ('regression: minimum space check', [[9, 5], 17, False, 3, 3, 5], [0, 12]), ('partial-repair probe', [[4, 8, 8], 23, False, 2, 2, 5], ['overfull']), ('partial-repair probe', [[7, 2, 5, 6, 9], 33, False, 2, 2, 3], ['overfull']), ('single word line', [[7], 20, False, 2, 1, 4], [0]), ('exactly minimum share', [[3, 3, 3], 11, False, 2, 1, 4], [0, 4, 8]), ('control layout', [[9], 9, False, 3, 3, 6], [0]), ('control layout', [[3, 9, 2, 3], 26, False, 3, 2, 5], [0, 6, 18, 23])]]\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":"ac0577b6842adb73818b9a154a77ad22fd4568cc35aa4edbe60711f6e12bedc1","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    words, target, is_last, sp, lo, hi = x\n    n = len(words)\n    gaps = n - 1\n    def natural():\n        pos, xx = [], 0\n        for w in words:\n            pos.append(xx)\n            xx += w + sp\n        return pos\n    if is_last or gaps == 0:\n        return natural()\n    space = target - sum(words)\n    per, rem = divmod(space, gaps)\n    if per <= lo:\n        return ['overfull']\n    if per + (1 if rem else 0) > hi:\n        return natural()\n    pos, xx = [], 0\n    for k, w in enumerate(words):\n        pos.append(xx)\n        if k < gaps:\n            xx += w + per + (1 if k >= gaps - rem else 0)\n    return pos\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('exactly minimum share', [[3, 3, 3], 11, False, 2, 1, 4], [0, 4, 8]), ('regression: minimum space check', [[5, 2], 10, False, 3, 3, 7], [0, 8]), ('partial-repair probe', [[7, 2, 5, 6, 9], 33, False, 2, 2, 3], ['overfull']), ('partial-repair probe', [[2, 5, 2], 12, False, 2, 2, 4], ['overfull']), ('remainder goes to right gaps', [[3, 4, 5, 2], 20, False, 2, 1, 4], [0, 5, 11, 18]), ('single word line', [[7], 20, False, 2, 1, 4], [0]), ('control layout', [[5, 7, 9, 9, 7], 53, False, 2, 2, 5], [0, 9, 20, 33, 46]), ('control layout', [[8, 7, 3], 35, True, 2, 1, 6], [0, 10, 19])], [('regression: minimum space check', [[4, 6, 3], 20, False, 3, 3, 7], [0, 7, 17]), ('regression: minimum space check', [[8, 2], 12, False, 3, 2, 5], [0, 10]), ('partial-repair probe', [[7, 8, 8, 5, 8, 3], 41, False, 2, 1, 6], ['overfull']), ('partial-repair probe', [[9, 6, 3, 5], 28, False, 2, 2, 5], ['overfull']), ('exactly minimum share', [[3, 3, 3], 11, False, 2, 1, 4], [0, 4, 8]), ('remainder goes to right gaps', [[3, 4, 5, 2], 20, False, 2, 1, 4], [0, 5, 11, 18]), ('control layout', [[6, 3], 10, True, 3, 3, 4], [0, 9]), ('control layout', [[4], 7, False, 2, 1, 3], [0])], [('regression: minimum space check', [[5, 7, 5, 6, 9, 5], 43, False, 3, 1, 6], [0, 6, 14, 20, 27, 38]), ('regression: minimum space check', [[6, 4, 4, 7, 3, 5], 38, False, 3, 1, 6], [0, 7, 13, 19, 28, 33]), ('partial-repair probe', [[6, 5, 9], 23, False, 2, 2, 3], ['overfull']), ('partial-repair probe', [[8, 6, 4], 22, False, 3, 3, 5], ['overfull']), ('last line ragged', [[3, 4, 5], 20, True, 2, 1, 6], [0, 5, 11]), ('exactly minimum share', [[3, 3, 3], 11, False, 2, 1, 4], [0, 4, 8]), ('control layout', [[7], 10, False, 2, 1, 4], [0]), ('control layout', [[7], 10, False, 3, 3, 7], [0])], [('regression: minimum space check', [[4, 6, 3], 20, False, 3, 3, 7], [0, 7, 17]), ('regression: minimum space check', [[2, 2, 5, 5, 2], 24, False, 3, 2, 7], [0, 4, 8, 15, 22]), ('partial-repair probe', [[8, 5, 3, 2, 5, 9], 35, False, 2, 1, 3], ['overfull']), ('partial-repair probe', [[5, 7, 8, 5, 5], 31, False, 3, 1, 5], ['overfull']), ('single word line', [[7], 20, False, 2, 1, 4], [0]), ('exactly minimum share', [[3, 3, 3], 11, False, 2, 1, 4], [0, 4, 8]), ('control layout', [[4, 7, 7, 4, 6, 3], 50, False, 2, 2, 3], [0, 6, 15, 24, 30, 38]), ('control layout', [[5, 6, 7], 24, False, 3, 2, 7], [0, 8, 17])], [('regression: minimum space check', [[6, 3, 2], 14, False, 2, 1, 5], [0, 7, 12]), ('regression: minimum space check', [[9, 5], 17, False, 3, 3, 5], [0, 12]), ('partial-repair probe', [[4, 8, 8], 23, False, 2, 2, 5], ['overfull']), ('partial-repair probe', [[7, 2, 5, 6, 9], 33, False, 2, 2, 3], ['overfull']), ('single word line', [[7], 20, False, 2, 1, 4], [0]), ('exactly minimum share', [[3, 3, 3], 11, False, 2, 1, 4], [0, 4, 8]), ('control layout', [[9], 9, False, 3, 3, 6], [0]), ('control layout', [[3, 9, 2, 3], 26, False, 3, 2, 5], [0, 6, 18, 23])]]\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-justify-spaces-minimum-space-check","generated_at":"2026-09-29T14:49:50.333908+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 minimum-space test uses <=.","sha256":"ba2e243bab634108d2a64279d7180098d60e7dd6b8910cb8b0da4b2d99a339be","title":"Justified interword spacing: minimum space check · 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":38.455,"exit_code":1,"observations":[{"actual":[0,4,8],"check":"exactly minimum share","expected":[0,4,8],"passed":true},{"actual":[0,8],"check":"regression: minimum space check","expected":[0,8],"passed":true},{"actual":[0,8,11,17,24],"check":"partial-repair probe","expected":["overfull"],"passed":false},{"actual":[0,3,10],"check":"partial-repair probe","expected":["overfull"],"passed":false},{"actual":[0,5,11,18],"check":"remainder goes to right gaps","expected":[0,5,11,18],"passed":true},{"actual":[0],"check":"single word line","expected":[0],"passed":true},{"actual":[0,9,20,33,46],"check":"control layout","expected":[0,9,20,33,46],"passed":true},{"actual":[0,10,19],"check":"control layout","expected":[0,10,19],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"exactly minimum share\", \"actual\": [0, 4, 8], \"expected\": [0, 4, 8], \"passed\": true}, {\"check\": \"regression: minimum space check\", \"actual\": [0, 8], \"expected\": [0, 8], \"passed\": true}, {\"check\": \"partial-repair probe\", \"actual\": [0, 8, 11, 17, 24], \"expected\": [\"overfull\"], \"passed\": false}, {\"check\": \"partial-repair probe\", \"actual\": [0, 3, 10], \"expected\": [\"overfull\"], \"passed\": false}, {\"check\": \"remainder goes to right gaps\", \"actual\": [0, 5, 11, 18], \"expected\": [0, 5, 11, 18], \"passed\": true}, {\"check\": \"single word line\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [0, 9, 20, 33, 46], \"expected\": [0, 9, 20, 33, 46], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [0, 10, 19], \"expected\": [0, 10, 19], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.152,"exit_code":1,"observations":[{"actual":["overfull"],"check":"exactly minimum share","expected":[0,4,8],"passed":false},{"actual":["overfull"],"check":"regression: minimum space check","expected":[0,8],"passed":false},{"actual":["overfull"],"check":"partial-repair probe","expected":["overfull"],"passed":true},{"actual":["overfull"],"check":"partial-repair probe","expected":["overfull"],"passed":true},{"actual":[0,5,11,18],"check":"remainder goes to right gaps","expected":[0,5,11,18],"passed":true},{"actual":[0],"check":"single word line","expected":[0],"passed":true},{"actual":[0,9,20,33,46],"check":"control layout","expected":[0,9,20,33,46],"passed":true},{"actual":[0,10,19],"check":"control layout","expected":[0,10,19],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"exactly minimum share\", \"actual\": [\"overfull\"], \"expected\": [0, 4, 8], \"passed\": false}, {\"check\": \"regression: minimum space check\", \"actual\": [\"overfull\"], \"expected\": [0, 8], \"passed\": false}, {\"check\": \"partial-repair probe\", \"actual\": [\"overfull\"], \"expected\": [\"overfull\"], \"passed\": true}, {\"check\": \"partial-repair probe\", \"actual\": [\"overfull\"], \"expected\": [\"overfull\"], \"passed\": true}, {\"check\": \"remainder goes to right gaps\", \"actual\": [0, 5, 11, 18], \"expected\": [0, 5, 11, 18], \"passed\": true}, {\"check\": \"single word line\", \"actual\": [0], \"expected\": [0], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [0, 9, 20, 33, 46], \"expected\": [0, 9, 20, 33, 46], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [0, 10, 19], \"expected\": [0, 10, 19], \"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."}}