FAILURE MAP
← Case archive

FA-80316 / Typography line breaking / Open access

URL line breaking: after double slash · case 01

No break is offered right after "https://".

Verified by executionVariant 1 · 8 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The double-slash test slices one character, which can never equal "//".

VERIFIED REPAIR

Compare the two characters before the position with "//".

Unsuccessful approach: Slicing the wrong window still misses the position after the pair.

Case contract

Input [url, width]. Break opportunities (no hyphen added): after ":"; after "//" (never between its slashes); before a single "/"; before . - _ ? # % ~; before or after = and &. While the rest exceeds the width, break at the latest opportunity within width characters, else hard-break at width. Return 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):
    url, width = x
    n = len(url)
    ok = set()
    for p in range(1, n):
        a, b = url[p - 1], url[p]
        if a == ':':
            ok.add(p)
        elif a == '/' and url[p - 1:p] == '//':
            ok.add(p)
        elif b == '/' and a != '/' and url[p + 1:p + 2] != '/':
            ok.add(p)
        elif b in '.-_?#%~':
            ok.add(p)
        elif a in '=&' or b in '=&':
            ok.add(p)
    lines = []
    start = 0
    while n - start > width:
        cands = [p for p in ok if start < p <= start + width]
        cut = max(cands) if cands else start + width
        lines.append(url[start:cut])
        start = cut
    lines.append(url[start:])
    return lines
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('break after scheme', ['https://example.com/path/to/page.html', 8], ['https://', 'example', '.com', '/path/to', '/page', '.html']), ('regression: after double slash', ['https://www.docs.io/a/b/c#sec-3', 10], ['https://', 'www.docs', '.io/a/b/c', '#sec-3']), ('regression: after double slash', ['ftp://files.site.net/pub/file-name_v2.tar.gz', 6], ['ftp://', 'files', '.site', '.net', '/pub', '/file', '-name', '_v2', '.tar', '.gz']), ('regression: after double slash', ['https://example.com/path/to/page.html', 12], ['https://', 'example.com', '/path/to', '/page.html']), ('double slash inside path', ['http://a.b.org/x//y?q=1&r=2', 10], ['http://a.b', '.org/x//y', '?q=1&r=2']), ('control layout', ['https://sub.domain.example.co.uk/~user/page', 14], ['https://sub', '.domain', '.example.co.uk', '/~user/page']), ('control layout', ['mailto:someone@example.com', 13], ['mailto:', 'someone@examp', 'le.com']), ('control layout', ['https://t.co/AbCdEf', 12], ['https://t.co', '/AbCdEf'])], [('regression: after double slash', ['https://www.docs.io/a/b/c#sec-3', 8], ['https://', 'www.docs', '.io/a/b', '/c#sec-3']), ('regression: after double slash', ['https://sub.domain.example.co.uk/~user/page', 4], ['http', 's://', 'sub', '.dom', 'ain', '.exa', 'mple', '.co', '.uk/', '~use', 'r', '/pag', 'e']), ('regression: after double slash', ['ftp://files.site.net/pub/file-name_v2.tar.gz', 10], ['ftp://', 'files.site', '.net/pub', '/file-name', '_v2.tar.gz']), ('regression: after double slash', ['ftp://files.site.net/pub/file-name_v2.tar.gz', 6], ['ftp://', 'files', '.site', '.net', '/pub', '/file', '-name', '_v2', '.tar', '.gz']), ('double slash inside path', ['http://a.b.org/x//y?q=1&r=2', 10], ['http://a.b', '.org/x//y', '?q=1&r=2']), ('break after scheme', ['https://example.com/path/to/page.html', 8], ['https://', 'example', '.com', '/path/to', '/page', '.html']), ('control layout', ['file:///usr/local/share/doc', 15], ['file:///usr', '/local/share', '/doc']), ('control layout', ['https://t.co/AbCdEf', 6], ['https:', '//t.co', '/AbCdE', 'f'])], [('regression: after double slash', ['https://sub.domain.example.co.uk/~user/page', 5], ['https', '://', 'sub', '.doma', 'in', '.exam', 'ple', '.co', '.uk/', '~user', '/page']), ('regression: after double slash', ['https://example.com/path/to/page.html', 7], ['https:', '//', 'example', '.com', '/path', '/to', '/page', '.html']), ('regression: after double slash', ['https://example.com/path/to/page.html', 7], ['https:', '//', 'example', '.com', '/path', '/to', '/page', '.html']), ('regression: after double slash', ['ftp://files.site.net/pub/file-name_v2.tar.gz', 5], ['ftp:', '//', 'files', '.site', '.net', '/pub', '/file', '-name', '_v2', '.tar', '.gz']), ('break after scheme', ['https://example.com/path/to/page.html', 8], ['https://', 'example', '.com', '/path/to', '/page', '.html']), ('double slash inside path', ['http://a.b.org/x//y?q=1&r=2', 10], ['http://a.b', '.org/x//y', '?q=1&r=2']), ('control layout', ['http://a.b.org/x//y?q=1&r=2', 4], ['http', '://a', '.b', '.org', '/x//', 'y?q=', '1&r=', '2']), ('control layout', ['https://t.co/AbCdEf', 5], ['https', '://t', '.co', '/AbCd', 'Ef'])], [('regression: after double slash', ['https://t.co/AbCdEf', 4], ['http', 's://', 't.co', '/AbC', 'dEf']), ('regression: after double slash', ['https://sub.domain.example.co.uk/~user/page', 8], ['https://', 'sub', '.domain', '.example', '.co.uk/', '~user', '/page']), ('regression: after double slash', ['ftp://files.site.net/pub/file-name_v2.tar.gz', 8], ['ftp://', 'files', '.site', '.net/pub', '/file', '-name_v2', '.tar.gz']), ('regression: after double slash', ['https://sub.domain.example.co.uk/~user/page', 8], ['https://', 'sub', '.domain', '.example', '.co.uk/', '~user', '/page']), ('double slash inside path', ['http://a.b.org/x//y?q=1&r=2', 10], ['http://a.b', '.org/x//y', '?q=1&r=2']), ('break after scheme', ['https://example.com/path/to/page.html', 8], ['https://', 'example', '.com', '/path/to', '/page', '.html']), ('control layout', ['https://www.docs.io/a/b/c#sec-3', 11], ['https://www', '.docs.io/a', '/b/c#sec-3']), ('control layout', ['https://x.io/search?term=line%20break&lang=en', 15], ['https://x.io', '/search?term=', 'line%20break&', 'lang=en'])], [('regression: after double slash', ['https://sub.domain.example.co.uk/~user/page', 9], ['https://', 'sub', '.domain', '.example', '.co.uk/', '~user', '/page']), ('regression: after double slash', ['https://sub.domain.example.co.uk/~user/page', 5], ['https', '://', 'sub', '.doma', 'in', '.exam', 'ple', '.co', '.uk/', '~user', '/page']), ('regression: after double slash', ['https://example.com/path/to/page.html', 7], ['https:', '//', 'example', '.com', '/path', '/to', '/page', '.html']), ('regression: after double slash', ['https://example.com/path/to/page.html', 7], ['https:', '//', 'example', '.com', '/path', '/to', '/page', '.html']), ('double slash inside path', ['http://a.b.org/x//y?q=1&r=2', 10], ['http://a.b', '.org/x//y', '?q=1&r=2']), ('break after scheme', ['https://example.com/path/to/page.html', 8], ['https://', 'example', '.com', '/path/to', '/page', '.html']), ('control layout', ['file:///usr/local/share/doc', 15], ['file:///usr', '/local/share', '/doc']), ('control layout', ['https://t.co/AbCdEf', 5], ['https', '://t', '.co', '/AbCd', 'Ef'])]]
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 fixtureActualExpectedOutcome
break after scheme['https:', '//exampl', 'e.com', '/path/to', '/page', '.html']['https://', 'example', '.com', '/path/to', '/page', '.html']Failed
regression: after double slash['https:', '//www.docs', '.io/a/b/c', '#sec-3']['https://', 'www.docs', '.io/a/b/c', '#sec-3']Failed
regression: after double slash['ftp:', '//file', 's.site', '.net', '/pub', '/file', '-name', '_v2', '.tar', '.gz']['ftp://', 'files', '.site', '.net', '/pub', '/file', '-name', '_v2', '.tar', '.gz']Failed
regression: after double slash['https:', '//example', '.com/path/to', '/page.html']['https://', 'example.com', '/path/to', '/page.html']Failed
double slash inside path['http://a.b', '.org/x//y', '?q=1&r=2']['http://a.b', '.org/x//y', '?q=1&r=2']Passed
control layout['https://sub', '.domain', '.example.co.uk', '/~user/page']['https://sub', '.domain', '.example.co.uk', '/~user/page']Passed
control layout['mailto:', 'someone@examp', 'le.com']['mailto:', 'someone@examp', 'le.com']Passed
control layout['https://t.co', '/AbCdEf']['https://t.co', '/AbCdEf']Passed

SHA-256 / d64183cc02f95dc8521a0d43d1101167600fff0bbdf3669fd15833660e8eaefd

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    url, width = x
    n = len(url)
    ok = set()
    for p in range(1, n):
        a, b = url[p - 1], url[p]
        if a == ':':
            ok.add(p)
        elif a == '/' and url[p - 3:p - 1] == '//':
            ok.add(p)
        elif b == '/' and a != '/' and url[p + 1:p + 2] != '/':
            ok.add(p)
        elif b in '.-_?#%~':
            ok.add(p)
        elif a in '=&' or b in '=&':
            ok.add(p)
    lines = []
    start = 0
    while n - start > width:
        cands = [p for p in ok if start < p <= start + width]
        cut = max(cands) if cands else start + width
        lines.append(url[start:cut])
        start = cut
    lines.append(url[start:])
    return lines
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('break after scheme', ['https://example.com/path/to/page.html', 8], ['https://', 'example', '.com', '/path/to', '/page', '.html']), ('regression: after double slash', ['https://www.docs.io/a/b/c#sec-3', 10], ['https://', 'www.docs', '.io/a/b/c', '#sec-3']), ('regression: after double slash', ['ftp://files.site.net/pub/file-name_v2.tar.gz', 6], ['ftp://', 'files', '.site', '.net', '/pub', '/file', '-name', '_v2', '.tar', '.gz']), ('regression: after double slash', ['https://example.com/path/to/page.html', 12], ['https://', 'example.com', '/path/to', '/page.html']), ('double slash inside path', ['http://a.b.org/x//y?q=1&r=2', 10], ['http://a.b', '.org/x//y', '?q=1&r=2']), ('control layout', ['https://sub.domain.example.co.uk/~user/page', 14], ['https://sub', '.domain', '.example.co.uk', '/~user/page']), ('control layout', ['mailto:someone@example.com', 13], ['mailto:', 'someone@examp', 'le.com']), ('control layout', ['https://t.co/AbCdEf', 12], ['https://t.co', '/AbCdEf'])], [('regression: after double slash', ['https://www.docs.io/a/b/c#sec-3', 8], ['https://', 'www.docs', '.io/a/b', '/c#sec-3']), ('regression: after double slash', ['https://sub.domain.example.co.uk/~user/page', 4], ['http', 's://', 'sub', '.dom', 'ain', '.exa', 'mple', '.co', '.uk/', '~use', 'r', '/pag', 'e']), ('regression: after double slash', ['ftp://files.site.net/pub/file-name_v2.tar.gz', 10], ['ftp://', 'files.site', '.net/pub', '/file-name', '_v2.tar.gz']), ('regression: after double slash', ['ftp://files.site.net/pub/file-name_v2.tar.gz', 6], ['ftp://', 'files', '.site', '.net', '/pub', '/file', '-name', '_v2', '.tar', '.gz']), ('double slash inside path', ['http://a.b.org/x//y?q=1&r=2', 10], ['http://a.b', '.org/x//y', '?q=1&r=2']), ('break after scheme', ['https://example.com/path/to/page.html', 8], ['https://', 'example', '.com', '/path/to', '/page', '.html']), ('control layout', ['file:///usr/local/share/doc', 15], ['file:///usr', '/local/share', '/doc']), ('control layout', ['https://t.co/AbCdEf', 6], ['https:', '//t.co', '/AbCdE', 'f'])], [('regression: after double slash', ['https://sub.domain.example.co.uk/~user/page', 5], ['https', '://', 'sub', '.doma', 'in', '.exam', 'ple', '.co', '.uk/', '~user', '/page']), ('regression: after double slash', ['https://example.com/path/to/page.html', 7], ['https:', '//', 'example', '.com', '/path', '/to', '/page', '.html']), ('regression: after double slash', ['https://example.com/path/to/page.html', 7], ['https:', '//', 'example', '.com', '/path', '/to', '/page', '.html']), ('regression: after double slash', ['ftp://files.site.net/pub/file-name_v2.tar.gz', 5], ['ftp:', '//', 'files', '.site', '.net', '/pub', '/file', '-name', '_v2', '.tar', '.gz']), ('break after scheme', ['https://example.com/path/to/page.html', 8], ['https://', 'example', '.com', '/path/to', '/page', '.html']), ('double slash inside path', ['http://a.b.org/x//y?q=1&r=2', 10], ['http://a.b', '.org/x//y', '?q=1&r=2']), ('control layout', ['http://a.b.org/x//y?q=1&r=2', 4], ['http', '://a', '.b', '.org', '/x//', 'y?q=', '1&r=', '2']), ('control layout', ['https://t.co/AbCdEf', 5], ['https', '://t', '.co', '/AbCd', 'Ef'])], [('regression: after double slash', ['https://t.co/AbCdEf', 4], ['http', 's://', 't.co', '/AbC', 'dEf']), ('regression: after double slash', ['https://sub.domain.example.co.uk/~user/page', 8], ['https://', 'sub', '.domain', '.example', '.co.uk/', '~user', '/page']), ('regression: after double slash', ['ftp://files.site.net/pub/file-name_v2.tar.gz', 8], ['ftp://', 'files', '.site', '.net/pub', '/file', '-name_v2', '.tar.gz']), ('regression: after double slash', ['https://sub.domain.example.co.uk/~user/page', 8], ['https://', 'sub', '.domain', '.example', '.co.uk/', '~user', '/page']), ('double slash inside path', ['http://a.b.org/x//y?q=1&r=2', 10], ['http://a.b', '.org/x//y', '?q=1&r=2']), ('break after scheme', ['https://example.com/path/to/page.html', 8], ['https://', 'example', '.com', '/path/to', '/page', '.html']), ('control layout', ['https://www.docs.io/a/b/c#sec-3', 11], ['https://www', '.docs.io/a', '/b/c#sec-3']), ('control layout', ['https://x.io/search?term=line%20break&lang=en', 15], ['https://x.io', '/search?term=', 'line%20break&', 'lang=en'])], [('regression: after double slash', ['https://sub.domain.example.co.uk/~user/page', 9], ['https://', 'sub', '.domain', '.example', '.co.uk/', '~user', '/page']), ('regression: after double slash', ['https://sub.domain.example.co.uk/~user/page', 5], ['https', '://', 'sub', '.doma', 'in', '.exam', 'ple', '.co', '.uk/', '~user', '/page']), ('regression: after double slash', ['https://example.com/path/to/page.html', 7], ['https:', '//', 'example', '.com', '/path', '/to', '/page', '.html']), ('regression: after double slash', ['https://example.com/path/to/page.html', 7], ['https:', '//', 'example', '.com', '/path', '/to', '/page', '.html']), ('double slash inside path', ['http://a.b.org/x//y?q=1&r=2', 10], ['http://a.b', '.org/x//y', '?q=1&r=2']), ('break after scheme', ['https://example.com/path/to/page.html', 8], ['https://', 'example', '.com', '/path/to', '/page', '.html']), ('control layout', ['file:///usr/local/share/doc', 15], ['file:///usr', '/local/share', '/doc']), ('control layout', ['https://t.co/AbCdEf', 5], ['https', '://t', '.co', '/AbCd', 'Ef'])]]
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 fixtureActualExpectedOutcome
break after scheme['https:', '//exampl', 'e.com', '/path/to', '/page', '.html']['https://', 'example', '.com', '/path/to', '/page', '.html']Failed
regression: after double slash['https:', '//www.docs', '.io/a/b/c', '#sec-3']['https://', 'www.docs', '.io/a/b/c', '#sec-3']Failed
regression: after double slash['ftp:', '//file', 's.site', '.net', '/pub', '/file', '-name', '_v2', '.tar', '.gz']['ftp://', 'files', '.site', '.net', '/pub', '/file', '-name', '_v2', '.tar', '.gz']Failed
regression: after double slash['https:', '//example', '.com/path/to', '/page.html']['https://', 'example.com', '/path/to', '/page.html']Failed
double slash inside path['http://a.b', '.org/x//y', '?q=1&r=2']['http://a.b', '.org/x//y', '?q=1&r=2']Passed
control layout['https://sub', '.domain', '.example.co.uk', '/~user/page']['https://sub', '.domain', '.example.co.uk', '/~user/page']Passed
control layout['mailto:', 'someone@examp', 'le.com']['mailto:', 'someone@examp', 'le.com']Passed
control layout['https://t.co', '/AbCdEf']['https://t.co', '/AbCdEf']Passed

SHA-256 / 02871b9924fd4e3646767bbb1f419dbdac854075abc6b08857d65171e53c010c

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(x):
    url, width = x
    n = len(url)
    ok = set()
    for p in range(1, n):
        a, b = url[p - 1], url[p]
        if a == ':':
            ok.add(p)
        elif a == '/' and url[p - 2:p] == '//':
            ok.add(p)
        elif b == '/' and a != '/' and url[p + 1:p + 2] != '/':
            ok.add(p)
        elif b in '.-_?#%~':
            ok.add(p)
        elif a in '=&' or b in '=&':
            ok.add(p)
    lines = []
    start = 0
    while n - start > width:
        cands = [p for p in ok if start < p <= start + width]
        cut = max(cands) if cands else start + width
        lines.append(url[start:cut])
        start = cut
    lines.append(url[start:])
    return lines
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[('break after scheme', ['https://example.com/path/to/page.html', 8], ['https://', 'example', '.com', '/path/to', '/page', '.html']), ('regression: after double slash', ['https://www.docs.io/a/b/c#sec-3', 10], ['https://', 'www.docs', '.io/a/b/c', '#sec-3']), ('regression: after double slash', ['ftp://files.site.net/pub/file-name_v2.tar.gz', 6], ['ftp://', 'files', '.site', '.net', '/pub', '/file', '-name', '_v2', '.tar', '.gz']), ('regression: after double slash', ['https://example.com/path/to/page.html', 12], ['https://', 'example.com', '/path/to', '/page.html']), ('double slash inside path', ['http://a.b.org/x//y?q=1&r=2', 10], ['http://a.b', '.org/x//y', '?q=1&r=2']), ('control layout', ['https://sub.domain.example.co.uk/~user/page', 14], ['https://sub', '.domain', '.example.co.uk', '/~user/page']), ('control layout', ['mailto:someone@example.com', 13], ['mailto:', 'someone@examp', 'le.com']), ('control layout', ['https://t.co/AbCdEf', 12], ['https://t.co', '/AbCdEf'])], [('regression: after double slash', ['https://www.docs.io/a/b/c#sec-3', 8], ['https://', 'www.docs', '.io/a/b', '/c#sec-3']), ('regression: after double slash', ['https://sub.domain.example.co.uk/~user/page', 4], ['http', 's://', 'sub', '.dom', 'ain', '.exa', 'mple', '.co', '.uk/', '~use', 'r', '/pag', 'e']), ('regression: after double slash', ['ftp://files.site.net/pub/file-name_v2.tar.gz', 10], ['ftp://', 'files.site', '.net/pub', '/file-name', '_v2.tar.gz']), ('regression: after double slash', ['ftp://files.site.net/pub/file-name_v2.tar.gz', 6], ['ftp://', 'files', '.site', '.net', '/pub', '/file', '-name', '_v2', '.tar', '.gz']), ('double slash inside path', ['http://a.b.org/x//y?q=1&r=2', 10], ['http://a.b', '.org/x//y', '?q=1&r=2']), ('break after scheme', ['https://example.com/path/to/page.html', 8], ['https://', 'example', '.com', '/path/to', '/page', '.html']), ('control layout', ['file:///usr/local/share/doc', 15], ['file:///usr', '/local/share', '/doc']), ('control layout', ['https://t.co/AbCdEf', 6], ['https:', '//t.co', '/AbCdE', 'f'])], [('regression: after double slash', ['https://sub.domain.example.co.uk/~user/page', 5], ['https', '://', 'sub', '.doma', 'in', '.exam', 'ple', '.co', '.uk/', '~user', '/page']), ('regression: after double slash', ['https://example.com/path/to/page.html', 7], ['https:', '//', 'example', '.com', '/path', '/to', '/page', '.html']), ('regression: after double slash', ['https://example.com/path/to/page.html', 7], ['https:', '//', 'example', '.com', '/path', '/to', '/page', '.html']), ('regression: after double slash', ['ftp://files.site.net/pub/file-name_v2.tar.gz', 5], ['ftp:', '//', 'files', '.site', '.net', '/pub', '/file', '-name', '_v2', '.tar', '.gz']), ('break after scheme', ['https://example.com/path/to/page.html', 8], ['https://', 'example', '.com', '/path/to', '/page', '.html']), ('double slash inside path', ['http://a.b.org/x//y?q=1&r=2', 10], ['http://a.b', '.org/x//y', '?q=1&r=2']), ('control layout', ['http://a.b.org/x//y?q=1&r=2', 4], ['http', '://a', '.b', '.org', '/x//', 'y?q=', '1&r=', '2']), ('control layout', ['https://t.co/AbCdEf', 5], ['https', '://t', '.co', '/AbCd', 'Ef'])], [('regression: after double slash', ['https://t.co/AbCdEf', 4], ['http', 's://', 't.co', '/AbC', 'dEf']), ('regression: after double slash', ['https://sub.domain.example.co.uk/~user/page', 8], ['https://', 'sub', '.domain', '.example', '.co.uk/', '~user', '/page']), ('regression: after double slash', ['ftp://files.site.net/pub/file-name_v2.tar.gz', 8], ['ftp://', 'files', '.site', '.net/pub', '/file', '-name_v2', '.tar.gz']), ('regression: after double slash', ['https://sub.domain.example.co.uk/~user/page', 8], ['https://', 'sub', '.domain', '.example', '.co.uk/', '~user', '/page']), ('double slash inside path', ['http://a.b.org/x//y?q=1&r=2', 10], ['http://a.b', '.org/x//y', '?q=1&r=2']), ('break after scheme', ['https://example.com/path/to/page.html', 8], ['https://', 'example', '.com', '/path/to', '/page', '.html']), ('control layout', ['https://www.docs.io/a/b/c#sec-3', 11], ['https://www', '.docs.io/a', '/b/c#sec-3']), ('control layout', ['https://x.io/search?term=line%20break&lang=en', 15], ['https://x.io', '/search?term=', 'line%20break&', 'lang=en'])], [('regression: after double slash', ['https://sub.domain.example.co.uk/~user/page', 9], ['https://', 'sub', '.domain', '.example', '.co.uk/', '~user', '/page']), ('regression: after double slash', ['https://sub.domain.example.co.uk/~user/page', 5], ['https', '://', 'sub', '.doma', 'in', '.exam', 'ple', '.co', '.uk/', '~user', '/page']), ('regression: after double slash', ['https://example.com/path/to/page.html', 7], ['https:', '//', 'example', '.com', '/path', '/to', '/page', '.html']), ('regression: after double slash', ['https://example.com/path/to/page.html', 7], ['https:', '//', 'example', '.com', '/path', '/to', '/page', '.html']), ('double slash inside path', ['http://a.b.org/x//y?q=1&r=2', 10], ['http://a.b', '.org/x//y', '?q=1&r=2']), ('break after scheme', ['https://example.com/path/to/page.html', 8], ['https://', 'example', '.com', '/path/to', '/page', '.html']), ('control layout', ['file:///usr/local/share/doc', 15], ['file:///usr', '/local/share', '/doc']), ('control layout', ['https://t.co/AbCdEf', 5], ['https', '://t', '.co', '/AbCd', 'Ef'])]]
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 fixtureActualExpectedOutcome
break after scheme['https://', 'example', '.com', '/path/to', '/page', '.html']['https://', 'example', '.com', '/path/to', '/page', '.html']Passed
regression: after double slash['https://', 'www.docs', '.io/a/b/c', '#sec-3']['https://', 'www.docs', '.io/a/b/c', '#sec-3']Passed
regression: after double slash['ftp://', 'files', '.site', '.net', '/pub', '/file', '-name', '_v2', '.tar', '.gz']['ftp://', 'files', '.site', '.net', '/pub', '/file', '-name', '_v2', '.tar', '.gz']Passed
regression: after double slash['https://', 'example.com', '/path/to', '/page.html']['https://', 'example.com', '/path/to', '/page.html']Passed
double slash inside path['http://a.b', '.org/x//y', '?q=1&r=2']['http://a.b', '.org/x//y', '?q=1&r=2']Passed
control layout['https://sub', '.domain', '.example.co.uk', '/~user/page']['https://sub', '.domain', '.example.co.uk', '/~user/page']Passed
control layout['mailto:', 'someone@examp', 'le.com']['mailto:', 'someone@examp', 'le.com']Passed
control layout['https://t.co', '/AbCdEf']['https://t.co', '/AbCdEf']Passed

SHA-256 / 81b2bf8b4fc3fa03d41eaf15b597291c043a321aab6c4ff1fe3f7b66bce13f9c

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.847646+00:00.

Case digest / 2d0d72466c4ef23fd5e007c8c5c1aff5be6a1d3a7cc186aa3e0c22394aaf3bd7