FAILURE MAP
← Case archive

FA-96017 / Postal address normalization / Member archive

Address label line wrapper: repeated spaces become empty words · case 02

"1 FAKE RD" keeps its runs of spaces on the label.

Member previewVariant 2 · 3 implementations · 6 checks per implementation

Case contract

Input [text, width, max_lines]. Words are whitespace-separated. A word longer than width first flushes the current line, then is emitted in width-sized chunks, the final remainder continuing as an ordinary word. Words join with single spaces while the line length stays <= width. Return {"lines": the first max_lines lines, "overflow": whether more than max_lines lines were needed}.

Why this case matters

Label printers and carrier manifests cap line length and line count; an off-by-one silently truncates part of the address.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
repeated spaces collapse{"lines": ["2 FAKE RD"], "overflow": false}{"lines": ["2 FAKE RD"], "overflow": false}Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗