FA-80251 / Typography line breaking / Open access
Hanging-indent list labels: continuation column · case 01
Continuation lines are filled as if they started at column 0.
ROOT CAUSE
The column after a wrap forgets the hang indent.
VERIFIED REPAIR
Continuation lines start measuring at the hang column.
Unsuccessful approach: Using the first-line start column overcounts after overflowing labels.
Case contract
Input [label, words, width, hang]. The label starts at column 0; first-line text starts at column hang when label+1 space fits, else right after label plus one space. Continuation lines are indented by hang. Greedy fill with unit spaces measuring absolute columns. Return padded lines.
Why this case matters
Line breaking decides where paragraphs wrap on screen and in print; a wrong decision point shifts every following line.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
label, words, width, hang = x
lines = []
first = True
start = hang if len(label) + 1 <= hang else len(label) + 1
cur = []
col = start
for w in words:
need = col + len(w) if not cur else col + 1 + len(w)
if cur and need > width:
prefix = label.ljust(start) if first else ' ' * hang
lines.append(prefix + ' '.join(cur))
first = False
cur = [w]
col = len(w)
else:
cur.append(w)
col = need
if cur:
prefix = label.ljust(start) if first else ' ' * hang
lines.append(prefix + ' '.join(cur))
return lines
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('label exactly one short of hang', ['1.', ['the', 'type', 'grid', 'is', 'on'], 12, 3], ['1. the type', ' grid is', ' on']), ('regression: continuation column', ['(a)', ['kerning', 'serif', 'the', 'of', 'kerning', 'the'], 14, 4], ['(a) kerning', ' serif the', ' of kerning', ' the']), ('partial-repair probe', ['iv.', ['measure', 'type', 'on', 'at', 'x'], 15, 2], ['iv. measure', ' type on at x']), ('partial-repair probe', ['A.1.2', ['at', 'serif', 'of', 'type', 'ink', 'measure'], 19, 3], ['A.1.2 at serif of', ' type ink measure']), ('label overflows hang', ['Note:', ['the', 'type', 'grid', 'is', 'on', 'serif'], 14, 3], ['Note: the type', ' grid is on', ' serif']), ('control layout', ['Note:', ['a', 'serif', 'at', 'ink', 'on', 'of'], 21, 5], ['Note: a serif at ink', ' on of']), ('control layout', ['A.1.2', ['grid', 'baseline', 'measure', 'measure', 'baseline'], 14, 2], ['A.1.2 grid', ' baseline', ' measure', ' measure', ' baseline']), ('control layout', ['•', ['the', 'x', 'a'], 17, 2], ['• the x a'])], [('regression: continuation column', ['•', ['ink', 'kerning', 'serif', 'grid', 'baseline', 'is', 'type', 'ink'], 21, 2], ['• ink kerning serif', ' grid baseline is', ' type ink']), ('regression: continuation column', ['iv.', ['ink', 'measure', 'kerning', 'on', 'of', 'serif', 'is', 'baseline'], 20, 4], ['iv. ink measure', ' kerning on of', ' serif is', ' baseline']), ('regression: continuation column', ['A.1.2', ['of', 'measure', 'kerning', 'kerning', 'baseline', 'serif', 'at'], 19, 4], ['A.1.2 of measure', ' kerning kerning', ' baseline serif', ' at']), ('partial-repair probe', ['A.1.2', ['grid', 'on', 'a', 'at', 'grid', 'grid'], 17, 2], ['A.1.2 grid on a', ' at grid grid']), ('label exactly one short of hang', ['1.', ['the', 'type', 'grid', 'is', 'on'], 12, 3], ['1. the type', ' grid is', ' on']), ('label overflows hang', ['Note:', ['the', 'type', 'grid', 'is', 'on', 'serif'], 14, 3], ['Note: the type', ' grid is on', ' serif']), ('control layout', ['•', ['ink', 'type', 'at', 'kerning', 'x'], 16, 2], ['• ink type at', ' kerning x']), ('control layout', ['Note:', ['type', 'the', 'is', 'baseline', 'is'], 20, 5], ['Note: type the is', ' baseline is'])], [('regression: continuation column', ['(a)', ['at', 'is', 'kerning', 'x', 'at', 'of', 'on', 'on', 'ink'], 18, 5], ['(a) at is kerning', ' x at of on on', ' ink']), ('regression: continuation column', ['•', ['baseline', 'serif', 'of', 'the', 'x', 'is', 'on'], 13, 4], ['• baseline', ' serif of', ' the x is', ' on']), ('partial-repair probe', ['iv.', ['kerning', 'of', 'kerning', 'is', 'of', 'ink'], 16, 3], ['iv. kerning of', ' kerning is of', ' ink']), ('partial-repair probe', ['Note:', ['kerning', 'serif', 'type', 'is', 'at', 'the'], 15, 2], ['Note: kerning', ' serif type is', ' at the']), ('label overflows hang', ['Note:', ['the', 'type', 'grid', 'is', 'on', 'serif'], 14, 3], ['Note: the type', ' grid is on', ' serif']), ('label exactly one short of hang', ['1.', ['the', 'type', 'grid', 'is', 'on'], 12, 3], ['1. the type', ' grid is', ' on']), ('control layout', ['(a)', ['the', 'is', 'serif'], 14, 2], ['(a) the is', ' serif']), ('control layout', ['(a)', ['at', 'of', 'on', 'of', 'kerning', 'of'], 19, 3], ['(a) at of on of', ' kerning of'])], [('regression: continuation column', ['iv.', ['ink', 'type', 'serif', 'kerning', 'the', 'a'], 14, 2], ['iv. ink type', ' serif', ' kerning the', ' a']), ('regression: continuation column', ['1.', ['serif', 'baseline', 'of', 'a', 'at', 'is', 'measure'], 13, 3], ['1. serif', ' baseline', ' of a at is', ' measure']), ('partial-repair probe', ['Note:', ['kerning', 'serif', 'type', 'is', 'at', 'the'], 15, 2], ['Note: kerning', ' serif type is', ' at the']), ('regression: continuation column', ['(a)', ['of', 'ink', 'baseline', 'ink', 'on', 'type', 'measure', 'baseline', 'grid'], 14, 2], ['(a) of ink', ' baseline ink', ' on type', ' measure', ' baseline', ' grid']), ('label overflows hang', ['Note:', ['the', 'type', 'grid', 'is', 'on', 'serif'], 14, 3], ['Note: the type', ' grid is on', ' serif']), ('label exactly one short of hang', ['1.', ['the', 'type', 'grid', 'is', 'on'], 12, 3], ['1. the type', ' grid is', ' on']), ('control layout', ['•', ['on', 'measure', 'ink', 'ink'], 22, 4], ['• on measure ink ink']), ('control layout', ['10.', ['at', 'type', 'on', 'kerning', 'on'], 22, 4], ['10. at type on kerning', ' on'])], [('regression: continuation column', ['(a)', ['kerning', 'baseline', 'baseline', 'x', 'the', 'x'], 16, 5], ['(a) kerning', ' baseline', ' baseline x', ' the x']), ('regression: continuation column', ['iv.', ['of', 'at', 'ink', 'x', 'is', 'measure', 'on'], 16, 4], ['iv. of at ink x', ' is measure', ' on']), ('regression: continuation column', ['A.1.2', ['of', 'measure', 'kerning', 'kerning', 'baseline', 'serif', 'at'], 19, 4], ['A.1.2 of measure', ' kerning kerning', ' baseline serif', ' at']), ('regression: continuation column', ['A.1.2', ['on', 'at', 'of', 'kerning', 'type', 'of', 'measure', 'baseline', 'grid'], 18, 5], ['A.1.2 on at of', ' kerning type', ' of measure', ' baseline grid']), ('label overflows hang', ['Note:', ['the', 'type', 'grid', 'is', 'on', 'serif'], 14, 3], ['Note: the type', ' grid is on', ' serif']), ('label exactly one short of hang', ['1.', ['the', 'type', 'grid', 'is', 'on'], 12, 3], ['1. the type', ' grid is', ' on']), ('control layout', ['iv.', ['ink', 'the', 'baseline', 'type'], 17, 3], ['iv. ink the', ' baseline type']), ('control layout', ['iv.', ['on', 'serif', 'baseline', 'x'], 14, 2], ['iv. on serif', ' baseline x'])]]
for label, args, expected in fixtures[N - 1]:
check(label, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| label exactly one short of hang | ['1. the type', ' grid is on'] | ['1. the type', ' grid is', ' on'] | Failed |
| regression: continuation column | ['(a) kerning', ' serif the of', ' kerning the'] | ['(a) kerning', ' serif the', ' of kerning', ' the'] | Failed |
| partial-repair probe | ['iv. measure', ' type on at x'] | ['iv. measure', ' type on at x'] | Passed |
| partial-repair probe | ['A.1.2 at serif of', ' type ink measure'] | ['A.1.2 at serif of', ' type ink measure'] | Passed |
| label overflows hang | ['Note: the type', ' grid is on', ' serif'] | ['Note: the type', ' grid is on', ' serif'] | Passed |
| control layout | ['Note: a serif at ink', ' on of'] | ['Note: a serif at ink', ' on of'] | Passed |
| control layout | ['A.1.2 grid', ' baseline', ' measure', ' measure', ' baseline'] | ['A.1.2 grid', ' baseline', ' measure', ' measure', ' baseline'] | Passed |
| control layout | ['• the x a'] | ['• the x a'] | Passed |
SHA-256 / e5ecfcc4a8694807c9ef8b9b6692ea8a4907969152057e7e5fc1e08aecb54036
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
label, words, width, hang = x
lines = []
first = True
start = hang if len(label) + 1 <= hang else len(label) + 1
cur = []
col = start
for w in words:
need = col + len(w) if not cur else col + 1 + len(w)
if cur and need > width:
prefix = label.ljust(start) if first else ' ' * hang
lines.append(prefix + ' '.join(cur))
first = False
cur = [w]
col = start + len(w)
else:
cur.append(w)
col = need
if cur:
prefix = label.ljust(start) if first else ' ' * hang
lines.append(prefix + ' '.join(cur))
return lines
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('label exactly one short of hang', ['1.', ['the', 'type', 'grid', 'is', 'on'], 12, 3], ['1. the type', ' grid is', ' on']), ('regression: continuation column', ['(a)', ['kerning', 'serif', 'the', 'of', 'kerning', 'the'], 14, 4], ['(a) kerning', ' serif the', ' of kerning', ' the']), ('partial-repair probe', ['iv.', ['measure', 'type', 'on', 'at', 'x'], 15, 2], ['iv. measure', ' type on at x']), ('partial-repair probe', ['A.1.2', ['at', 'serif', 'of', 'type', 'ink', 'measure'], 19, 3], ['A.1.2 at serif of', ' type ink measure']), ('label overflows hang', ['Note:', ['the', 'type', 'grid', 'is', 'on', 'serif'], 14, 3], ['Note: the type', ' grid is on', ' serif']), ('control layout', ['Note:', ['a', 'serif', 'at', 'ink', 'on', 'of'], 21, 5], ['Note: a serif at ink', ' on of']), ('control layout', ['A.1.2', ['grid', 'baseline', 'measure', 'measure', 'baseline'], 14, 2], ['A.1.2 grid', ' baseline', ' measure', ' measure', ' baseline']), ('control layout', ['•', ['the', 'x', 'a'], 17, 2], ['• the x a'])], [('regression: continuation column', ['•', ['ink', 'kerning', 'serif', 'grid', 'baseline', 'is', 'type', 'ink'], 21, 2], ['• ink kerning serif', ' grid baseline is', ' type ink']), ('regression: continuation column', ['iv.', ['ink', 'measure', 'kerning', 'on', 'of', 'serif', 'is', 'baseline'], 20, 4], ['iv. ink measure', ' kerning on of', ' serif is', ' baseline']), ('regression: continuation column', ['A.1.2', ['of', 'measure', 'kerning', 'kerning', 'baseline', 'serif', 'at'], 19, 4], ['A.1.2 of measure', ' kerning kerning', ' baseline serif', ' at']), ('partial-repair probe', ['A.1.2', ['grid', 'on', 'a', 'at', 'grid', 'grid'], 17, 2], ['A.1.2 grid on a', ' at grid grid']), ('label exactly one short of hang', ['1.', ['the', 'type', 'grid', 'is', 'on'], 12, 3], ['1. the type', ' grid is', ' on']), ('label overflows hang', ['Note:', ['the', 'type', 'grid', 'is', 'on', 'serif'], 14, 3], ['Note: the type', ' grid is on', ' serif']), ('control layout', ['•', ['ink', 'type', 'at', 'kerning', 'x'], 16, 2], ['• ink type at', ' kerning x']), ('control layout', ['Note:', ['type', 'the', 'is', 'baseline', 'is'], 20, 5], ['Note: type the is', ' baseline is'])], [('regression: continuation column', ['(a)', ['at', 'is', 'kerning', 'x', 'at', 'of', 'on', 'on', 'ink'], 18, 5], ['(a) at is kerning', ' x at of on on', ' ink']), ('regression: continuation column', ['•', ['baseline', 'serif', 'of', 'the', 'x', 'is', 'on'], 13, 4], ['• baseline', ' serif of', ' the x is', ' on']), ('partial-repair probe', ['iv.', ['kerning', 'of', 'kerning', 'is', 'of', 'ink'], 16, 3], ['iv. kerning of', ' kerning is of', ' ink']), ('partial-repair probe', ['Note:', ['kerning', 'serif', 'type', 'is', 'at', 'the'], 15, 2], ['Note: kerning', ' serif type is', ' at the']), ('label overflows hang', ['Note:', ['the', 'type', 'grid', 'is', 'on', 'serif'], 14, 3], ['Note: the type', ' grid is on', ' serif']), ('label exactly one short of hang', ['1.', ['the', 'type', 'grid', 'is', 'on'], 12, 3], ['1. the type', ' grid is', ' on']), ('control layout', ['(a)', ['the', 'is', 'serif'], 14, 2], ['(a) the is', ' serif']), ('control layout', ['(a)', ['at', 'of', 'on', 'of', 'kerning', 'of'], 19, 3], ['(a) at of on of', ' kerning of'])], [('regression: continuation column', ['iv.', ['ink', 'type', 'serif', 'kerning', 'the', 'a'], 14, 2], ['iv. ink type', ' serif', ' kerning the', ' a']), ('regression: continuation column', ['1.', ['serif', 'baseline', 'of', 'a', 'at', 'is', 'measure'], 13, 3], ['1. serif', ' baseline', ' of a at is', ' measure']), ('partial-repair probe', ['Note:', ['kerning', 'serif', 'type', 'is', 'at', 'the'], 15, 2], ['Note: kerning', ' serif type is', ' at the']), ('regression: continuation column', ['(a)', ['of', 'ink', 'baseline', 'ink', 'on', 'type', 'measure', 'baseline', 'grid'], 14, 2], ['(a) of ink', ' baseline ink', ' on type', ' measure', ' baseline', ' grid']), ('label overflows hang', ['Note:', ['the', 'type', 'grid', 'is', 'on', 'serif'], 14, 3], ['Note: the type', ' grid is on', ' serif']), ('label exactly one short of hang', ['1.', ['the', 'type', 'grid', 'is', 'on'], 12, 3], ['1. the type', ' grid is', ' on']), ('control layout', ['•', ['on', 'measure', 'ink', 'ink'], 22, 4], ['• on measure ink ink']), ('control layout', ['10.', ['at', 'type', 'on', 'kerning', 'on'], 22, 4], ['10. at type on kerning', ' on'])], [('regression: continuation column', ['(a)', ['kerning', 'baseline', 'baseline', 'x', 'the', 'x'], 16, 5], ['(a) kerning', ' baseline', ' baseline x', ' the x']), ('regression: continuation column', ['iv.', ['of', 'at', 'ink', 'x', 'is', 'measure', 'on'], 16, 4], ['iv. of at ink x', ' is measure', ' on']), ('regression: continuation column', ['A.1.2', ['of', 'measure', 'kerning', 'kerning', 'baseline', 'serif', 'at'], 19, 4], ['A.1.2 of measure', ' kerning kerning', ' baseline serif', ' at']), ('regression: continuation column', ['A.1.2', ['on', 'at', 'of', 'kerning', 'type', 'of', 'measure', 'baseline', 'grid'], 18, 5], ['A.1.2 on at of', ' kerning type', ' of measure', ' baseline grid']), ('label overflows hang', ['Note:', ['the', 'type', 'grid', 'is', 'on', 'serif'], 14, 3], ['Note: the type', ' grid is on', ' serif']), ('label exactly one short of hang', ['1.', ['the', 'type', 'grid', 'is', 'on'], 12, 3], ['1. the type', ' grid is', ' on']), ('control layout', ['iv.', ['ink', 'the', 'baseline', 'type'], 17, 3], ['iv. ink the', ' baseline type']), ('control layout', ['iv.', ['on', 'serif', 'baseline', 'x'], 14, 2], ['iv. on serif', ' baseline x'])]]
for label, args, expected in fixtures[N - 1]:
check(label, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| label exactly one short of hang | ['1. the type', ' grid is', ' on'] | ['1. the type', ' grid is', ' on'] | Passed |
| regression: continuation column | ['(a) kerning', ' serif the', ' of kerning', ' the'] | ['(a) kerning', ' serif the', ' of kerning', ' the'] | Passed |
| partial-repair probe | ['iv. measure', ' type on at', ' x'] | ['iv. measure', ' type on at x'] | Failed |
| partial-repair probe | ['A.1.2 at serif of', ' type ink', ' measure'] | ['A.1.2 at serif of', ' type ink measure'] | Failed |
| label overflows hang | ['Note: the type', ' grid is', ' on serif'] | ['Note: the type', ' grid is on', ' serif'] | Failed |
| control layout | ['Note: a serif at ink', ' on of'] | ['Note: a serif at ink', ' on of'] | Passed |
| control layout | ['A.1.2 grid', ' baseline', ' measure', ' measure', ' baseline'] | ['A.1.2 grid', ' baseline', ' measure', ' measure', ' baseline'] | Passed |
| control layout | ['• the x a'] | ['• the x a'] | Passed |
SHA-256 / 0417c115f3ee6249715905ca9b073cdaf0cca6650a8248d6134a4447cb858cbf
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(x):
label, words, width, hang = x
lines = []
first = True
start = hang if len(label) + 1 <= hang else len(label) + 1
cur = []
col = start
for w in words:
need = col + len(w) if not cur else col + 1 + len(w)
if cur and need > width:
prefix = label.ljust(start) if first else ' ' * hang
lines.append(prefix + ' '.join(cur))
first = False
cur = [w]
col = hang + len(w)
else:
cur.append(w)
col = need
if cur:
prefix = label.ljust(start) if first else ' ' * hang
lines.append(prefix + ' '.join(cur))
return lines
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('label exactly one short of hang', ['1.', ['the', 'type', 'grid', 'is', 'on'], 12, 3], ['1. the type', ' grid is', ' on']), ('regression: continuation column', ['(a)', ['kerning', 'serif', 'the', 'of', 'kerning', 'the'], 14, 4], ['(a) kerning', ' serif the', ' of kerning', ' the']), ('partial-repair probe', ['iv.', ['measure', 'type', 'on', 'at', 'x'], 15, 2], ['iv. measure', ' type on at x']), ('partial-repair probe', ['A.1.2', ['at', 'serif', 'of', 'type', 'ink', 'measure'], 19, 3], ['A.1.2 at serif of', ' type ink measure']), ('label overflows hang', ['Note:', ['the', 'type', 'grid', 'is', 'on', 'serif'], 14, 3], ['Note: the type', ' grid is on', ' serif']), ('control layout', ['Note:', ['a', 'serif', 'at', 'ink', 'on', 'of'], 21, 5], ['Note: a serif at ink', ' on of']), ('control layout', ['A.1.2', ['grid', 'baseline', 'measure', 'measure', 'baseline'], 14, 2], ['A.1.2 grid', ' baseline', ' measure', ' measure', ' baseline']), ('control layout', ['•', ['the', 'x', 'a'], 17, 2], ['• the x a'])], [('regression: continuation column', ['•', ['ink', 'kerning', 'serif', 'grid', 'baseline', 'is', 'type', 'ink'], 21, 2], ['• ink kerning serif', ' grid baseline is', ' type ink']), ('regression: continuation column', ['iv.', ['ink', 'measure', 'kerning', 'on', 'of', 'serif', 'is', 'baseline'], 20, 4], ['iv. ink measure', ' kerning on of', ' serif is', ' baseline']), ('regression: continuation column', ['A.1.2', ['of', 'measure', 'kerning', 'kerning', 'baseline', 'serif', 'at'], 19, 4], ['A.1.2 of measure', ' kerning kerning', ' baseline serif', ' at']), ('partial-repair probe', ['A.1.2', ['grid', 'on', 'a', 'at', 'grid', 'grid'], 17, 2], ['A.1.2 grid on a', ' at grid grid']), ('label exactly one short of hang', ['1.', ['the', 'type', 'grid', 'is', 'on'], 12, 3], ['1. the type', ' grid is', ' on']), ('label overflows hang', ['Note:', ['the', 'type', 'grid', 'is', 'on', 'serif'], 14, 3], ['Note: the type', ' grid is on', ' serif']), ('control layout', ['•', ['ink', 'type', 'at', 'kerning', 'x'], 16, 2], ['• ink type at', ' kerning x']), ('control layout', ['Note:', ['type', 'the', 'is', 'baseline', 'is'], 20, 5], ['Note: type the is', ' baseline is'])], [('regression: continuation column', ['(a)', ['at', 'is', 'kerning', 'x', 'at', 'of', 'on', 'on', 'ink'], 18, 5], ['(a) at is kerning', ' x at of on on', ' ink']), ('regression: continuation column', ['•', ['baseline', 'serif', 'of', 'the', 'x', 'is', 'on'], 13, 4], ['• baseline', ' serif of', ' the x is', ' on']), ('partial-repair probe', ['iv.', ['kerning', 'of', 'kerning', 'is', 'of', 'ink'], 16, 3], ['iv. kerning of', ' kerning is of', ' ink']), ('partial-repair probe', ['Note:', ['kerning', 'serif', 'type', 'is', 'at', 'the'], 15, 2], ['Note: kerning', ' serif type is', ' at the']), ('label overflows hang', ['Note:', ['the', 'type', 'grid', 'is', 'on', 'serif'], 14, 3], ['Note: the type', ' grid is on', ' serif']), ('label exactly one short of hang', ['1.', ['the', 'type', 'grid', 'is', 'on'], 12, 3], ['1. the type', ' grid is', ' on']), ('control layout', ['(a)', ['the', 'is', 'serif'], 14, 2], ['(a) the is', ' serif']), ('control layout', ['(a)', ['at', 'of', 'on', 'of', 'kerning', 'of'], 19, 3], ['(a) at of on of', ' kerning of'])], [('regression: continuation column', ['iv.', ['ink', 'type', 'serif', 'kerning', 'the', 'a'], 14, 2], ['iv. ink type', ' serif', ' kerning the', ' a']), ('regression: continuation column', ['1.', ['serif', 'baseline', 'of', 'a', 'at', 'is', 'measure'], 13, 3], ['1. serif', ' baseline', ' of a at is', ' measure']), ('partial-repair probe', ['Note:', ['kerning', 'serif', 'type', 'is', 'at', 'the'], 15, 2], ['Note: kerning', ' serif type is', ' at the']), ('regression: continuation column', ['(a)', ['of', 'ink', 'baseline', 'ink', 'on', 'type', 'measure', 'baseline', 'grid'], 14, 2], ['(a) of ink', ' baseline ink', ' on type', ' measure', ' baseline', ' grid']), ('label overflows hang', ['Note:', ['the', 'type', 'grid', 'is', 'on', 'serif'], 14, 3], ['Note: the type', ' grid is on', ' serif']), ('label exactly one short of hang', ['1.', ['the', 'type', 'grid', 'is', 'on'], 12, 3], ['1. the type', ' grid is', ' on']), ('control layout', ['•', ['on', 'measure', 'ink', 'ink'], 22, 4], ['• on measure ink ink']), ('control layout', ['10.', ['at', 'type', 'on', 'kerning', 'on'], 22, 4], ['10. at type on kerning', ' on'])], [('regression: continuation column', ['(a)', ['kerning', 'baseline', 'baseline', 'x', 'the', 'x'], 16, 5], ['(a) kerning', ' baseline', ' baseline x', ' the x']), ('regression: continuation column', ['iv.', ['of', 'at', 'ink', 'x', 'is', 'measure', 'on'], 16, 4], ['iv. of at ink x', ' is measure', ' on']), ('regression: continuation column', ['A.1.2', ['of', 'measure', 'kerning', 'kerning', 'baseline', 'serif', 'at'], 19, 4], ['A.1.2 of measure', ' kerning kerning', ' baseline serif', ' at']), ('regression: continuation column', ['A.1.2', ['on', 'at', 'of', 'kerning', 'type', 'of', 'measure', 'baseline', 'grid'], 18, 5], ['A.1.2 on at of', ' kerning type', ' of measure', ' baseline grid']), ('label overflows hang', ['Note:', ['the', 'type', 'grid', 'is', 'on', 'serif'], 14, 3], ['Note: the type', ' grid is on', ' serif']), ('label exactly one short of hang', ['1.', ['the', 'type', 'grid', 'is', 'on'], 12, 3], ['1. the type', ' grid is', ' on']), ('control layout', ['iv.', ['ink', 'the', 'baseline', 'type'], 17, 3], ['iv. ink the', ' baseline type']), ('control layout', ['iv.', ['on', 'serif', 'baseline', 'x'], 14, 2], ['iv. on serif', ' baseline x'])]]
for label, args, expected in fixtures[N - 1]:
check(label, solve(args), expected)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| label exactly one short of hang | ['1. the type', ' grid is', ' on'] | ['1. the type', ' grid is', ' on'] | Passed |
| regression: continuation column | ['(a) kerning', ' serif the', ' of kerning', ' the'] | ['(a) kerning', ' serif the', ' of kerning', ' the'] | Passed |
| partial-repair probe | ['iv. measure', ' type on at x'] | ['iv. measure', ' type on at x'] | Passed |
| partial-repair probe | ['A.1.2 at serif of', ' type ink measure'] | ['A.1.2 at serif of', ' type ink measure'] | Passed |
| label overflows hang | ['Note: the type', ' grid is on', ' serif'] | ['Note: the type', ' grid is on', ' serif'] | Passed |
| control layout | ['Note: a serif at ink', ' on of'] | ['Note: a serif at ink', ' on of'] | Passed |
| control layout | ['A.1.2 grid', ' baseline', ' measure', ' measure', ' baseline'] | ['A.1.2 grid', ' baseline', ' measure', ' measure', ' baseline'] | Passed |
| control layout | ['• the x a'] | ['• the x a'] | Passed |
SHA-256 / 4972b350b0ceee1dda2b238bb94eb8a4919f9cd5fecb42f1c6f65c69acdbbd2e
Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:49:52.198606+00:00.
Case digest / a610ee637c49eceafd40c7991bea9c472bd5b161f5905c9060d290a46c0792b2