FA-80261 / Typography line breaking / Open access
Hanging-indent list labels: continuation indent · case 01
Continuation lines are indented under the first-line text instead of the hang.
ROOT CAUSE
The continuation prefix uses the first-line start column.
VERIFIED REPAIR
Indent continuation lines by the hang.
Unsuccessful approach: Indenting by hang - 1 misaligns the block.
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 ' ' * start
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 ' ' * start
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 overflows hang', ['Note:', ['the', 'type', 'grid', 'is', 'on', 'serif'], 14, 3], ['Note: the type', ' grid is on', ' serif']), ('regression: continuation indent', ['(a)', ['measure', 'the', 'at', 'type', 'the', 'is', 'type', 'of'], 16, 3], ['(a) measure the', ' at type the', ' is type of']), ('regression: continuation indent', ['Note:', ['a', 'serif', 'at', 'ink', 'on', 'of'], 21, 5], ['Note: a serif at ink', ' on of']), ('regression: continuation indent', ['1.', ['on', 'x', 'kerning', 'at', 'the', 'grid', 'is', 'the'], 13, 2], ['1. on x', ' kerning at', ' the grid is', ' the']), ('label exactly one short of hang', ['1.', ['the', 'type', 'grid', 'is', 'on'], 12, 3], ['1. the type', ' grid is', ' on']), ('control layout', ['10.', ['x', 'on', 'kerning'], 21, 2], ['10. x on kerning']), ('control layout', ['A.1.2', ['the', 'the'], 14, 3], ['A.1.2 the the']), ('control layout', ['1.', ['serif', 'on'], 16, 2], ['1. serif on'])], [('regression: continuation indent', ['Note:', ['on', 'at', 'a', 'x', 'baseline', 'x', 'grid'], 18, 3], ['Note: on at a x', ' baseline x grid']), ('regression: continuation indent', ['10.', ['is', 'is', 'x', 'x', 'baseline', 'grid', 'serif', 'the', 'on'], 17, 3], ['10. is is x x', ' baseline grid', ' serif the on']), ('partial-repair probe', ['10.', ['measure', 'at', 'kerning', 'a'], 22, 5], ['10. measure at', ' kerning a']), ('partial-repair probe', ['iv.', ['x', 'a', 'on', 'ink', 'on', 'type', 'a'], 19, 5], ['iv. x a on ink on', ' type a']), ('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.1.2', ['type', 'x', 'ink'], 18, 2], ['A.1.2 type x ink']), ('control layout', ['10.', ['the', 'x', 'the'], 15, 2], ['10. the x the'])], [('regression: continuation indent', ['Note:', ['x', 'of', 'the', 'serif', 'a', 'ink', 'type'], 22, 4], ['Note: x of the serif a', ' ink type']), ('regression: continuation indent', ['(a)', ['measure', 'the', 'at', 'type', 'the', 'is', 'type', 'of'], 16, 3], ['(a) measure the', ' at type the', ' is type of']), ('partial-repair probe', ['1.', ['grid', 'grid', 'type', 'serif', 'baseline', 'is', 'x', 'is'], 13, 3], ['1. grid grid', ' type serif', ' baseline', ' is x is']), ('partial-repair probe', ['iv.', ['type', 'a', 'of', 'of', 'is', 'is', 'baseline', 'kerning'], 13, 4], ['iv. type a of', ' of is is', ' baseline', ' kerning']), ('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', ['A.1.2', ['type', 'measure'], 21, 3], ['A.1.2 type measure']), ('control layout', ['iv.', ['a', 'measure', 'the'], 21, 5], ['iv. a measure the'])], [('regression: continuation indent', ['A.1.2', ['ink', 'ink', 'on', 'serif', 'is', 'baseline', 'a', 'on', 'serif'], 16, 2], ['A.1.2 ink ink on', ' serif is', ' baseline a on', ' serif']), ('regression: continuation indent', ['(a)', ['type', 'type', 'kerning', 'ink'], 19, 2], ['(a) type type', ' kerning ink']), ('regression: continuation indent', ['10.', ['kerning', 'grid', 'on', 'at', 'ink', 'on', 'at', 'baseline', 'is'], 14, 2], ['10. kerning', ' grid on at', ' ink on at', ' baseline is']), ('partial-repair probe', ['1.', ['a', 'serif', 'kerning', 'baseline'], 21, 4], ['1. a serif kerning', ' baseline']), ('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', ['Note:', ['type', 'x', 'at'], 16, 3], ['Note: type x at']), ('control layout', ['1.', ['on', 'is'], 18, 5], ['1. on is'])], [('regression: continuation indent', ['(a)', ['x', 'ink', 'at', 'measure', 'the', 'type', 'a', 'is'], 17, 3], ['(a) x ink at', ' measure the', ' type a is']), ('regression: continuation indent', ['(a)', ['grid', 'is', 'of', 'a', 'of', 'on', 'x', 'at'], 22, 2], ['(a) grid is of a of on', ' x at']), ('partial-repair probe', ['1.', ['of', 'ink', 'ink', 'type', 'x', 'baseline', 'is', 'ink'], 17, 4], ['1. of ink ink', ' type x', ' baseline is', ' ink']), ('partial-repair probe', ['iv.', ['serif', 'x', 'kerning', 'ink', 'ink', 'the', 'is'], 15, 5], ['iv. serif x', ' kerning', ' ink ink', ' the is']), ('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', ['1.', ['serif', 'at'], 14, 3], ['1. serif at']), ('control layout', ['A.1.2', ['type', 'x', 'ink'], 18, 2], ['A.1.2 type x ink'])]]
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 overflows hang | ['Note: the type', ' grid is on', ' serif'] | ['Note: the type', ' grid is on', ' serif'] | Failed |
| regression: continuation indent | ['(a) measure the', ' at type the', ' is type of'] | ['(a) measure the', ' at type the', ' is type of'] | Failed |
| regression: continuation indent | ['Note: a serif at ink', ' on of'] | ['Note: a serif at ink', ' on of'] | Failed |
| regression: continuation indent | ['1. on x', ' kerning at', ' the grid is', ' the'] | ['1. on x', ' kerning at', ' the grid is', ' the'] | Failed |
| label exactly one short of hang | ['1. the type', ' grid is', ' on'] | ['1. the type', ' grid is', ' on'] | Passed |
| control layout | ['10. x on kerning'] | ['10. x on kerning'] | Passed |
| control layout | ['A.1.2 the the'] | ['A.1.2 the the'] | Passed |
| control layout | ['1. serif on'] | ['1. serif on'] | Passed |
SHA-256 / b31505897c6fc67654c96872585625d50483e05ab98015e53ab5d987b649cd0c
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 - 1)
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 - 1)
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 overflows hang', ['Note:', ['the', 'type', 'grid', 'is', 'on', 'serif'], 14, 3], ['Note: the type', ' grid is on', ' serif']), ('regression: continuation indent', ['(a)', ['measure', 'the', 'at', 'type', 'the', 'is', 'type', 'of'], 16, 3], ['(a) measure the', ' at type the', ' is type of']), ('regression: continuation indent', ['Note:', ['a', 'serif', 'at', 'ink', 'on', 'of'], 21, 5], ['Note: a serif at ink', ' on of']), ('regression: continuation indent', ['1.', ['on', 'x', 'kerning', 'at', 'the', 'grid', 'is', 'the'], 13, 2], ['1. on x', ' kerning at', ' the grid is', ' the']), ('label exactly one short of hang', ['1.', ['the', 'type', 'grid', 'is', 'on'], 12, 3], ['1. the type', ' grid is', ' on']), ('control layout', ['10.', ['x', 'on', 'kerning'], 21, 2], ['10. x on kerning']), ('control layout', ['A.1.2', ['the', 'the'], 14, 3], ['A.1.2 the the']), ('control layout', ['1.', ['serif', 'on'], 16, 2], ['1. serif on'])], [('regression: continuation indent', ['Note:', ['on', 'at', 'a', 'x', 'baseline', 'x', 'grid'], 18, 3], ['Note: on at a x', ' baseline x grid']), ('regression: continuation indent', ['10.', ['is', 'is', 'x', 'x', 'baseline', 'grid', 'serif', 'the', 'on'], 17, 3], ['10. is is x x', ' baseline grid', ' serif the on']), ('partial-repair probe', ['10.', ['measure', 'at', 'kerning', 'a'], 22, 5], ['10. measure at', ' kerning a']), ('partial-repair probe', ['iv.', ['x', 'a', 'on', 'ink', 'on', 'type', 'a'], 19, 5], ['iv. x a on ink on', ' type a']), ('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.1.2', ['type', 'x', 'ink'], 18, 2], ['A.1.2 type x ink']), ('control layout', ['10.', ['the', 'x', 'the'], 15, 2], ['10. the x the'])], [('regression: continuation indent', ['Note:', ['x', 'of', 'the', 'serif', 'a', 'ink', 'type'], 22, 4], ['Note: x of the serif a', ' ink type']), ('regression: continuation indent', ['(a)', ['measure', 'the', 'at', 'type', 'the', 'is', 'type', 'of'], 16, 3], ['(a) measure the', ' at type the', ' is type of']), ('partial-repair probe', ['1.', ['grid', 'grid', 'type', 'serif', 'baseline', 'is', 'x', 'is'], 13, 3], ['1. grid grid', ' type serif', ' baseline', ' is x is']), ('partial-repair probe', ['iv.', ['type', 'a', 'of', 'of', 'is', 'is', 'baseline', 'kerning'], 13, 4], ['iv. type a of', ' of is is', ' baseline', ' kerning']), ('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', ['A.1.2', ['type', 'measure'], 21, 3], ['A.1.2 type measure']), ('control layout', ['iv.', ['a', 'measure', 'the'], 21, 5], ['iv. a measure the'])], [('regression: continuation indent', ['A.1.2', ['ink', 'ink', 'on', 'serif', 'is', 'baseline', 'a', 'on', 'serif'], 16, 2], ['A.1.2 ink ink on', ' serif is', ' baseline a on', ' serif']), ('regression: continuation indent', ['(a)', ['type', 'type', 'kerning', 'ink'], 19, 2], ['(a) type type', ' kerning ink']), ('regression: continuation indent', ['10.', ['kerning', 'grid', 'on', 'at', 'ink', 'on', 'at', 'baseline', 'is'], 14, 2], ['10. kerning', ' grid on at', ' ink on at', ' baseline is']), ('partial-repair probe', ['1.', ['a', 'serif', 'kerning', 'baseline'], 21, 4], ['1. a serif kerning', ' baseline']), ('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', ['Note:', ['type', 'x', 'at'], 16, 3], ['Note: type x at']), ('control layout', ['1.', ['on', 'is'], 18, 5], ['1. on is'])], [('regression: continuation indent', ['(a)', ['x', 'ink', 'at', 'measure', 'the', 'type', 'a', 'is'], 17, 3], ['(a) x ink at', ' measure the', ' type a is']), ('regression: continuation indent', ['(a)', ['grid', 'is', 'of', 'a', 'of', 'on', 'x', 'at'], 22, 2], ['(a) grid is of a of on', ' x at']), ('partial-repair probe', ['1.', ['of', 'ink', 'ink', 'type', 'x', 'baseline', 'is', 'ink'], 17, 4], ['1. of ink ink', ' type x', ' baseline is', ' ink']), ('partial-repair probe', ['iv.', ['serif', 'x', 'kerning', 'ink', 'ink', 'the', 'is'], 15, 5], ['iv. serif x', ' kerning', ' ink ink', ' the is']), ('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', ['1.', ['serif', 'at'], 14, 3], ['1. serif at']), ('control layout', ['A.1.2', ['type', 'x', 'ink'], 18, 2], ['A.1.2 type x ink'])]]
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 overflows hang | ['Note: the type', ' grid is on', ' serif'] | ['Note: the type', ' grid is on', ' serif'] | Failed |
| regression: continuation indent | ['(a) measure the', ' at type the', ' is type of'] | ['(a) measure the', ' at type the', ' is type of'] | Failed |
| regression: continuation indent | ['Note: a serif at ink', ' on of'] | ['Note: a serif at ink', ' on of'] | Failed |
| regression: continuation indent | ['1. on x', ' kerning at', ' the grid is', ' the'] | ['1. on x', ' kerning at', ' the grid is', ' the'] | Failed |
| label exactly one short of hang | ['1. the type', ' grid is', ' on'] | ['1. the type', ' grid is', ' on'] | Failed |
| control layout | ['10. x on kerning'] | ['10. x on kerning'] | Passed |
| control layout | ['A.1.2 the the'] | ['A.1.2 the the'] | Passed |
| control layout | ['1. serif on'] | ['1. serif on'] | Passed |
SHA-256 / 0dafe93b193dcf13b99736cde44a953fe09333c836c46a8f7469be950bbedf6c
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 overflows hang', ['Note:', ['the', 'type', 'grid', 'is', 'on', 'serif'], 14, 3], ['Note: the type', ' grid is on', ' serif']), ('regression: continuation indent', ['(a)', ['measure', 'the', 'at', 'type', 'the', 'is', 'type', 'of'], 16, 3], ['(a) measure the', ' at type the', ' is type of']), ('regression: continuation indent', ['Note:', ['a', 'serif', 'at', 'ink', 'on', 'of'], 21, 5], ['Note: a serif at ink', ' on of']), ('regression: continuation indent', ['1.', ['on', 'x', 'kerning', 'at', 'the', 'grid', 'is', 'the'], 13, 2], ['1. on x', ' kerning at', ' the grid is', ' the']), ('label exactly one short of hang', ['1.', ['the', 'type', 'grid', 'is', 'on'], 12, 3], ['1. the type', ' grid is', ' on']), ('control layout', ['10.', ['x', 'on', 'kerning'], 21, 2], ['10. x on kerning']), ('control layout', ['A.1.2', ['the', 'the'], 14, 3], ['A.1.2 the the']), ('control layout', ['1.', ['serif', 'on'], 16, 2], ['1. serif on'])], [('regression: continuation indent', ['Note:', ['on', 'at', 'a', 'x', 'baseline', 'x', 'grid'], 18, 3], ['Note: on at a x', ' baseline x grid']), ('regression: continuation indent', ['10.', ['is', 'is', 'x', 'x', 'baseline', 'grid', 'serif', 'the', 'on'], 17, 3], ['10. is is x x', ' baseline grid', ' serif the on']), ('partial-repair probe', ['10.', ['measure', 'at', 'kerning', 'a'], 22, 5], ['10. measure at', ' kerning a']), ('partial-repair probe', ['iv.', ['x', 'a', 'on', 'ink', 'on', 'type', 'a'], 19, 5], ['iv. x a on ink on', ' type a']), ('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.1.2', ['type', 'x', 'ink'], 18, 2], ['A.1.2 type x ink']), ('control layout', ['10.', ['the', 'x', 'the'], 15, 2], ['10. the x the'])], [('regression: continuation indent', ['Note:', ['x', 'of', 'the', 'serif', 'a', 'ink', 'type'], 22, 4], ['Note: x of the serif a', ' ink type']), ('regression: continuation indent', ['(a)', ['measure', 'the', 'at', 'type', 'the', 'is', 'type', 'of'], 16, 3], ['(a) measure the', ' at type the', ' is type of']), ('partial-repair probe', ['1.', ['grid', 'grid', 'type', 'serif', 'baseline', 'is', 'x', 'is'], 13, 3], ['1. grid grid', ' type serif', ' baseline', ' is x is']), ('partial-repair probe', ['iv.', ['type', 'a', 'of', 'of', 'is', 'is', 'baseline', 'kerning'], 13, 4], ['iv. type a of', ' of is is', ' baseline', ' kerning']), ('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', ['A.1.2', ['type', 'measure'], 21, 3], ['A.1.2 type measure']), ('control layout', ['iv.', ['a', 'measure', 'the'], 21, 5], ['iv. a measure the'])], [('regression: continuation indent', ['A.1.2', ['ink', 'ink', 'on', 'serif', 'is', 'baseline', 'a', 'on', 'serif'], 16, 2], ['A.1.2 ink ink on', ' serif is', ' baseline a on', ' serif']), ('regression: continuation indent', ['(a)', ['type', 'type', 'kerning', 'ink'], 19, 2], ['(a) type type', ' kerning ink']), ('regression: continuation indent', ['10.', ['kerning', 'grid', 'on', 'at', 'ink', 'on', 'at', 'baseline', 'is'], 14, 2], ['10. kerning', ' grid on at', ' ink on at', ' baseline is']), ('partial-repair probe', ['1.', ['a', 'serif', 'kerning', 'baseline'], 21, 4], ['1. a serif kerning', ' baseline']), ('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', ['Note:', ['type', 'x', 'at'], 16, 3], ['Note: type x at']), ('control layout', ['1.', ['on', 'is'], 18, 5], ['1. on is'])], [('regression: continuation indent', ['(a)', ['x', 'ink', 'at', 'measure', 'the', 'type', 'a', 'is'], 17, 3], ['(a) x ink at', ' measure the', ' type a is']), ('regression: continuation indent', ['(a)', ['grid', 'is', 'of', 'a', 'of', 'on', 'x', 'at'], 22, 2], ['(a) grid is of a of on', ' x at']), ('partial-repair probe', ['1.', ['of', 'ink', 'ink', 'type', 'x', 'baseline', 'is', 'ink'], 17, 4], ['1. of ink ink', ' type x', ' baseline is', ' ink']), ('partial-repair probe', ['iv.', ['serif', 'x', 'kerning', 'ink', 'ink', 'the', 'is'], 15, 5], ['iv. serif x', ' kerning', ' ink ink', ' the is']), ('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', ['1.', ['serif', 'at'], 14, 3], ['1. serif at']), ('control layout', ['A.1.2', ['type', 'x', 'ink'], 18, 2], ['A.1.2 type x ink'])]]
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 overflows hang | ['Note: the type', ' grid is on', ' serif'] | ['Note: the type', ' grid is on', ' serif'] | Passed |
| regression: continuation indent | ['(a) measure the', ' at type the', ' is type of'] | ['(a) measure the', ' at type the', ' is type of'] | Passed |
| regression: continuation indent | ['Note: a serif at ink', ' on of'] | ['Note: a serif at ink', ' on of'] | Passed |
| regression: continuation indent | ['1. on x', ' kerning at', ' the grid is', ' the'] | ['1. on x', ' kerning at', ' the grid is', ' the'] | Passed |
| label exactly one short of hang | ['1. the type', ' grid is', ' on'] | ['1. the type', ' grid is', ' on'] | Passed |
| control layout | ['10. x on kerning'] | ['10. x on kerning'] | Passed |
| control layout | ['A.1.2 the the'] | ['A.1.2 the the'] | Passed |
| control layout | ['1. serif on'] | ['1. serif on'] | Passed |
SHA-256 / b6edfcd4222ceb73893ca27bce537325239944df29448bdb13ee33adeba442ff
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.245197+00:00.
Case digest / 94a9e9285e92916977ddd5581300d1c91fa73c3173b5b60aecf2cd0f74b26a60