{"abstract":"Double spaces in the source produce double spaces or empty chunks in the output.","category":"Typography line breaking","checks":8,"contract":"Input [source, width]. Runs of spaces are one breakable space; \"~\" is an unbreakable space rendered \" \"; \"\\-\" is a discretionary hyphen: invisible unless the line breaks there, then rendered \"-\"; \"|\" is an invisible break opportunity. Greedy: append the next chunk if the line (without a potential hyphen) fits, else break at that opportunity. Return rendered lines.","evaluation_group":"w2-typography-line-breaking-ties-discretionaries","failed_approach":"Also swallowing ties after spaces removes the unbreakable space.","family":"w2-typography-line-breaking-ties-discretionaries-space-run-collapsing","id":"FA-80201","implementations":{"attempt":{"sha256":"dd6e427e3766592b00c5f4df76346278acb8acfdb1fe442ad5ff12dc865a7347","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    src, width = x\n    chunks = ['']\n    ops = []\n    i = 0\n    while i < len(src):\n        c = src[i]\n        if src.startswith('\\\\-', i):\n            ops.append('d')\n            chunks.append('')\n            i += 2\n            continue\n        if c == ' ':\n            j = i\n            while j < len(src) and src[j] in ' ~':\n                j += 1\n            ops.append('s')\n            chunks.append('')\n            i = j\n            continue\n        if c == '|':\n            ops.append('z')\n            chunks.append('')\n            i += 1\n            continue\n        chunks[-1] += ' ' if c == '~' else c\n        i += 1\n    line = chunks[0]\n    lines = []\n    for op, ch in zip(ops, chunks[1:]):\n        sep = ' ' if op == 's' else ''\n        if len(line + sep + ch) <= width:\n            line = line + sep + ch\n        else:\n            lines.append(line + ('-' if op == 'd' else ''))\n            line = ch\n    lines.append(line)\n    return lines\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('double space collapses', ['type  set', 20], ['type set']), ('regression: space run collapsing', ['url|path  ~a a  hy\\\\-phen', 12], ['urlpath  a a', 'hyphen']), ('partial-repair probe', ['url|path x Dr.~Knuth ~10~pt', 12], ['urlpath x', 'Dr. Knuth', ' 10 pt']), ('regression: space run collapsing', ['hy\\\\-phen x hy\\\\-phen  x a ~com\\\\-po\\\\-si\\\\-tion  hy\\\\-phen  word ~type', 5], ['hy-', 'phen', 'x hy-', 'phen', 'x a', ' com-', 'posi-', 'tion', 'hy-', 'phen', 'word', ' type']), ('tie keeps title with name', ['see Dr.~Knuth now', 9], ['see', 'Dr. Knuth', 'now']), ('invisible break', ['url|path|x', 5], ['url', 'pathx']), ('control layout', ['b|c ink hy\\\\-phen url|path type com\\\\-po\\\\-si\\\\-tion', 8], ['bc ink', 'hyphen', 'urlpath', 'type com-', 'position']), ('control layout', ['set type type', 5], ['set', 'type', 'type'])], [('regression: space run collapsing', ['type ~x ~x  ~word url|path  set  hy\\\\-phen', 15], ['type  x  x', ' word urlpath', 'set hyphen']), ('regression: space run collapsing', ['hy\\\\-phen ~type set ~com\\\\-po\\\\-si\\\\-tion set  type  com\\\\-po\\\\-si\\\\-tion word set', 15], ['hyphen  type', 'set  composi-', 'tion set type', 'composition', 'word set']), ('regression: space run collapsing', ['a  ~Dr.~Knuth ~ink x url|path b|c', 8], ['a', ' Dr. Knuth', ' ink x', 'urlpath', 'bc']), ('partial-repair probe', ['set type ~type url|path ~ink ~type', 10], ['set type', ' type url', 'path  ink', ' type']), ('invisible break', ['url|path|x', 5], ['url', 'pathx']), ('double space collapses', ['type  set', 20], ['type set']), ('control layout', ['hy\\\\-phen Dr.~Knuth a ink b|c', 10], ['hyphen', 'Dr. Knuth', 'a ink bc']), ('control layout', ['com\\\\-po\\\\-si\\\\-tion a x', 16], ['composition a x'])], [('regression: space run collapsing', ['hy\\\\-phen x hy\\\\-phen  x a ~com\\\\-po\\\\-si\\\\-tion  hy\\\\-phen  word ~type', 5], ['hy-', 'phen', 'x hy-', 'phen', 'x a', ' com-', 'posi-', 'tion', 'hy-', 'phen', 'word', ' type']), ('regression: space run collapsing', ['word  b|c  com\\\\-po\\\\-si\\\\-tion ~hy\\\\-phen x word type', 10], ['word bc', 'composi-', 'tion  hy-', 'phen x', 'word type']), ('regression: space run collapsing', ['hy\\\\-phen com\\\\-po\\\\-si\\\\-tion ~url|path  Dr.~Knuth', 12], ['hyphen compo-', 'sition  url', 'path', 'Dr. Knuth']), ('regression: space run collapsing', ['x  10~pt a ~Dr.~Knuth b|c  Dr.~Knuth ~hy\\\\-phen  set  com\\\\-po\\\\-si\\\\-tion', 16], ['x 10 pt a', ' Dr. Knuth bc', 'Dr. Knuth  hy-', 'phen set composi-', 'tion']), ('double space collapses', ['type  set', 20], ['type set']), ('invisible break', ['url|path|x', 5], ['url', 'pathx']), ('control layout', ['10~pt word b|c', 11], ['10 pt word', 'bc']), ('control layout', ['b|c type type', 6], ['bc', 'type', 'type'])], [('regression: space run collapsing', ['b|c url|path  Dr.~Knuth', 5], ['bc', 'url', 'path', 'Dr. Knuth']), ('regression: space run collapsing', ['word a ~url|path com\\\\-po\\\\-si\\\\-tion  com\\\\-po\\\\-si\\\\-tion', 7], ['word a', ' url', 'path', 'composi-', 'tion', 'composi-', 'tion']), ('regression: space run collapsing', ['com\\\\-po\\\\-si\\\\-tion ~word ink  Dr.~Knuth type word a', 9], ['composi-', 'tion', ' word ink', 'Dr. Knuth', 'type word', 'a']), ('regression: space run collapsing', ['set  ~b|c 10~pt  b|c', 14], ['set  bc 10 pt', 'bc']), ('discretionary taken', ['the com\\\\-po\\\\-si\\\\-tion', 9], ['the compo-', 'sition']), ('tie keeps title with name', ['see Dr.~Knuth now', 9], ['see', 'Dr. Knuth', 'now']), ('control layout', ['b|c ink type', 14], ['bc ink type']), ('control layout', ['word a hy\\\\-phen b|c ink a hy\\\\-phen', 5], ['word', 'a hy-', 'phen', 'bc', 'ink a', 'hy-', 'phen'])], [('regression: space run collapsing', ['b|c a Dr.~Knuth  a  Dr.~Knuth ~word', 6], ['bc a', 'Dr. Knuth', 'a', 'Dr. Knuth', ' word']), ('regression: space run collapsing', ['b|c set  ink com\\\\-po\\\\-si\\\\-tion a', 9], ['bc set', 'ink compo-', 'sition a']), ('partial-repair probe', ['word ~Dr.~Knuth 10~pt set', 16], ['word  Dr. Knuth', '10 pt set']), ('regression: space run collapsing', ['type a hy\\\\-phen com\\\\-po\\\\-si\\\\-tion ~set set ink  type', 8], ['type a', 'hyphen', 'composi-', 'tion', ' set set', 'ink type']), ('invisible break', ['url|path|x', 5], ['url', 'pathx']), ('discretionary taken', ['the com\\\\-po\\\\-si\\\\-tion', 9], ['the compo-', 'sition']), ('control layout', ['hy\\\\-phen word word com\\\\-po\\\\-si\\\\-tion b|c b|c', 11], ['hyphen word', 'word compo-', 'sition bc b', 'c']), ('control layout', ['hy\\\\-phen 10~pt hy\\\\-phen x', 9], ['hyphen', '10 pt hy-', 'phen x'])]]\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":"d5aa450f438e2907ed77acf8e4881f5dfbe373171498e155a021960447e1708f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    src, width = x\n    chunks = ['']\n    ops = []\n    i = 0\n    while i < len(src):\n        c = src[i]\n        if src.startswith('\\\\-', i):\n            ops.append('d')\n            chunks.append('')\n            i += 2\n            continue\n        if c == ' ':\n            j = i\n            j += 1\n            ops.append('s')\n            chunks.append('')\n            i = j\n            continue\n        if c == '|':\n            ops.append('z')\n            chunks.append('')\n            i += 1\n            continue\n        chunks[-1] += ' ' if c == '~' else c\n        i += 1\n    line = chunks[0]\n    lines = []\n    for op, ch in zip(ops, chunks[1:]):\n        sep = ' ' if op == 's' else ''\n        if len(line + sep + ch) <= width:\n            line = line + sep + ch\n        else:\n            lines.append(line + ('-' if op == 'd' else ''))\n            line = ch\n    lines.append(line)\n    return lines\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('double space collapses', ['type  set', 20], ['type set']), ('regression: space run collapsing', ['url|path  ~a a  hy\\\\-phen', 12], ['urlpath  a a', 'hyphen']), ('partial-repair probe', ['url|path x Dr.~Knuth ~10~pt', 12], ['urlpath x', 'Dr. Knuth', ' 10 pt']), ('regression: space run collapsing', ['hy\\\\-phen x hy\\\\-phen  x a ~com\\\\-po\\\\-si\\\\-tion  hy\\\\-phen  word ~type', 5], ['hy-', 'phen', 'x hy-', 'phen', 'x a', ' com-', 'posi-', 'tion', 'hy-', 'phen', 'word', ' type']), ('tie keeps title with name', ['see Dr.~Knuth now', 9], ['see', 'Dr. Knuth', 'now']), ('invisible break', ['url|path|x', 5], ['url', 'pathx']), ('control layout', ['b|c ink hy\\\\-phen url|path type com\\\\-po\\\\-si\\\\-tion', 8], ['bc ink', 'hyphen', 'urlpath', 'type com-', 'position']), ('control layout', ['set type type', 5], ['set', 'type', 'type'])], [('regression: space run collapsing', ['type ~x ~x  ~word url|path  set  hy\\\\-phen', 15], ['type  x  x', ' word urlpath', 'set hyphen']), ('regression: space run collapsing', ['hy\\\\-phen ~type set ~com\\\\-po\\\\-si\\\\-tion set  type  com\\\\-po\\\\-si\\\\-tion word set', 15], ['hyphen  type', 'set  composi-', 'tion set type', 'composition', 'word set']), ('regression: space run collapsing', ['a  ~Dr.~Knuth ~ink x url|path b|c', 8], ['a', ' Dr. Knuth', ' ink x', 'urlpath', 'bc']), ('partial-repair probe', ['set type ~type url|path ~ink ~type', 10], ['set type', ' type url', 'path  ink', ' type']), ('invisible break', ['url|path|x', 5], ['url', 'pathx']), ('double space collapses', ['type  set', 20], ['type set']), ('control layout', ['hy\\\\-phen Dr.~Knuth a ink b|c', 10], ['hyphen', 'Dr. Knuth', 'a ink bc']), ('control layout', ['com\\\\-po\\\\-si\\\\-tion a x', 16], ['composition a x'])], [('regression: space run collapsing', ['hy\\\\-phen x hy\\\\-phen  x a ~com\\\\-po\\\\-si\\\\-tion  hy\\\\-phen  word ~type', 5], ['hy-', 'phen', 'x hy-', 'phen', 'x a', ' com-', 'posi-', 'tion', 'hy-', 'phen', 'word', ' type']), ('regression: space run collapsing', ['word  b|c  com\\\\-po\\\\-si\\\\-tion ~hy\\\\-phen x word type', 10], ['word bc', 'composi-', 'tion  hy-', 'phen x', 'word type']), ('regression: space run collapsing', ['hy\\\\-phen com\\\\-po\\\\-si\\\\-tion ~url|path  Dr.~Knuth', 12], ['hyphen compo-', 'sition  url', 'path', 'Dr. Knuth']), ('regression: space run collapsing', ['x  10~pt a ~Dr.~Knuth b|c  Dr.~Knuth ~hy\\\\-phen  set  com\\\\-po\\\\-si\\\\-tion', 16], ['x 10 pt a', ' Dr. Knuth bc', 'Dr. Knuth  hy-', 'phen set composi-', 'tion']), ('double space collapses', ['type  set', 20], ['type set']), ('invisible break', ['url|path|x', 5], ['url', 'pathx']), ('control layout', ['10~pt word b|c', 11], ['10 pt word', 'bc']), ('control layout', ['b|c type type', 6], ['bc', 'type', 'type'])], [('regression: space run collapsing', ['b|c url|path  Dr.~Knuth', 5], ['bc', 'url', 'path', 'Dr. Knuth']), ('regression: space run collapsing', ['word a ~url|path com\\\\-po\\\\-si\\\\-tion  com\\\\-po\\\\-si\\\\-tion', 7], ['word a', ' url', 'path', 'composi-', 'tion', 'composi-', 'tion']), ('regression: space run collapsing', ['com\\\\-po\\\\-si\\\\-tion ~word ink  Dr.~Knuth type word a', 9], ['composi-', 'tion', ' word ink', 'Dr. Knuth', 'type word', 'a']), ('regression: space run collapsing', ['set  ~b|c 10~pt  b|c', 14], ['set  bc 10 pt', 'bc']), ('discretionary taken', ['the com\\\\-po\\\\-si\\\\-tion', 9], ['the compo-', 'sition']), ('tie keeps title with name', ['see Dr.~Knuth now', 9], ['see', 'Dr. Knuth', 'now']), ('control layout', ['b|c ink type', 14], ['bc ink type']), ('control layout', ['word a hy\\\\-phen b|c ink a hy\\\\-phen', 5], ['word', 'a hy-', 'phen', 'bc', 'ink a', 'hy-', 'phen'])], [('regression: space run collapsing', ['b|c a Dr.~Knuth  a  Dr.~Knuth ~word', 6], ['bc a', 'Dr. Knuth', 'a', 'Dr. Knuth', ' word']), ('regression: space run collapsing', ['b|c set  ink com\\\\-po\\\\-si\\\\-tion a', 9], ['bc set', 'ink compo-', 'sition a']), ('partial-repair probe', ['word ~Dr.~Knuth 10~pt set', 16], ['word  Dr. Knuth', '10 pt set']), ('regression: space run collapsing', ['type a hy\\\\-phen com\\\\-po\\\\-si\\\\-tion ~set set ink  type', 8], ['type a', 'hyphen', 'composi-', 'tion', ' set set', 'ink type']), ('invisible break', ['url|path|x', 5], ['url', 'pathx']), ('discretionary taken', ['the com\\\\-po\\\\-si\\\\-tion', 9], ['the compo-', 'sition']), ('control layout', ['hy\\\\-phen word word com\\\\-po\\\\-si\\\\-tion b|c b|c', 11], ['hyphen word', 'word compo-', 'sition bc b', 'c']), ('control layout', ['hy\\\\-phen 10~pt hy\\\\-phen x', 9], ['hyphen', '10 pt hy-', 'phen x'])]]\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":"65722b8a99c3588c821c12d118899e7288de6f563609c6676d7b539977c9c4fa","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(x):\n    src, width = x\n    chunks = ['']\n    ops = []\n    i = 0\n    while i < len(src):\n        c = src[i]\n        if src.startswith('\\\\-', i):\n            ops.append('d')\n            chunks.append('')\n            i += 2\n            continue\n        if c == ' ':\n            j = i\n            while j < len(src) and src[j] == ' ':\n                j += 1\n            ops.append('s')\n            chunks.append('')\n            i = j\n            continue\n        if c == '|':\n            ops.append('z')\n            chunks.append('')\n            i += 1\n            continue\n        chunks[-1] += ' ' if c == '~' else c\n        i += 1\n    line = chunks[0]\n    lines = []\n    for op, ch in zip(ops, chunks[1:]):\n        sep = ' ' if op == 's' else ''\n        if len(line + sep + ch) <= width:\n            line = line + sep + ch\n        else:\n            lines.append(line + ('-' if op == 'd' else ''))\n            line = ch\n    lines.append(line)\n    return lines\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nfixtures = [[('double space collapses', ['type  set', 20], ['type set']), ('regression: space run collapsing', ['url|path  ~a a  hy\\\\-phen', 12], ['urlpath  a a', 'hyphen']), ('partial-repair probe', ['url|path x Dr.~Knuth ~10~pt', 12], ['urlpath x', 'Dr. Knuth', ' 10 pt']), ('regression: space run collapsing', ['hy\\\\-phen x hy\\\\-phen  x a ~com\\\\-po\\\\-si\\\\-tion  hy\\\\-phen  word ~type', 5], ['hy-', 'phen', 'x hy-', 'phen', 'x a', ' com-', 'posi-', 'tion', 'hy-', 'phen', 'word', ' type']), ('tie keeps title with name', ['see Dr.~Knuth now', 9], ['see', 'Dr. Knuth', 'now']), ('invisible break', ['url|path|x', 5], ['url', 'pathx']), ('control layout', ['b|c ink hy\\\\-phen url|path type com\\\\-po\\\\-si\\\\-tion', 8], ['bc ink', 'hyphen', 'urlpath', 'type com-', 'position']), ('control layout', ['set type type', 5], ['set', 'type', 'type'])], [('regression: space run collapsing', ['type ~x ~x  ~word url|path  set  hy\\\\-phen', 15], ['type  x  x', ' word urlpath', 'set hyphen']), ('regression: space run collapsing', ['hy\\\\-phen ~type set ~com\\\\-po\\\\-si\\\\-tion set  type  com\\\\-po\\\\-si\\\\-tion word set', 15], ['hyphen  type', 'set  composi-', 'tion set type', 'composition', 'word set']), ('regression: space run collapsing', ['a  ~Dr.~Knuth ~ink x url|path b|c', 8], ['a', ' Dr. Knuth', ' ink x', 'urlpath', 'bc']), ('partial-repair probe', ['set type ~type url|path ~ink ~type', 10], ['set type', ' type url', 'path  ink', ' type']), ('invisible break', ['url|path|x', 5], ['url', 'pathx']), ('double space collapses', ['type  set', 20], ['type set']), ('control layout', ['hy\\\\-phen Dr.~Knuth a ink b|c', 10], ['hyphen', 'Dr. Knuth', 'a ink bc']), ('control layout', ['com\\\\-po\\\\-si\\\\-tion a x', 16], ['composition a x'])], [('regression: space run collapsing', ['hy\\\\-phen x hy\\\\-phen  x a ~com\\\\-po\\\\-si\\\\-tion  hy\\\\-phen  word ~type', 5], ['hy-', 'phen', 'x hy-', 'phen', 'x a', ' com-', 'posi-', 'tion', 'hy-', 'phen', 'word', ' type']), ('regression: space run collapsing', ['word  b|c  com\\\\-po\\\\-si\\\\-tion ~hy\\\\-phen x word type', 10], ['word bc', 'composi-', 'tion  hy-', 'phen x', 'word type']), ('regression: space run collapsing', ['hy\\\\-phen com\\\\-po\\\\-si\\\\-tion ~url|path  Dr.~Knuth', 12], ['hyphen compo-', 'sition  url', 'path', 'Dr. Knuth']), ('regression: space run collapsing', ['x  10~pt a ~Dr.~Knuth b|c  Dr.~Knuth ~hy\\\\-phen  set  com\\\\-po\\\\-si\\\\-tion', 16], ['x 10 pt a', ' Dr. Knuth bc', 'Dr. Knuth  hy-', 'phen set composi-', 'tion']), ('double space collapses', ['type  set', 20], ['type set']), ('invisible break', ['url|path|x', 5], ['url', 'pathx']), ('control layout', ['10~pt word b|c', 11], ['10 pt word', 'bc']), ('control layout', ['b|c type type', 6], ['bc', 'type', 'type'])], [('regression: space run collapsing', ['b|c url|path  Dr.~Knuth', 5], ['bc', 'url', 'path', 'Dr. Knuth']), ('regression: space run collapsing', ['word a ~url|path com\\\\-po\\\\-si\\\\-tion  com\\\\-po\\\\-si\\\\-tion', 7], ['word a', ' url', 'path', 'composi-', 'tion', 'composi-', 'tion']), ('regression: space run collapsing', ['com\\\\-po\\\\-si\\\\-tion ~word ink  Dr.~Knuth type word a', 9], ['composi-', 'tion', ' word ink', 'Dr. Knuth', 'type word', 'a']), ('regression: space run collapsing', ['set  ~b|c 10~pt  b|c', 14], ['set  bc 10 pt', 'bc']), ('discretionary taken', ['the com\\\\-po\\\\-si\\\\-tion', 9], ['the compo-', 'sition']), ('tie keeps title with name', ['see Dr.~Knuth now', 9], ['see', 'Dr. Knuth', 'now']), ('control layout', ['b|c ink type', 14], ['bc ink type']), ('control layout', ['word a hy\\\\-phen b|c ink a hy\\\\-phen', 5], ['word', 'a hy-', 'phen', 'bc', 'ink a', 'hy-', 'phen'])], [('regression: space run collapsing', ['b|c a Dr.~Knuth  a  Dr.~Knuth ~word', 6], ['bc a', 'Dr. Knuth', 'a', 'Dr. Knuth', ' word']), ('regression: space run collapsing', ['b|c set  ink com\\\\-po\\\\-si\\\\-tion a', 9], ['bc set', 'ink compo-', 'sition a']), ('partial-repair probe', ['word ~Dr.~Knuth 10~pt set', 16], ['word  Dr. Knuth', '10 pt set']), ('regression: space run collapsing', ['type a hy\\\\-phen com\\\\-po\\\\-si\\\\-tion ~set set ink  type', 8], ['type a', 'hyphen', 'composi-', 'tion', ' set set', 'ink type']), ('invisible break', ['url|path|x', 5], ['url', 'pathx']), ('discretionary taken', ['the com\\\\-po\\\\-si\\\\-tion', 9], ['the compo-', 'sition']), ('control layout', ['hy\\\\-phen word word com\\\\-po\\\\-si\\\\-tion b|c b|c', 11], ['hyphen word', 'word compo-', 'sition bc b', 'c']), ('control layout', ['hy\\\\-phen 10~pt hy\\\\-phen x', 9], ['hyphen', '10 pt hy-', 'phen x'])]]\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-ties-discretionaries-space-run-collapsing","generated_at":"2026-09-29T14:49:51.603366+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":"Collapse a run of spaces into one opportunity.","root_cause":"Each space character is a separate opportunity, creating empty chunks.","sha256":"1f6eb17d6f06f12c5e8acb6c728dbea4b40631a52aff1ab695a4930aee521eb3","title":"Ties and discretionary hyphens: space run collapsing · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.516,"exit_code":1,"observations":[{"actual":["type set"],"check":"double space collapses","expected":["type set"],"passed":true},{"actual":["urlpath a a","hyphen"],"check":"regression: space run collapsing","expected":["urlpath  a a","hyphen"],"passed":false},{"actual":["urlpath x","Dr. Knuth","10 pt"],"check":"partial-repair probe","expected":["urlpath x","Dr. Knuth"," 10 pt"],"passed":false},{"actual":["hy-","phen","x hy-","phen","x a","compo-","si-","tion","hy-","phen","word","type"],"check":"regression: space run collapsing","expected":["hy-","phen","x hy-","phen","x a"," com-","posi-","tion","hy-","phen","word"," type"],"passed":false},{"actual":["see","Dr. Knuth","now"],"check":"tie keeps title with name","expected":["see","Dr. Knuth","now"],"passed":true},{"actual":["url","pathx"],"check":"invisible break","expected":["url","pathx"],"passed":true},{"actual":["bc ink","hyphen","urlpath","type com-","position"],"check":"control layout","expected":["bc ink","hyphen","urlpath","type com-","position"],"passed":true},{"actual":["set","type","type"],"check":"control layout","expected":["set","type","type"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"double space collapses\", \"actual\": [\"type set\"], \"expected\": [\"type set\"], \"passed\": true}, {\"check\": \"regression: space run collapsing\", \"actual\": [\"urlpath a a\", \"hyphen\"], \"expected\": [\"urlpath  a a\", \"hyphen\"], \"passed\": false}, {\"check\": \"partial-repair probe\", \"actual\": [\"urlpath x\", \"Dr. Knuth\", \"10 pt\"], \"expected\": [\"urlpath x\", \"Dr. Knuth\", \" 10 pt\"], \"passed\": false}, {\"check\": \"regression: space run collapsing\", \"actual\": [\"hy-\", \"phen\", \"x hy-\", \"phen\", \"x a\", \"compo-\", \"si-\", \"tion\", \"hy-\", \"phen\", \"word\", \"type\"], \"expected\": [\"hy-\", \"phen\", \"x hy-\", \"phen\", \"x a\", \" com-\", \"posi-\", \"tion\", \"hy-\", \"phen\", \"word\", \" type\"], \"passed\": false}, {\"check\": \"tie keeps title with name\", \"actual\": [\"see\", \"Dr. Knuth\", \"now\"], \"expected\": [\"see\", \"Dr. Knuth\", \"now\"], \"passed\": true}, {\"check\": \"invisible break\", \"actual\": [\"url\", \"pathx\"], \"expected\": [\"url\", \"pathx\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"bc ink\", \"hyphen\", \"urlpath\", \"type com-\", \"position\"], \"expected\": [\"bc ink\", \"hyphen\", \"urlpath\", \"type com-\", \"position\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"set\", \"type\", \"type\"], \"expected\": [\"set\", \"type\", \"type\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.811,"exit_code":1,"observations":[{"actual":["type  set"],"check":"double space collapses","expected":["type set"],"passed":false},{"actual":["urlpath   a","a  hyphen"],"check":"regression: space run collapsing","expected":["urlpath  a a","hyphen"],"passed":false},{"actual":["urlpath x","Dr. Knuth"," 10 pt"],"check":"partial-repair probe","expected":["urlpath x","Dr. Knuth"," 10 pt"],"passed":true},{"actual":["hy-","phen","x hy-","phen ","x a"," com-","posi-","tion ","hy-","phen ","word"," type"],"check":"regression: space run collapsing","expected":["hy-","phen","x hy-","phen","x a"," com-","posi-","tion","hy-","phen","word"," type"],"passed":false},{"actual":["see","Dr. Knuth","now"],"check":"tie keeps title with name","expected":["see","Dr. Knuth","now"],"passed":true},{"actual":["url","pathx"],"check":"invisible break","expected":["url","pathx"],"passed":true},{"actual":["bc ink","hyphen","urlpath","type com-","position"],"check":"control layout","expected":["bc ink","hyphen","urlpath","type com-","position"],"passed":true},{"actual":["set","type","type"],"check":"control layout","expected":["set","type","type"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"double space collapses\", \"actual\": [\"type  set\"], \"expected\": [\"type set\"], \"passed\": false}, {\"check\": \"regression: space run collapsing\", \"actual\": [\"urlpath   a\", \"a  hyphen\"], \"expected\": [\"urlpath  a a\", \"hyphen\"], \"passed\": false}, {\"check\": \"partial-repair probe\", \"actual\": [\"urlpath x\", \"Dr. Knuth\", \" 10 pt\"], \"expected\": [\"urlpath x\", \"Dr. Knuth\", \" 10 pt\"], \"passed\": true}, {\"check\": \"regression: space run collapsing\", \"actual\": [\"hy-\", \"phen\", \"x hy-\", \"phen \", \"x a\", \" com-\", \"posi-\", \"tion \", \"hy-\", \"phen \", \"word\", \" type\"], \"expected\": [\"hy-\", \"phen\", \"x hy-\", \"phen\", \"x a\", \" com-\", \"posi-\", \"tion\", \"hy-\", \"phen\", \"word\", \" type\"], \"passed\": false}, {\"check\": \"tie keeps title with name\", \"actual\": [\"see\", \"Dr. Knuth\", \"now\"], \"expected\": [\"see\", \"Dr. Knuth\", \"now\"], \"passed\": true}, {\"check\": \"invisible break\", \"actual\": [\"url\", \"pathx\"], \"expected\": [\"url\", \"pathx\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"bc ink\", \"hyphen\", \"urlpath\", \"type com-\", \"position\"], \"expected\": [\"bc ink\", \"hyphen\", \"urlpath\", \"type com-\", \"position\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"set\", \"type\", \"type\"], \"expected\": [\"set\", \"type\", \"type\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.96,"exit_code":0,"observations":[{"actual":["type set"],"check":"double space collapses","expected":["type set"],"passed":true},{"actual":["urlpath  a a","hyphen"],"check":"regression: space run collapsing","expected":["urlpath  a a","hyphen"],"passed":true},{"actual":["urlpath x","Dr. Knuth"," 10 pt"],"check":"partial-repair probe","expected":["urlpath x","Dr. Knuth"," 10 pt"],"passed":true},{"actual":["hy-","phen","x hy-","phen","x a"," com-","posi-","tion","hy-","phen","word"," type"],"check":"regression: space run collapsing","expected":["hy-","phen","x hy-","phen","x a"," com-","posi-","tion","hy-","phen","word"," type"],"passed":true},{"actual":["see","Dr. Knuth","now"],"check":"tie keeps title with name","expected":["see","Dr. Knuth","now"],"passed":true},{"actual":["url","pathx"],"check":"invisible break","expected":["url","pathx"],"passed":true},{"actual":["bc ink","hyphen","urlpath","type com-","position"],"check":"control layout","expected":["bc ink","hyphen","urlpath","type com-","position"],"passed":true},{"actual":["set","type","type"],"check":"control layout","expected":["set","type","type"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"double space collapses\", \"actual\": [\"type set\"], \"expected\": [\"type set\"], \"passed\": true}, {\"check\": \"regression: space run collapsing\", \"actual\": [\"urlpath  a a\", \"hyphen\"], \"expected\": [\"urlpath  a a\", \"hyphen\"], \"passed\": true}, {\"check\": \"partial-repair probe\", \"actual\": [\"urlpath x\", \"Dr. Knuth\", \" 10 pt\"], \"expected\": [\"urlpath x\", \"Dr. Knuth\", \" 10 pt\"], \"passed\": true}, {\"check\": \"regression: space run collapsing\", \"actual\": [\"hy-\", \"phen\", \"x hy-\", \"phen\", \"x a\", \" com-\", \"posi-\", \"tion\", \"hy-\", \"phen\", \"word\", \" type\"], \"expected\": [\"hy-\", \"phen\", \"x hy-\", \"phen\", \"x a\", \" com-\", \"posi-\", \"tion\", \"hy-\", \"phen\", \"word\", \" type\"], \"passed\": true}, {\"check\": \"tie keeps title with name\", \"actual\": [\"see\", \"Dr. Knuth\", \"now\"], \"expected\": [\"see\", \"Dr. Knuth\", \"now\"], \"passed\": true}, {\"check\": \"invisible break\", \"actual\": [\"url\", \"pathx\"], \"expected\": [\"url\", \"pathx\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"bc ink\", \"hyphen\", \"urlpath\", \"type com-\", \"position\"], \"expected\": [\"bc ink\", \"hyphen\", \"urlpath\", \"type com-\", \"position\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"set\", \"type\", \"type\"], \"expected\": [\"set\", \"type\", \"type\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}