{"abstract":"Zero-width break opportunities show up as spaces.","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":"Dropping the opportunity entirely removes a legal break.","family":"w2-typography-line-breaking-ties-discretionaries-invisible-break-rendering","id":"FA-80196","implementations":{"attempt":{"sha256":"b4e738e7c86bd05e2c563ba4406b93ece613387706b3f0520ca52bd43fe8e512","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            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 = [[('invisible break', ['url|path|x', 5], ['url', 'pathx']), ('regression: invisible break rendering', ['url|path url|path hy\\\\-phen com\\\\-po\\\\-si\\\\-tion word b|c a word b|c', 11], ['urlpath url', 'path hyphen', 'composition', 'word bc a', 'word bc']), ('partial-repair probe', ['com\\\\-po\\\\-si\\\\-tion word word hy\\\\-phen url|path', 6], ['compo-', 'sition', 'word', 'word', 'hyphen', 'url', 'path']), ('partial-repair probe', ['word set  a  x ~set ~set  b|c x', 6], ['word', 'set a', 'x  set', ' set b', 'c x']), ('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', ['ink a a ~hy\\\\-phen  x com\\\\-po\\\\-si\\\\-tion x', 6], ['ink a', 'a  hy-', 'phen x', 'compo-', 'sition', 'x']), ('control layout', ['hy\\\\-phen ink  type word', 11], ['hyphen ink', 'type word'])], [('regression: invisible break rendering', ['url|path ~com\\\\-po\\\\-si\\\\-tion b|c b|c url|path word Dr.~Knuth url|path  ~hy\\\\-phen', 12], ['urlpath  com-', 'position bc', 'bc urlpath', 'word', 'Dr. Knuth', 'urlpath  hy-', 'phen']), ('regression: invisible break rendering', ['com\\\\-po\\\\-si\\\\-tion ~b|c ~x ink  url|path a', 12], ['composition', ' bc  x ink', 'urlpath a']), ('regression: invisible break rendering', ['b|c a a set a ~com\\\\-po\\\\-si\\\\-tion hy\\\\-phen  ink ~url|path', 11], ['bc a a set', 'a  composi-', 'tion hyphen', 'ink  url', 'path']), ('invisible break', ['url|path|x', 5], ['url', 'pathx']), ('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', ['com\\\\-po\\\\-si\\\\-tion 10~pt word set com\\\\-po\\\\-si\\\\-tion', 6], ['compo-', 'sition', '10 pt', 'word', 'set', 'compo-', 'sition']), ('control layout', ['set com\\\\-po\\\\-si\\\\-tion  10~pt word', 15], ['set composition', '10 pt word'])], [('regression: invisible break rendering', ['10~pt url|path  ink set com\\\\-po\\\\-si\\\\-tion  set  word com\\\\-po\\\\-si\\\\-tion', 7], ['10 pt', 'urlpath', 'ink set', 'composi-', 'tion', 'set', 'word', 'composi-', 'tion']), ('regression: invisible break rendering', ['com\\\\-po\\\\-si\\\\-tion ~url|path x  ~set  ~com\\\\-po\\\\-si\\\\-tion  com\\\\-po\\\\-si\\\\-tion x ~Dr.~Knuth', 8], ['composi-', 'tion', ' urlpath', 'x  set', ' composi-', 'tion com-', 'position', 'x', ' Dr. Knuth']), ('partial-repair probe', ['x ~url|path url|path ~type word', 5], ['x', ' url', 'path', 'url', 'path', ' type', 'word']), ('partial-repair probe', ['Dr.~Knuth  10~pt  word Dr.~Knuth  word x  b|c  url|path 10~pt', 8], ['Dr. Knuth', '10 pt', 'word', 'Dr. Knuth', 'word x b', 'c url', 'path', '10 pt']), ('discretionary taken', ['the com\\\\-po\\\\-si\\\\-tion', 9], ['the compo-', 'sition']), ('invisible break', ['url|path|x', 5], ['url', 'pathx']), ('control layout', ['word  x hy\\\\-phen', 6], ['word x', 'hyphen']), ('control layout', ['10~pt  ~10~pt ~type ~Dr.~Knuth  Dr.~Knuth', 5], ['10 pt', ' 10 pt', ' type', ' Dr. Knuth', 'Dr. Knuth'])], [('regression: invisible break rendering', ['url|path ~ink  ~url|path  set b|c  hy\\\\-phen', 13], ['urlpath  ink', ' urlpath set', 'bc hyphen']), ('regression: invisible break rendering', ['b|c url|path ~set ink  type ~b|c b|c ~url|path ink', 9], ['bc url', 'path  set', 'ink type', ' bc bc', ' urlpath', 'ink']), ('partial-repair probe', ['url|path  url|path  hy\\\\-phen ink url|path hy\\\\-phen set b|c', 5], ['url', 'path', 'url', 'path', 'hy-', 'phen', 'ink', 'url', 'path', 'hy-', 'phen', 'set b', 'c']), ('partial-repair probe', ['ink  type 10~pt  Dr.~Knuth  set a url|path', 10], ['ink type', '10 pt', 'Dr. Knuth', 'set a url', 'path']), ('discretionary taken', ['the com\\\\-po\\\\-si\\\\-tion', 9], ['the compo-', 'sition']), ('double space collapses', ['type  set', 20], ['type set']), ('control layout', ['hy\\\\-phen type ~word  hy\\\\-phen ~x', 14], ['hyphen type', ' word hyphen', ' x']), ('control layout', ['Dr.~Knuth a Dr.~Knuth set com\\\\-po\\\\-si\\\\-tion Dr.~Knuth', 12], ['Dr. Knuth a', 'Dr. Knuth', 'set composi-', 'tion', 'Dr. Knuth'])], [('regression: invisible break rendering', ['b|c b|c ~set ~com\\\\-po\\\\-si\\\\-tion', 12], ['bc bc  set', ' composition']), ('regression: invisible break rendering', ['10~pt  b|c a', 16], ['10 pt bc a']), ('regression: invisible break rendering', ['Dr.~Knuth  url|path a Dr.~Knuth b|c b|c com\\\\-po\\\\-si\\\\-tion', 15], ['Dr. Knuth url', 'path a', 'Dr. Knuth bc bc', 'composition']), ('partial-repair probe', ['x url|path word ~a', 8], ['x url', 'path', 'word  a']), ('invisible break', ['url|path|x', 5], ['url', 'pathx']), ('tie keeps title with name', ['see Dr.~Knuth now', 9], ['see', 'Dr. Knuth', 'now']), ('control layout', ['Dr.~Knuth set  com\\\\-po\\\\-si\\\\-tion', 5], ['Dr. Knuth', 'set', 'compo-', 'si-', 'tion']), ('control layout', ['word hy\\\\-phen x  ~type Dr.~Knuth ~type', 10], ['word hy-', 'phen x', ' type', 'Dr. Knuth', ' type'])]]\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":"1d5b6ec8be959266c23cba16151e0be1ae885166ea0c1b3b68a0d49b39875862","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 in 'sz' 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 = [[('invisible break', ['url|path|x', 5], ['url', 'pathx']), ('regression: invisible break rendering', ['url|path url|path hy\\\\-phen com\\\\-po\\\\-si\\\\-tion word b|c a word b|c', 11], ['urlpath url', 'path hyphen', 'composition', 'word bc a', 'word bc']), ('partial-repair probe', ['com\\\\-po\\\\-si\\\\-tion word word hy\\\\-phen url|path', 6], ['compo-', 'sition', 'word', 'word', 'hyphen', 'url', 'path']), ('partial-repair probe', ['word set  a  x ~set ~set  b|c x', 6], ['word', 'set a', 'x  set', ' set b', 'c x']), ('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', ['ink a a ~hy\\\\-phen  x com\\\\-po\\\\-si\\\\-tion x', 6], ['ink a', 'a  hy-', 'phen x', 'compo-', 'sition', 'x']), ('control layout', ['hy\\\\-phen ink  type word', 11], ['hyphen ink', 'type word'])], [('regression: invisible break rendering', ['url|path ~com\\\\-po\\\\-si\\\\-tion b|c b|c url|path word Dr.~Knuth url|path  ~hy\\\\-phen', 12], ['urlpath  com-', 'position bc', 'bc urlpath', 'word', 'Dr. Knuth', 'urlpath  hy-', 'phen']), ('regression: invisible break rendering', ['com\\\\-po\\\\-si\\\\-tion ~b|c ~x ink  url|path a', 12], ['composition', ' bc  x ink', 'urlpath a']), ('regression: invisible break rendering', ['b|c a a set a ~com\\\\-po\\\\-si\\\\-tion hy\\\\-phen  ink ~url|path', 11], ['bc a a set', 'a  composi-', 'tion hyphen', 'ink  url', 'path']), ('invisible break', ['url|path|x', 5], ['url', 'pathx']), ('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', ['com\\\\-po\\\\-si\\\\-tion 10~pt word set com\\\\-po\\\\-si\\\\-tion', 6], ['compo-', 'sition', '10 pt', 'word', 'set', 'compo-', 'sition']), ('control layout', ['set com\\\\-po\\\\-si\\\\-tion  10~pt word', 15], ['set composition', '10 pt word'])], [('regression: invisible break rendering', ['10~pt url|path  ink set com\\\\-po\\\\-si\\\\-tion  set  word com\\\\-po\\\\-si\\\\-tion', 7], ['10 pt', 'urlpath', 'ink set', 'composi-', 'tion', 'set', 'word', 'composi-', 'tion']), ('regression: invisible break rendering', ['com\\\\-po\\\\-si\\\\-tion ~url|path x  ~set  ~com\\\\-po\\\\-si\\\\-tion  com\\\\-po\\\\-si\\\\-tion x ~Dr.~Knuth', 8], ['composi-', 'tion', ' urlpath', 'x  set', ' composi-', 'tion com-', 'position', 'x', ' Dr. Knuth']), ('partial-repair probe', ['x ~url|path url|path ~type word', 5], ['x', ' url', 'path', 'url', 'path', ' type', 'word']), ('partial-repair probe', ['Dr.~Knuth  10~pt  word Dr.~Knuth  word x  b|c  url|path 10~pt', 8], ['Dr. Knuth', '10 pt', 'word', 'Dr. Knuth', 'word x b', 'c url', 'path', '10 pt']), ('discretionary taken', ['the com\\\\-po\\\\-si\\\\-tion', 9], ['the compo-', 'sition']), ('invisible break', ['url|path|x', 5], ['url', 'pathx']), ('control layout', ['word  x hy\\\\-phen', 6], ['word x', 'hyphen']), ('control layout', ['10~pt  ~10~pt ~type ~Dr.~Knuth  Dr.~Knuth', 5], ['10 pt', ' 10 pt', ' type', ' Dr. Knuth', 'Dr. Knuth'])], [('regression: invisible break rendering', ['url|path ~ink  ~url|path  set b|c  hy\\\\-phen', 13], ['urlpath  ink', ' urlpath set', 'bc hyphen']), ('regression: invisible break rendering', ['b|c url|path ~set ink  type ~b|c b|c ~url|path ink', 9], ['bc url', 'path  set', 'ink type', ' bc bc', ' urlpath', 'ink']), ('partial-repair probe', ['url|path  url|path  hy\\\\-phen ink url|path hy\\\\-phen set b|c', 5], ['url', 'path', 'url', 'path', 'hy-', 'phen', 'ink', 'url', 'path', 'hy-', 'phen', 'set b', 'c']), ('partial-repair probe', ['ink  type 10~pt  Dr.~Knuth  set a url|path', 10], ['ink type', '10 pt', 'Dr. Knuth', 'set a url', 'path']), ('discretionary taken', ['the com\\\\-po\\\\-si\\\\-tion', 9], ['the compo-', 'sition']), ('double space collapses', ['type  set', 20], ['type set']), ('control layout', ['hy\\\\-phen type ~word  hy\\\\-phen ~x', 14], ['hyphen type', ' word hyphen', ' x']), ('control layout', ['Dr.~Knuth a Dr.~Knuth set com\\\\-po\\\\-si\\\\-tion Dr.~Knuth', 12], ['Dr. Knuth a', 'Dr. Knuth', 'set composi-', 'tion', 'Dr. Knuth'])], [('regression: invisible break rendering', ['b|c b|c ~set ~com\\\\-po\\\\-si\\\\-tion', 12], ['bc bc  set', ' composition']), ('regression: invisible break rendering', ['10~pt  b|c a', 16], ['10 pt bc a']), ('regression: invisible break rendering', ['Dr.~Knuth  url|path a Dr.~Knuth b|c b|c com\\\\-po\\\\-si\\\\-tion', 15], ['Dr. Knuth url', 'path a', 'Dr. Knuth bc bc', 'composition']), ('partial-repair probe', ['x url|path word ~a', 8], ['x url', 'path', 'word  a']), ('invisible break', ['url|path|x', 5], ['url', 'pathx']), ('tie keeps title with name', ['see Dr.~Knuth now', 9], ['see', 'Dr. Knuth', 'now']), ('control layout', ['Dr.~Knuth set  com\\\\-po\\\\-si\\\\-tion', 5], ['Dr. Knuth', 'set', 'compo-', 'si-', 'tion']), ('control layout', ['word hy\\\\-phen x  ~type Dr.~Knuth ~type', 10], ['word hy-', 'phen x', ' type', 'Dr. Knuth', ' type'])]]\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":"6188cb0583ec77fc61eaf899b94cab60a0f07a846d52c6619ec7e40e8a6a124c","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 = [[('invisible break', ['url|path|x', 5], ['url', 'pathx']), ('regression: invisible break rendering', ['url|path url|path hy\\\\-phen com\\\\-po\\\\-si\\\\-tion word b|c a word b|c', 11], ['urlpath url', 'path hyphen', 'composition', 'word bc a', 'word bc']), ('partial-repair probe', ['com\\\\-po\\\\-si\\\\-tion word word hy\\\\-phen url|path', 6], ['compo-', 'sition', 'word', 'word', 'hyphen', 'url', 'path']), ('partial-repair probe', ['word set  a  x ~set ~set  b|c x', 6], ['word', 'set a', 'x  set', ' set b', 'c x']), ('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', ['ink a a ~hy\\\\-phen  x com\\\\-po\\\\-si\\\\-tion x', 6], ['ink a', 'a  hy-', 'phen x', 'compo-', 'sition', 'x']), ('control layout', ['hy\\\\-phen ink  type word', 11], ['hyphen ink', 'type word'])], [('regression: invisible break rendering', ['url|path ~com\\\\-po\\\\-si\\\\-tion b|c b|c url|path word Dr.~Knuth url|path  ~hy\\\\-phen', 12], ['urlpath  com-', 'position bc', 'bc urlpath', 'word', 'Dr. Knuth', 'urlpath  hy-', 'phen']), ('regression: invisible break rendering', ['com\\\\-po\\\\-si\\\\-tion ~b|c ~x ink  url|path a', 12], ['composition', ' bc  x ink', 'urlpath a']), ('regression: invisible break rendering', ['b|c a a set a ~com\\\\-po\\\\-si\\\\-tion hy\\\\-phen  ink ~url|path', 11], ['bc a a set', 'a  composi-', 'tion hyphen', 'ink  url', 'path']), ('invisible break', ['url|path|x', 5], ['url', 'pathx']), ('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', ['com\\\\-po\\\\-si\\\\-tion 10~pt word set com\\\\-po\\\\-si\\\\-tion', 6], ['compo-', 'sition', '10 pt', 'word', 'set', 'compo-', 'sition']), ('control layout', ['set com\\\\-po\\\\-si\\\\-tion  10~pt word', 15], ['set composition', '10 pt word'])], [('regression: invisible break rendering', ['10~pt url|path  ink set com\\\\-po\\\\-si\\\\-tion  set  word com\\\\-po\\\\-si\\\\-tion', 7], ['10 pt', 'urlpath', 'ink set', 'composi-', 'tion', 'set', 'word', 'composi-', 'tion']), ('regression: invisible break rendering', ['com\\\\-po\\\\-si\\\\-tion ~url|path x  ~set  ~com\\\\-po\\\\-si\\\\-tion  com\\\\-po\\\\-si\\\\-tion x ~Dr.~Knuth', 8], ['composi-', 'tion', ' urlpath', 'x  set', ' composi-', 'tion com-', 'position', 'x', ' Dr. Knuth']), ('partial-repair probe', ['x ~url|path url|path ~type word', 5], ['x', ' url', 'path', 'url', 'path', ' type', 'word']), ('partial-repair probe', ['Dr.~Knuth  10~pt  word Dr.~Knuth  word x  b|c  url|path 10~pt', 8], ['Dr. Knuth', '10 pt', 'word', 'Dr. Knuth', 'word x b', 'c url', 'path', '10 pt']), ('discretionary taken', ['the com\\\\-po\\\\-si\\\\-tion', 9], ['the compo-', 'sition']), ('invisible break', ['url|path|x', 5], ['url', 'pathx']), ('control layout', ['word  x hy\\\\-phen', 6], ['word x', 'hyphen']), ('control layout', ['10~pt  ~10~pt ~type ~Dr.~Knuth  Dr.~Knuth', 5], ['10 pt', ' 10 pt', ' type', ' Dr. Knuth', 'Dr. Knuth'])], [('regression: invisible break rendering', ['url|path ~ink  ~url|path  set b|c  hy\\\\-phen', 13], ['urlpath  ink', ' urlpath set', 'bc hyphen']), ('regression: invisible break rendering', ['b|c url|path ~set ink  type ~b|c b|c ~url|path ink', 9], ['bc url', 'path  set', 'ink type', ' bc bc', ' urlpath', 'ink']), ('partial-repair probe', ['url|path  url|path  hy\\\\-phen ink url|path hy\\\\-phen set b|c', 5], ['url', 'path', 'url', 'path', 'hy-', 'phen', 'ink', 'url', 'path', 'hy-', 'phen', 'set b', 'c']), ('partial-repair probe', ['ink  type 10~pt  Dr.~Knuth  set a url|path', 10], ['ink type', '10 pt', 'Dr. Knuth', 'set a url', 'path']), ('discretionary taken', ['the com\\\\-po\\\\-si\\\\-tion', 9], ['the compo-', 'sition']), ('double space collapses', ['type  set', 20], ['type set']), ('control layout', ['hy\\\\-phen type ~word  hy\\\\-phen ~x', 14], ['hyphen type', ' word hyphen', ' x']), ('control layout', ['Dr.~Knuth a Dr.~Knuth set com\\\\-po\\\\-si\\\\-tion Dr.~Knuth', 12], ['Dr. Knuth a', 'Dr. Knuth', 'set composi-', 'tion', 'Dr. Knuth'])], [('regression: invisible break rendering', ['b|c b|c ~set ~com\\\\-po\\\\-si\\\\-tion', 12], ['bc bc  set', ' composition']), ('regression: invisible break rendering', ['10~pt  b|c a', 16], ['10 pt bc a']), ('regression: invisible break rendering', ['Dr.~Knuth  url|path a Dr.~Knuth b|c b|c com\\\\-po\\\\-si\\\\-tion', 15], ['Dr. Knuth url', 'path a', 'Dr. Knuth bc bc', 'composition']), ('partial-repair probe', ['x url|path word ~a', 8], ['x url', 'path', 'word  a']), ('invisible break', ['url|path|x', 5], ['url', 'pathx']), ('tie keeps title with name', ['see Dr.~Knuth now', 9], ['see', 'Dr. Knuth', 'now']), ('control layout', ['Dr.~Knuth set  com\\\\-po\\\\-si\\\\-tion', 5], ['Dr. Knuth', 'set', 'compo-', 'si-', 'tion']), ('control layout', ['word hy\\\\-phen x  ~type Dr.~Knuth ~type', 10], ['word hy-', 'phen x', ' type', 'Dr. Knuth', ' type'])]]\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-invisible-break-rendering","generated_at":"2026-09-29T14:49:51.605050+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":"Join chunks across a zero-width opportunity with nothing.","root_cause":"The zero-width opportunity is joined with a space separator.","sha256":"a1dc9398d1561261f8f58c9fc65d7ac0f5acdd060e361d223123446115b14f91","title":"Ties and discretionary hyphens: invisible break rendering · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":41.909,"exit_code":1,"observations":[{"actual":["urlpathx"],"check":"invisible break","expected":["url","pathx"],"passed":false},{"actual":["urlpath","urlpath hy-","phen compo-","sition word","bc a word","bc"],"check":"regression: invisible break rendering","expected":["urlpath url","path hyphen","composition","word bc a","word bc"],"passed":false},{"actual":["compo-","sition","word","word","hyphen","urlpath"],"check":"partial-repair probe","expected":["compo-","sition","word","word","hyphen","url","path"],"passed":false},{"actual":["word","set a","x  set"," set","bc x"],"check":"partial-repair probe","expected":["word","set a","x  set"," set b","c x"],"passed":false},{"actual":["the compo-","sition"],"check":"discretionary taken","expected":["the compo-","sition"],"passed":true},{"actual":["see","Dr. Knuth","now"],"check":"tie keeps title with name","expected":["see","Dr. Knuth","now"],"passed":true},{"actual":["ink a","a  hy-","phen x","compo-","sition","x"],"check":"control layout","expected":["ink a","a  hy-","phen x","compo-","sition","x"],"passed":true},{"actual":["hyphen ink","type word"],"check":"control layout","expected":["hyphen ink","type word"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"invisible break\", \"actual\": [\"urlpathx\"], \"expected\": [\"url\", \"pathx\"], \"passed\": false}, {\"check\": \"regression: invisible break rendering\", \"actual\": [\"urlpath\", \"urlpath hy-\", \"phen compo-\", \"sition word\", \"bc a word\", \"bc\"], \"expected\": [\"urlpath url\", \"path hyphen\", \"composition\", \"word bc a\", \"word bc\"], \"passed\": false}, {\"check\": \"partial-repair probe\", \"actual\": [\"compo-\", \"sition\", \"word\", \"word\", \"hyphen\", \"urlpath\"], \"expected\": [\"compo-\", \"sition\", \"word\", \"word\", \"hyphen\", \"url\", \"path\"], \"passed\": false}, {\"check\": \"partial-repair probe\", \"actual\": [\"word\", \"set a\", \"x  set\", \" set\", \"bc x\"], \"expected\": [\"word\", \"set a\", \"x  set\", \" set b\", \"c x\"], \"passed\": false}, {\"check\": \"discretionary taken\", \"actual\": [\"the compo-\", \"sition\"], \"expected\": [\"the compo-\", \"sition\"], \"passed\": true}, {\"check\": \"tie keeps title with name\", \"actual\": [\"see\", \"Dr. Knuth\", \"now\"], \"expected\": [\"see\", \"Dr. Knuth\", \"now\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"ink a\", \"a  hy-\", \"phen x\", \"compo-\", \"sition\", \"x\"], \"expected\": [\"ink a\", \"a  hy-\", \"phen x\", \"compo-\", \"sition\", \"x\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"hyphen ink\", \"type word\"], \"expected\": [\"hyphen ink\", \"type word\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.638,"exit_code":1,"observations":[{"actual":["url","path","x"],"check":"invisible break","expected":["url","pathx"],"passed":false},{"actual":["url path","url path hy-","phen compo-","sition word","b c a word","b c"],"check":"regression: invisible break rendering","expected":["urlpath url","path hyphen","composition","word bc a","word bc"],"passed":false},{"actual":["compo-","sition","word","word","hyphen","url","path"],"check":"partial-repair probe","expected":["compo-","sition","word","word","hyphen","url","path"],"passed":true},{"actual":["word","set a","x  set"," set b","c x"],"check":"partial-repair probe","expected":["word","set a","x  set"," set b","c x"],"passed":true},{"actual":["the compo-","sition"],"check":"discretionary taken","expected":["the compo-","sition"],"passed":true},{"actual":["see","Dr. Knuth","now"],"check":"tie keeps title with name","expected":["see","Dr. Knuth","now"],"passed":true},{"actual":["ink a","a  hy-","phen x","compo-","sition","x"],"check":"control layout","expected":["ink a","a  hy-","phen x","compo-","sition","x"],"passed":true},{"actual":["hyphen ink","type word"],"check":"control layout","expected":["hyphen ink","type word"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"invisible break\", \"actual\": [\"url\", \"path\", \"x\"], \"expected\": [\"url\", \"pathx\"], \"passed\": false}, {\"check\": \"regression: invisible break rendering\", \"actual\": [\"url path\", \"url path hy-\", \"phen compo-\", \"sition word\", \"b c a word\", \"b c\"], \"expected\": [\"urlpath url\", \"path hyphen\", \"composition\", \"word bc a\", \"word bc\"], \"passed\": false}, {\"check\": \"partial-repair probe\", \"actual\": [\"compo-\", \"sition\", \"word\", \"word\", \"hyphen\", \"url\", \"path\"], \"expected\": [\"compo-\", \"sition\", \"word\", \"word\", \"hyphen\", \"url\", \"path\"], \"passed\": true}, {\"check\": \"partial-repair probe\", \"actual\": [\"word\", \"set a\", \"x  set\", \" set b\", \"c x\"], \"expected\": [\"word\", \"set a\", \"x  set\", \" set b\", \"c x\"], \"passed\": true}, {\"check\": \"discretionary taken\", \"actual\": [\"the compo-\", \"sition\"], \"expected\": [\"the compo-\", \"sition\"], \"passed\": true}, {\"check\": \"tie keeps title with name\", \"actual\": [\"see\", \"Dr. Knuth\", \"now\"], \"expected\": [\"see\", \"Dr. Knuth\", \"now\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"ink a\", \"a  hy-\", \"phen x\", \"compo-\", \"sition\", \"x\"], \"expected\": [\"ink a\", \"a  hy-\", \"phen x\", \"compo-\", \"sition\", \"x\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"hyphen ink\", \"type word\"], \"expected\": [\"hyphen ink\", \"type word\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.614,"exit_code":0,"observations":[{"actual":["url","pathx"],"check":"invisible break","expected":["url","pathx"],"passed":true},{"actual":["urlpath url","path hyphen","composition","word bc a","word bc"],"check":"regression: invisible break rendering","expected":["urlpath url","path hyphen","composition","word bc a","word bc"],"passed":true},{"actual":["compo-","sition","word","word","hyphen","url","path"],"check":"partial-repair probe","expected":["compo-","sition","word","word","hyphen","url","path"],"passed":true},{"actual":["word","set a","x  set"," set b","c x"],"check":"partial-repair probe","expected":["word","set a","x  set"," set b","c x"],"passed":true},{"actual":["the compo-","sition"],"check":"discretionary taken","expected":["the compo-","sition"],"passed":true},{"actual":["see","Dr. Knuth","now"],"check":"tie keeps title with name","expected":["see","Dr. Knuth","now"],"passed":true},{"actual":["ink a","a  hy-","phen x","compo-","sition","x"],"check":"control layout","expected":["ink a","a  hy-","phen x","compo-","sition","x"],"passed":true},{"actual":["hyphen ink","type word"],"check":"control layout","expected":["hyphen ink","type word"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"invisible break\", \"actual\": [\"url\", \"pathx\"], \"expected\": [\"url\", \"pathx\"], \"passed\": true}, {\"check\": \"regression: invisible break rendering\", \"actual\": [\"urlpath url\", \"path hyphen\", \"composition\", \"word bc a\", \"word bc\"], \"expected\": [\"urlpath url\", \"path hyphen\", \"composition\", \"word bc a\", \"word bc\"], \"passed\": true}, {\"check\": \"partial-repair probe\", \"actual\": [\"compo-\", \"sition\", \"word\", \"word\", \"hyphen\", \"url\", \"path\"], \"expected\": [\"compo-\", \"sition\", \"word\", \"word\", \"hyphen\", \"url\", \"path\"], \"passed\": true}, {\"check\": \"partial-repair probe\", \"actual\": [\"word\", \"set a\", \"x  set\", \" set b\", \"c x\"], \"expected\": [\"word\", \"set a\", \"x  set\", \" set b\", \"c x\"], \"passed\": true}, {\"check\": \"discretionary taken\", \"actual\": [\"the compo-\", \"sition\"], \"expected\": [\"the compo-\", \"sition\"], \"passed\": true}, {\"check\": \"tie keeps title with name\", \"actual\": [\"see\", \"Dr. Knuth\", \"now\"], \"expected\": [\"see\", \"Dr. Knuth\", \"now\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"ink a\", \"a  hy-\", \"phen x\", \"compo-\", \"sition\", \"x\"], \"expected\": [\"ink a\", \"a  hy-\", \"phen x\", \"compo-\", \"sition\", \"x\"], \"passed\": true}, {\"check\": \"control layout\", \"actual\": [\"hyphen ink\", \"type word\"], \"expected\": [\"hyphen ink\", \"type word\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}