FAILURE MAP
← Case archive

FA-96236 / Postal address normalization / Open access

Country address template renderer: empty lines are printed · case 01

A label without a name starts with a blank line.

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

ROOT CAUSE

Every rendered line is appended, even when empty.

THE FAILURE

Every rendered line is appended, even when empty.

Unsuccessful approach: Dropping lines of one character or less also removes a legitimate one-letter name.

Case contract

Input fields name, street, city, region, postal, country (destination) and origin. Toy templates: AA "{city} {region} {postal}", BB "{postal} {city}", CC city and postal on separate lines with the city uppercased; unknown destinations use AA. Each rendered line is whitespace-collapsed and empty lines are dropped. When origin differs from destination the destination name (or its code when unknown) is appended.

Why this case matters

Cross-border labels must follow the destination order; misplaced or doubled components delay or return shipments.

1 / The failure

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

N = 1
observations = []
def solve(x):
    T = {'AA': ['{name}', '{street}', '{city} {region} {postal}'], 'BB': ['{name}', '{street}', '{postal} {city}'],
         'CC': ['{name}', '{street}', '{city}', '{postal}']}
    NAMES = {'AA': 'AALANDIA', 'BB': 'BEEMARK', 'CC': 'CEELAND'}
    dest = x['country']
    fields = dict(x)
    if dest == 'CC':
        fields['city'] = fields['city'].upper()
    lines = []
    for tpl in T.get(dest, T['AA']):
        line = ' '.join(tpl.format(**fields).split())
        lines.append(line)
    if x['origin'] != dest:
        lines.append(NAMES.get(dest, dest))
    return lines
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['domestic three-part last line', {'name': 'Pat Example', 'street': '4 Fake Rd', 'city': 'Faketown', 'region': 'ZZ', 'postal': '11345', 'country': 'AA', 'origin': 'AA'}, ['Pat Example', '4 Fake Rd', 'Faketown ZZ 11345']], ['missing region collapses spacing', {'name': 'Pat Example', 'street': '4 Fake Rd', 'city': 'Faketown', 'region': '', 'postal': '11345', 'country': 'AA', 'origin': 'AA'}, ['Pat Example', '4 Fake Rd', 'Faketown 11345']], ['only a postal code on the last line', {'name': 'Pat Example', 'street': '4 Fake Rd', 'city': '', 'region': '', 'postal': '11345', 'country': 'AA', 'origin': 'AA'}, ['Pat Example', '4 Fake Rd', '11345']], ['postal code first, international', {'name': 'Pat Example', 'street': '4 Fake Rd', 'city': 'Faketown', 'region': '', 'postal': '1234', 'country': 'BB', 'origin': 'AA'}, ['Pat Example', '4 Fake Rd', '1234 Faketown', 'BEEMARK']], ['uppercase city on its own line', {'name': 'Pat Example', 'street': '4 Fake Rd', 'city': 'Faketown', 'region': '', 'postal': '11345', 'country': 'CC', 'origin': 'BB'}, ['Pat Example', '4 Fake Rd', 'FAKETOWN', '11345', 'CEELAND']], ['unknown destination falls back', {'name': 'Pat Example', 'street': '4 Fake Rd', 'city': 'Faketown', 'region': 'ZZ', 'postal': '11345', 'country': 'DD', 'origin': 'AA'}, ['Pat Example', '4 Fake Rd', 'Faketown ZZ 11345', 'DD']], ['empty name line dropped', {'name': '', 'street': '4 Fake Rd', 'city': 'Faketown', 'region': 'ZZ', 'postal': '11345', 'country': 'AA', 'origin': 'AA'}, ['4 Fake Rd', 'Faketown ZZ 11345']], ['one-letter name kept', {'name': 'Q', 'street': '4 Fake Rd', 'city': 'Faketown', 'region': 'ZZ', 'postal': '11345', 'country': 'AA', 'origin': 'AA'}, ['Q', '4 Fake Rd', 'Faketown ZZ 11345']]], [['domestic three-part last line', {'name': 'Lee Sample', 'street': '5 Fake Rd', 'city': 'Nowhereville', 'region': 'ZZ', 'postal': '12345', 'country': 'AA', 'origin': 'AA'}, ['Lee Sample', '5 Fake Rd', 'Nowhereville ZZ 12345']], ['missing region collapses spacing', {'name': 'Lee Sample', 'street': '5 Fake Rd', 'city': 'Nowhereville', 'region': '', 'postal': '12345', 'country': 'AA', 'origin': 'AA'}, ['Lee Sample', '5 Fake Rd', 'Nowhereville 12345']], ['only a postal code on the last line', {'name': 'Lee Sample', 'street': '5 Fake Rd', 'city': '', 'region': '', 'postal': '12345', 'country': 'AA', 'origin': 'AA'}, ['Lee Sample', '5 Fake Rd', '12345']], ['postal code first, international', {'name': 'Lee Sample', 'street': '5 Fake Rd', 'city': 'Nowhereville', 'region': '', 'postal': '2234', 'country': 'BB', 'origin': 'AA'}, ['Lee Sample', '5 Fake Rd', '2234 Nowhereville', 'BEEMARK']], ['uppercase city on its own line', {'name': 'Lee Sample', 'street': '5 Fake Rd', 'city': 'Nowhereville', 'region': '', 'postal': '12345', 'country': 'CC', 'origin': 'BB'}, ['Lee Sample', '5 Fake Rd', 'NOWHEREVILLE', '12345', 'CEELAND']], ['unknown destination falls back', {'name': 'Lee Sample', 'street': '5 Fake Rd', 'city': 'Nowhereville', 'region': 'ZZ', 'postal': '12345', 'country': 'DD', 'origin': 'AA'}, ['Lee Sample', '5 Fake Rd', 'Nowhereville ZZ 12345', 'DD']], ['empty name line dropped', {'name': '', 'street': '5 Fake Rd', 'city': 'Nowhereville', 'region': 'ZZ', 'postal': '12345', 'country': 'AA', 'origin': 'AA'}, ['5 Fake Rd', 'Nowhereville ZZ 12345']], ['one-letter name kept', {'name': 'Q', 'street': '5 Fake Rd', 'city': 'Nowhereville', 'region': 'ZZ', 'postal': '12345', 'country': 'AA', 'origin': 'AA'}, ['Q', '5 Fake Rd', 'Nowhereville ZZ 12345']]], [['domestic three-part last line', {'name': 'Robin Placeholder', 'street': '6 Fake Rd', 'city': 'Zorbleton', 'region': 'ZZ', 'postal': '13345', 'country': 'AA', 'origin': 'AA'}, ['Robin Placeholder', '6 Fake Rd', 'Zorbleton ZZ 13345']], ['missing region collapses spacing', {'name': 'Robin Placeholder', 'street': '6 Fake Rd', 'city': 'Zorbleton', 'region': '', 'postal': '13345', 'country': 'AA', 'origin': 'AA'}, ['Robin Placeholder', '6 Fake Rd', 'Zorbleton 13345']], ['only a postal code on the last line', {'name': 'Robin Placeholder', 'street': '6 Fake Rd', 'city': '', 'region': '', 'postal': '13345', 'country': 'AA', 'origin': 'AA'}, ['Robin Placeholder', '6 Fake Rd', '13345']], ['postal code first, international', {'name': 'Robin Placeholder', 'street': '6 Fake Rd', 'city': 'Zorbleton', 'region': '', 'postal': '3234', 'country': 'BB', 'origin': 'AA'}, ['Robin Placeholder', '6 Fake Rd', '3234 Zorbleton', 'BEEMARK']], ['uppercase city on its own line', {'name': 'Robin Placeholder', 'street': '6 Fake Rd', 'city': 'Zorbleton', 'region': '', 'postal': '13345', 'country': 'CC', 'origin': 'BB'}, ['Robin Placeholder', '6 Fake Rd', 'ZORBLETON', '13345', 'CEELAND']], ['unknown destination falls back', {'name': 'Robin Placeholder', 'street': '6 Fake Rd', 'city': 'Zorbleton', 'region': 'ZZ', 'postal': '13345', 'country': 'DD', 'origin': 'AA'}, ['Robin Placeholder', '6 Fake Rd', 'Zorbleton ZZ 13345', 'DD']], ['empty name line dropped', {'name': '', 'street': '6 Fake Rd', 'city': 'Zorbleton', 'region': 'ZZ', 'postal': '13345', 'country': 'AA', 'origin': 'AA'}, ['6 Fake Rd', 'Zorbleton ZZ 13345']], ['one-letter name kept', {'name': 'Q', 'street': '6 Fake Rd', 'city': 'Zorbleton', 'region': 'ZZ', 'postal': '13345', 'country': 'AA', 'origin': 'AA'}, ['Q', '6 Fake Rd', 'Zorbleton ZZ 13345']]], [['domestic three-part last line', {'name': 'Sam Demo', 'street': '7 Fake Rd', 'city': 'Quillby', 'region': 'ZZ', 'postal': '14345', 'country': 'AA', 'origin': 'AA'}, ['Sam Demo', '7 Fake Rd', 'Quillby ZZ 14345']], ['missing region collapses spacing', {'name': 'Sam Demo', 'street': '7 Fake Rd', 'city': 'Quillby', 'region': '', 'postal': '14345', 'country': 'AA', 'origin': 'AA'}, ['Sam Demo', '7 Fake Rd', 'Quillby 14345']], ['only a postal code on the last line', {'name': 'Sam Demo', 'street': '7 Fake Rd', 'city': '', 'region': '', 'postal': '14345', 'country': 'AA', 'origin': 'AA'}, ['Sam Demo', '7 Fake Rd', '14345']], ['postal code first, international', {'name': 'Sam Demo', 'street': '7 Fake Rd', 'city': 'Quillby', 'region': '', 'postal': '4234', 'country': 'BB', 'origin': 'AA'}, ['Sam Demo', '7 Fake Rd', '4234 Quillby', 'BEEMARK']], ['uppercase city on its own line', {'name': 'Sam Demo', 'street': '7 Fake Rd', 'city': 'Quillby', 'region': '', 'postal': '14345', 'country': 'CC', 'origin': 'BB'}, ['Sam Demo', '7 Fake Rd', 'QUILLBY', '14345', 'CEELAND']], ['unknown destination falls back', {'name': 'Sam Demo', 'street': '7 Fake Rd', 'city': 'Quillby', 'region': 'ZZ', 'postal': '14345', 'country': 'DD', 'origin': 'AA'}, ['Sam Demo', '7 Fake Rd', 'Quillby ZZ 14345', 'DD']], ['empty name line dropped', {'name': '', 'street': '7 Fake Rd', 'city': 'Quillby', 'region': 'ZZ', 'postal': '14345', 'country': 'AA', 'origin': 'AA'}, ['7 Fake Rd', 'Quillby ZZ 14345']], ['one-letter name kept', {'name': 'Q', 'street': '7 Fake Rd', 'city': 'Quillby', 'region': 'ZZ', 'postal': '14345', 'country': 'AA', 'origin': 'AA'}, ['Q', '7 Fake Rd', 'Quillby ZZ 14345']]], [['domestic three-part last line', {'name': 'Alex Fiction', 'street': '8 Fake Rd', 'city': 'Spraxham', 'region': 'ZZ', 'postal': '15345', 'country': 'AA', 'origin': 'AA'}, ['Alex Fiction', '8 Fake Rd', 'Spraxham ZZ 15345']], ['missing region collapses spacing', {'name': 'Alex Fiction', 'street': '8 Fake Rd', 'city': 'Spraxham', 'region': '', 'postal': '15345', 'country': 'AA', 'origin': 'AA'}, ['Alex Fiction', '8 Fake Rd', 'Spraxham 15345']], ['only a postal code on the last line', {'name': 'Alex Fiction', 'street': '8 Fake Rd', 'city': '', 'region': '', 'postal': '15345', 'country': 'AA', 'origin': 'AA'}, ['Alex Fiction', '8 Fake Rd', '15345']], ['postal code first, international', {'name': 'Alex Fiction', 'street': '8 Fake Rd', 'city': 'Spraxham', 'region': '', 'postal': '5234', 'country': 'BB', 'origin': 'AA'}, ['Alex Fiction', '8 Fake Rd', '5234 Spraxham', 'BEEMARK']], ['uppercase city on its own line', {'name': 'Alex Fiction', 'street': '8 Fake Rd', 'city': 'Spraxham', 'region': '', 'postal': '15345', 'country': 'CC', 'origin': 'BB'}, ['Alex Fiction', '8 Fake Rd', 'SPRAXHAM', '15345', 'CEELAND']], ['unknown destination falls back', {'name': 'Alex Fiction', 'street': '8 Fake Rd', 'city': 'Spraxham', 'region': 'ZZ', 'postal': '15345', 'country': 'DD', 'origin': 'AA'}, ['Alex Fiction', '8 Fake Rd', 'Spraxham ZZ 15345', 'DD']], ['empty name line dropped', {'name': '', 'street': '8 Fake Rd', 'city': 'Spraxham', 'region': 'ZZ', 'postal': '15345', 'country': 'AA', 'origin': 'AA'}, ['8 Fake Rd', 'Spraxham ZZ 15345']], ['one-letter name kept', {'name': 'Q', 'street': '8 Fake Rd', 'city': 'Spraxham', 'region': 'ZZ', 'postal': '15345', 'country': 'AA', 'origin': 'AA'}, ['Q', '8 Fake Rd', 'Spraxham ZZ 15345']]]]
for label, arg, expected in fixtures[N - 1]:
    check(label, solve(arg), 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
domestic three-part last line['Pat Example', '4 Fake Rd', 'Faketown ZZ 11345']['Pat Example', '4 Fake Rd', 'Faketown ZZ 11345']Passed
missing region collapses spacing['Pat Example', '4 Fake Rd', 'Faketown 11345']['Pat Example', '4 Fake Rd', 'Faketown 11345']Passed
only a postal code on the last line['Pat Example', '4 Fake Rd', '11345']['Pat Example', '4 Fake Rd', '11345']Passed
postal code first, international['Pat Example', '4 Fake Rd', '1234 Faketown', 'BEEMARK']['Pat Example', '4 Fake Rd', '1234 Faketown', 'BEEMARK']Passed
uppercase city on its own line['Pat Example', '4 Fake Rd', 'FAKETOWN', '11345', 'CEELAND']['Pat Example', '4 Fake Rd', 'FAKETOWN', '11345', 'CEELAND']Passed
unknown destination falls back['Pat Example', '4 Fake Rd', 'Faketown ZZ 11345', 'DD']['Pat Example', '4 Fake Rd', 'Faketown ZZ 11345', 'DD']Passed
empty name line dropped['', '4 Fake Rd', 'Faketown ZZ 11345']['4 Fake Rd', 'Faketown ZZ 11345']Failed
one-letter name kept['Q', '4 Fake Rd', 'Faketown ZZ 11345']['Q', '4 Fake Rd', 'Faketown ZZ 11345']Passed

SHA-256 / ac651e349f19c4bc328be3767b1d4d75ec45f1fe4dca9e288c554dc813299442

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(x):
    T = {'AA': ['{name}', '{street}', '{city} {region} {postal}'], 'BB': ['{name}', '{street}', '{postal} {city}'],
         'CC': ['{name}', '{street}', '{city}', '{postal}']}
    NAMES = {'AA': 'AALANDIA', 'BB': 'BEEMARK', 'CC': 'CEELAND'}
    dest = x['country']
    fields = dict(x)
    if dest == 'CC':
        fields['city'] = fields['city'].upper()
    lines = []
    for tpl in T.get(dest, T['AA']):
        line = ' '.join(tpl.format(**fields).split())
        if len(line) > 1:
            lines.append(line)
    if x['origin'] != dest:
        lines.append(NAMES.get(dest, dest))
    return lines
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = [[['domestic three-part last line', {'name': 'Pat Example', 'street': '4 Fake Rd', 'city': 'Faketown', 'region': 'ZZ', 'postal': '11345', 'country': 'AA', 'origin': 'AA'}, ['Pat Example', '4 Fake Rd', 'Faketown ZZ 11345']], ['missing region collapses spacing', {'name': 'Pat Example', 'street': '4 Fake Rd', 'city': 'Faketown', 'region': '', 'postal': '11345', 'country': 'AA', 'origin': 'AA'}, ['Pat Example', '4 Fake Rd', 'Faketown 11345']], ['only a postal code on the last line', {'name': 'Pat Example', 'street': '4 Fake Rd', 'city': '', 'region': '', 'postal': '11345', 'country': 'AA', 'origin': 'AA'}, ['Pat Example', '4 Fake Rd', '11345']], ['postal code first, international', {'name': 'Pat Example', 'street': '4 Fake Rd', 'city': 'Faketown', 'region': '', 'postal': '1234', 'country': 'BB', 'origin': 'AA'}, ['Pat Example', '4 Fake Rd', '1234 Faketown', 'BEEMARK']], ['uppercase city on its own line', {'name': 'Pat Example', 'street': '4 Fake Rd', 'city': 'Faketown', 'region': '', 'postal': '11345', 'country': 'CC', 'origin': 'BB'}, ['Pat Example', '4 Fake Rd', 'FAKETOWN', '11345', 'CEELAND']], ['unknown destination falls back', {'name': 'Pat Example', 'street': '4 Fake Rd', 'city': 'Faketown', 'region': 'ZZ', 'postal': '11345', 'country': 'DD', 'origin': 'AA'}, ['Pat Example', '4 Fake Rd', 'Faketown ZZ 11345', 'DD']], ['empty name line dropped', {'name': '', 'street': '4 Fake Rd', 'city': 'Faketown', 'region': 'ZZ', 'postal': '11345', 'country': 'AA', 'origin': 'AA'}, ['4 Fake Rd', 'Faketown ZZ 11345']], ['one-letter name kept', {'name': 'Q', 'street': '4 Fake Rd', 'city': 'Faketown', 'region': 'ZZ', 'postal': '11345', 'country': 'AA', 'origin': 'AA'}, ['Q', '4 Fake Rd', 'Faketown ZZ 11345']]], [['domestic three-part last line', {'name': 'Lee Sample', 'street': '5 Fake Rd', 'city': 'Nowhereville', 'region': 'ZZ', 'postal': '12345', 'country': 'AA', 'origin': 'AA'}, ['Lee Sample', '5 Fake Rd', 'Nowhereville ZZ 12345']], ['missing region collapses spacing', {'name': 'Lee Sample', 'street': '5 Fake Rd', 'city': 'Nowhereville', 'region': '', 'postal': '12345', 'country': 'AA', 'origin': 'AA'}, ['Lee Sample', '5 Fake Rd', 'Nowhereville 12345']], ['only a postal code on the last line', {'name': 'Lee Sample', 'street': '5 Fake Rd', 'city': '', 'region': '', 'postal': '12345', 'country': 'AA', 'origin': 'AA'}, ['Lee Sample', '5 Fake Rd', '12345']], ['postal code first, international', {'name': 'Lee Sample', 'street': '5 Fake Rd', 'city': 'Nowhereville', 'region': '', 'postal': '2234', 'country': 'BB', 'origin': 'AA'}, ['Lee Sample', '5 Fake Rd', '2234 Nowhereville', 'BEEMARK']], ['uppercase city on its own line', {'name': 'Lee Sample', 'street': '5 Fake Rd', 'city': 'Nowhereville', 'region': '', 'postal': '12345', 'country': 'CC', 'origin': 'BB'}, ['Lee Sample', '5 Fake Rd', 'NOWHEREVILLE', '12345', 'CEELAND']], ['unknown destination falls back', {'name': 'Lee Sample', 'street': '5 Fake Rd', 'city': 'Nowhereville', 'region': 'ZZ', 'postal': '12345', 'country': 'DD', 'origin': 'AA'}, ['Lee Sample', '5 Fake Rd', 'Nowhereville ZZ 12345', 'DD']], ['empty name line dropped', {'name': '', 'street': '5 Fake Rd', 'city': 'Nowhereville', 'region': 'ZZ', 'postal': '12345', 'country': 'AA', 'origin': 'AA'}, ['5 Fake Rd', 'Nowhereville ZZ 12345']], ['one-letter name kept', {'name': 'Q', 'street': '5 Fake Rd', 'city': 'Nowhereville', 'region': 'ZZ', 'postal': '12345', 'country': 'AA', 'origin': 'AA'}, ['Q', '5 Fake Rd', 'Nowhereville ZZ 12345']]], [['domestic three-part last line', {'name': 'Robin Placeholder', 'street': '6 Fake Rd', 'city': 'Zorbleton', 'region': 'ZZ', 'postal': '13345', 'country': 'AA', 'origin': 'AA'}, ['Robin Placeholder', '6 Fake Rd', 'Zorbleton ZZ 13345']], ['missing region collapses spacing', {'name': 'Robin Placeholder', 'street': '6 Fake Rd', 'city': 'Zorbleton', 'region': '', 'postal': '13345', 'country': 'AA', 'origin': 'AA'}, ['Robin Placeholder', '6 Fake Rd', 'Zorbleton 13345']], ['only a postal code on the last line', {'name': 'Robin Placeholder', 'street': '6 Fake Rd', 'city': '', 'region': '', 'postal': '13345', 'country': 'AA', 'origin': 'AA'}, ['Robin Placeholder', '6 Fake Rd', '13345']], ['postal code first, international', {'name': 'Robin Placeholder', 'street': '6 Fake Rd', 'city': 'Zorbleton', 'region': '', 'postal': '3234', 'country': 'BB', 'origin': 'AA'}, ['Robin Placeholder', '6 Fake Rd', '3234 Zorbleton', 'BEEMARK']], ['uppercase city on its own line', {'name': 'Robin Placeholder', 'street': '6 Fake Rd', 'city': 'Zorbleton', 'region': '', 'postal': '13345', 'country': 'CC', 'origin': 'BB'}, ['Robin Placeholder', '6 Fake Rd', 'ZORBLETON', '13345', 'CEELAND']], ['unknown destination falls back', {'name': 'Robin Placeholder', 'street': '6 Fake Rd', 'city': 'Zorbleton', 'region': 'ZZ', 'postal': '13345', 'country': 'DD', 'origin': 'AA'}, ['Robin Placeholder', '6 Fake Rd', 'Zorbleton ZZ 13345', 'DD']], ['empty name line dropped', {'name': '', 'street': '6 Fake Rd', 'city': 'Zorbleton', 'region': 'ZZ', 'postal': '13345', 'country': 'AA', 'origin': 'AA'}, ['6 Fake Rd', 'Zorbleton ZZ 13345']], ['one-letter name kept', {'name': 'Q', 'street': '6 Fake Rd', 'city': 'Zorbleton', 'region': 'ZZ', 'postal': '13345', 'country': 'AA', 'origin': 'AA'}, ['Q', '6 Fake Rd', 'Zorbleton ZZ 13345']]], [['domestic three-part last line', {'name': 'Sam Demo', 'street': '7 Fake Rd', 'city': 'Quillby', 'region': 'ZZ', 'postal': '14345', 'country': 'AA', 'origin': 'AA'}, ['Sam Demo', '7 Fake Rd', 'Quillby ZZ 14345']], ['missing region collapses spacing', {'name': 'Sam Demo', 'street': '7 Fake Rd', 'city': 'Quillby', 'region': '', 'postal': '14345', 'country': 'AA', 'origin': 'AA'}, ['Sam Demo', '7 Fake Rd', 'Quillby 14345']], ['only a postal code on the last line', {'name': 'Sam Demo', 'street': '7 Fake Rd', 'city': '', 'region': '', 'postal': '14345', 'country': 'AA', 'origin': 'AA'}, ['Sam Demo', '7 Fake Rd', '14345']], ['postal code first, international', {'name': 'Sam Demo', 'street': '7 Fake Rd', 'city': 'Quillby', 'region': '', 'postal': '4234', 'country': 'BB', 'origin': 'AA'}, ['Sam Demo', '7 Fake Rd', '4234 Quillby', 'BEEMARK']], ['uppercase city on its own line', {'name': 'Sam Demo', 'street': '7 Fake Rd', 'city': 'Quillby', 'region': '', 'postal': '14345', 'country': 'CC', 'origin': 'BB'}, ['Sam Demo', '7 Fake Rd', 'QUILLBY', '14345', 'CEELAND']], ['unknown destination falls back', {'name': 'Sam Demo', 'street': '7 Fake Rd', 'city': 'Quillby', 'region': 'ZZ', 'postal': '14345', 'country': 'DD', 'origin': 'AA'}, ['Sam Demo', '7 Fake Rd', 'Quillby ZZ 14345', 'DD']], ['empty name line dropped', {'name': '', 'street': '7 Fake Rd', 'city': 'Quillby', 'region': 'ZZ', 'postal': '14345', 'country': 'AA', 'origin': 'AA'}, ['7 Fake Rd', 'Quillby ZZ 14345']], ['one-letter name kept', {'name': 'Q', 'street': '7 Fake Rd', 'city': 'Quillby', 'region': 'ZZ', 'postal': '14345', 'country': 'AA', 'origin': 'AA'}, ['Q', '7 Fake Rd', 'Quillby ZZ 14345']]], [['domestic three-part last line', {'name': 'Alex Fiction', 'street': '8 Fake Rd', 'city': 'Spraxham', 'region': 'ZZ', 'postal': '15345', 'country': 'AA', 'origin': 'AA'}, ['Alex Fiction', '8 Fake Rd', 'Spraxham ZZ 15345']], ['missing region collapses spacing', {'name': 'Alex Fiction', 'street': '8 Fake Rd', 'city': 'Spraxham', 'region': '', 'postal': '15345', 'country': 'AA', 'origin': 'AA'}, ['Alex Fiction', '8 Fake Rd', 'Spraxham 15345']], ['only a postal code on the last line', {'name': 'Alex Fiction', 'street': '8 Fake Rd', 'city': '', 'region': '', 'postal': '15345', 'country': 'AA', 'origin': 'AA'}, ['Alex Fiction', '8 Fake Rd', '15345']], ['postal code first, international', {'name': 'Alex Fiction', 'street': '8 Fake Rd', 'city': 'Spraxham', 'region': '', 'postal': '5234', 'country': 'BB', 'origin': 'AA'}, ['Alex Fiction', '8 Fake Rd', '5234 Spraxham', 'BEEMARK']], ['uppercase city on its own line', {'name': 'Alex Fiction', 'street': '8 Fake Rd', 'city': 'Spraxham', 'region': '', 'postal': '15345', 'country': 'CC', 'origin': 'BB'}, ['Alex Fiction', '8 Fake Rd', 'SPRAXHAM', '15345', 'CEELAND']], ['unknown destination falls back', {'name': 'Alex Fiction', 'street': '8 Fake Rd', 'city': 'Spraxham', 'region': 'ZZ', 'postal': '15345', 'country': 'DD', 'origin': 'AA'}, ['Alex Fiction', '8 Fake Rd', 'Spraxham ZZ 15345', 'DD']], ['empty name line dropped', {'name': '', 'street': '8 Fake Rd', 'city': 'Spraxham', 'region': 'ZZ', 'postal': '15345', 'country': 'AA', 'origin': 'AA'}, ['8 Fake Rd', 'Spraxham ZZ 15345']], ['one-letter name kept', {'name': 'Q', 'street': '8 Fake Rd', 'city': 'Spraxham', 'region': 'ZZ', 'postal': '15345', 'country': 'AA', 'origin': 'AA'}, ['Q', '8 Fake Rd', 'Spraxham ZZ 15345']]]]
for label, arg, expected in fixtures[N - 1]:
    check(label, solve(arg), 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
domestic three-part last line['Pat Example', '4 Fake Rd', 'Faketown ZZ 11345']['Pat Example', '4 Fake Rd', 'Faketown ZZ 11345']Passed
missing region collapses spacing['Pat Example', '4 Fake Rd', 'Faketown 11345']['Pat Example', '4 Fake Rd', 'Faketown 11345']Passed
only a postal code on the last line['Pat Example', '4 Fake Rd', '11345']['Pat Example', '4 Fake Rd', '11345']Passed
postal code first, international['Pat Example', '4 Fake Rd', '1234 Faketown', 'BEEMARK']['Pat Example', '4 Fake Rd', '1234 Faketown', 'BEEMARK']Passed
uppercase city on its own line['Pat Example', '4 Fake Rd', 'FAKETOWN', '11345', 'CEELAND']['Pat Example', '4 Fake Rd', 'FAKETOWN', '11345', 'CEELAND']Passed
unknown destination falls back['Pat Example', '4 Fake Rd', 'Faketown ZZ 11345', 'DD']['Pat Example', '4 Fake Rd', 'Faketown ZZ 11345', 'DD']Passed
empty name line dropped['4 Fake Rd', 'Faketown ZZ 11345']['4 Fake Rd', 'Faketown ZZ 11345']Passed
one-letter name kept['4 Fake Rd', 'Faketown ZZ 11345']['Q', '4 Fake Rd', 'Faketown ZZ 11345']Failed

SHA-256 / b200be19d929a66a6cd699edf9ad29252a0458281472a3d2cf71b5ceff76b54a

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

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

Sign in to the archive ↗

Verification & scope

A deterministic toy contract over synthetic, obviously fictitious addresses. The rules are stipulated for this model only and make no claim of conformance with any postal authority standard. 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:52:21.151418+00:00.

Case digest / 0fd70d2c53d8099b26a51dacceda23da8a460d08fc17edee5b2ef6e422c4cfce