FAILURE MAP
← Case archive

FA-45776 / Data systems / Open access

Exchange removes empty receivers from its output · case 01

Exchange removes empty receivers from its output.

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

ROOT CAUSE

partition-exchange-routing: Exchange removes empty receivers from its output.

VERIFIED REPAIR

Preserve the stated physical representation and operation order: Route [id,key,payload] rows into fixed receiver partitions using a supplied key-to-partition table. Null keys use the explicit null partition; unmapped non-null keys produce UNMAPPED side output. Preserve source order within each receiver, retain empty receivers, and preserve repeated rows.

Unsuccessful approach: Null receivers differ from empty receiver queues and break positional correspondence.

Case contract

Route [id,key,payload] rows into fixed receiver partitions using a supplied key-to-partition table. Null keys use the explicit null partition; unmapped non-null keys produce UNMAPPED side output. Preserve source order within each receiver, retain empty receivers, and preserve repeated rows.

Why this case matters

A bounded deterministic data engine model makes representation and changelog faults reproducible.

1 / The failure

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

N = 1
observations = []
def solve(d):
    try:
        rows,mapping,null_partition,count=d
        receivers=[[] for _ in range(count)]; rejected=[]
        for ident,key,payload in rows:
            if key is None: target=null_partition
            elif str(key) in mapping: target=mapping[str(key)]
            else: rejected.append([ident,'UNMAPPED']); continue
            receivers[target].append([ident,payload])
        return [[r for r in receivers if r],rejected]
    except (IndexError, KeyError, ValueError, StopIteration) as exc:
        return {"representation_error": type(exc).__name__}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
    check('independent receivers', solve([[[10, 1, 1], [11, 2, 2]], {'1': 0, '2': 1}, 1, 3]), [[[[10, 1]], [[11, 2]], []], []])
    check('null receiver', solve([[[10, None, 1]], {}, 1, 3]), [[[], [[10, 1]], []], []])
    check('unmapped', solve([[[10, 7, 1]], {'1': 0}, 1, 2]), [[[], []], [[10, 'UNMAPPED']]])
    check('same receiver order', solve([[[11, 1, 1], [10, 1, 2]], {'1': 0}, 1, 2]), [[[[11, 1], [10, 2]], []], []])
    check('duplicate rows', solve([[[10, 1, 1], [10, 1, 1]], {'1': 0}, 1, 2]), [[[[10, 1], [10, 1]], []], []])
    check('mapped zero', solve([[[10, 0, 1]], {'0': 1}, 0, 2]), [[[], [[10, 1]]], []])
    check('empty relation', solve([[], {}, 0, 2]), [[[], []], []])
elif N == 2:
    check('independent receivers', solve([[[10, 1, 2], [11, 2, 3]], {'1': 0, '2': 1}, 1, 3]), [[[[10, 2]], [[11, 3]], []], []])
    check('null receiver', solve([[[10, None, 2]], {}, 1, 3]), [[[], [[10, 2]], []], []])
    check('unmapped', solve([[[10, 7, 2]], {'1': 0}, 1, 2]), [[[], []], [[10, 'UNMAPPED']]])
    check('same receiver order', solve([[[11, 1, 2], [10, 1, 3]], {'1': 0}, 1, 2]), [[[[11, 2], [10, 3]], []], []])
    check('duplicate rows', solve([[[10, 1, 2], [10, 1, 2]], {'1': 0}, 1, 2]), [[[[10, 2], [10, 2]], []], []])
    check('mapped zero', solve([[[10, 0, 2]], {'0': 1}, 0, 2]), [[[], [[10, 2]]], []])
    check('empty relation', solve([[], {}, 0, 2]), [[[], []], []])
elif N == 3:
    check('independent receivers', solve([[[10, 1, 3], [11, 2, 4]], {'1': 0, '2': 1}, 1, 3]), [[[[10, 3]], [[11, 4]], []], []])
    check('null receiver', solve([[[10, None, 3]], {}, 1, 3]), [[[], [[10, 3]], []], []])
    check('unmapped', solve([[[10, 7, 3]], {'1': 0}, 1, 2]), [[[], []], [[10, 'UNMAPPED']]])
    check('same receiver order', solve([[[11, 1, 3], [10, 1, 4]], {'1': 0}, 1, 2]), [[[[11, 3], [10, 4]], []], []])
    check('duplicate rows', solve([[[10, 1, 3], [10, 1, 3]], {'1': 0}, 1, 2]), [[[[10, 3], [10, 3]], []], []])
    check('mapped zero', solve([[[10, 0, 3]], {'0': 1}, 0, 2]), [[[], [[10, 3]]], []])
    check('empty relation', solve([[], {}, 0, 2]), [[[], []], []])
elif N == 4:
    check('independent receivers', solve([[[10, 1, 4], [11, 2, 5]], {'1': 0, '2': 1}, 1, 3]), [[[[10, 4]], [[11, 5]], []], []])
    check('null receiver', solve([[[10, None, 4]], {}, 1, 3]), [[[], [[10, 4]], []], []])
    check('unmapped', solve([[[10, 7, 4]], {'1': 0}, 1, 2]), [[[], []], [[10, 'UNMAPPED']]])
    check('same receiver order', solve([[[11, 1, 4], [10, 1, 5]], {'1': 0}, 1, 2]), [[[[11, 4], [10, 5]], []], []])
    check('duplicate rows', solve([[[10, 1, 4], [10, 1, 4]], {'1': 0}, 1, 2]), [[[[10, 4], [10, 4]], []], []])
    check('mapped zero', solve([[[10, 0, 4]], {'0': 1}, 0, 2]), [[[], [[10, 4]]], []])
    check('empty relation', solve([[], {}, 0, 2]), [[[], []], []])
elif N == 5:
    check('independent receivers', solve([[[10, 1, 5], [11, 2, 6]], {'1': 0, '2': 1}, 1, 3]), [[[[10, 5]], [[11, 6]], []], []])
    check('null receiver', solve([[[10, None, 5]], {}, 1, 3]), [[[], [[10, 5]], []], []])
    check('unmapped', solve([[[10, 7, 5]], {'1': 0}, 1, 2]), [[[], []], [[10, 'UNMAPPED']]])
    check('same receiver order', solve([[[11, 1, 5], [10, 1, 6]], {'1': 0}, 1, 2]), [[[[11, 5], [10, 6]], []], []])
    check('duplicate rows', solve([[[10, 1, 5], [10, 1, 5]], {'1': 0}, 1, 2]), [[[[10, 5], [10, 5]], []], []])
    check('mapped zero', solve([[[10, 0, 5]], {'0': 1}, 0, 2]), [[[], [[10, 5]]], []])
    check('empty relation', solve([[], {}, 0, 2]), [[[], []], []])
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
independent receivers[[[[10, 1]], [[11, 2]]], []][[[[10, 1]], [[11, 2]], []], []]Failed
null receiver[[[[10, 1]]], []][[[], [[10, 1]], []], []]Failed
unmapped[[], [[10, 'UNMAPPED']]][[[], []], [[10, 'UNMAPPED']]]Failed
same receiver order[[[[11, 1], [10, 2]]], []][[[[11, 1], [10, 2]], []], []]Failed
duplicate rows[[[[10, 1], [10, 1]]], []][[[[10, 1], [10, 1]], []], []]Failed
mapped zero[[[[10, 1]]], []][[[], [[10, 1]]], []]Failed
empty relation[[], []][[[], []], []]Failed

SHA-256 / 6ee8f24dcf541f194572419fb74ff6c505d0c10785606ad11cb1ec101904f0dd

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(d):
    try:
        rows,mapping,null_partition,count=d
        receivers=[[] for _ in range(count)]; rejected=[]
        for ident,key,payload in rows:
            if key is None: target=null_partition
            elif str(key) in mapping: target=mapping[str(key)]
            else: rejected.append([ident,'UNMAPPED']); continue
            receivers[target].append([ident,payload])
        return [[r or None for r in receivers],rejected]
    except (IndexError, KeyError, ValueError, StopIteration) as exc:
        return {"representation_error": type(exc).__name__}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
    check('independent receivers', solve([[[10, 1, 1], [11, 2, 2]], {'1': 0, '2': 1}, 1, 3]), [[[[10, 1]], [[11, 2]], []], []])
    check('null receiver', solve([[[10, None, 1]], {}, 1, 3]), [[[], [[10, 1]], []], []])
    check('unmapped', solve([[[10, 7, 1]], {'1': 0}, 1, 2]), [[[], []], [[10, 'UNMAPPED']]])
    check('same receiver order', solve([[[11, 1, 1], [10, 1, 2]], {'1': 0}, 1, 2]), [[[[11, 1], [10, 2]], []], []])
    check('duplicate rows', solve([[[10, 1, 1], [10, 1, 1]], {'1': 0}, 1, 2]), [[[[10, 1], [10, 1]], []], []])
    check('mapped zero', solve([[[10, 0, 1]], {'0': 1}, 0, 2]), [[[], [[10, 1]]], []])
    check('empty relation', solve([[], {}, 0, 2]), [[[], []], []])
elif N == 2:
    check('independent receivers', solve([[[10, 1, 2], [11, 2, 3]], {'1': 0, '2': 1}, 1, 3]), [[[[10, 2]], [[11, 3]], []], []])
    check('null receiver', solve([[[10, None, 2]], {}, 1, 3]), [[[], [[10, 2]], []], []])
    check('unmapped', solve([[[10, 7, 2]], {'1': 0}, 1, 2]), [[[], []], [[10, 'UNMAPPED']]])
    check('same receiver order', solve([[[11, 1, 2], [10, 1, 3]], {'1': 0}, 1, 2]), [[[[11, 2], [10, 3]], []], []])
    check('duplicate rows', solve([[[10, 1, 2], [10, 1, 2]], {'1': 0}, 1, 2]), [[[[10, 2], [10, 2]], []], []])
    check('mapped zero', solve([[[10, 0, 2]], {'0': 1}, 0, 2]), [[[], [[10, 2]]], []])
    check('empty relation', solve([[], {}, 0, 2]), [[[], []], []])
elif N == 3:
    check('independent receivers', solve([[[10, 1, 3], [11, 2, 4]], {'1': 0, '2': 1}, 1, 3]), [[[[10, 3]], [[11, 4]], []], []])
    check('null receiver', solve([[[10, None, 3]], {}, 1, 3]), [[[], [[10, 3]], []], []])
    check('unmapped', solve([[[10, 7, 3]], {'1': 0}, 1, 2]), [[[], []], [[10, 'UNMAPPED']]])
    check('same receiver order', solve([[[11, 1, 3], [10, 1, 4]], {'1': 0}, 1, 2]), [[[[11, 3], [10, 4]], []], []])
    check('duplicate rows', solve([[[10, 1, 3], [10, 1, 3]], {'1': 0}, 1, 2]), [[[[10, 3], [10, 3]], []], []])
    check('mapped zero', solve([[[10, 0, 3]], {'0': 1}, 0, 2]), [[[], [[10, 3]]], []])
    check('empty relation', solve([[], {}, 0, 2]), [[[], []], []])
elif N == 4:
    check('independent receivers', solve([[[10, 1, 4], [11, 2, 5]], {'1': 0, '2': 1}, 1, 3]), [[[[10, 4]], [[11, 5]], []], []])
    check('null receiver', solve([[[10, None, 4]], {}, 1, 3]), [[[], [[10, 4]], []], []])
    check('unmapped', solve([[[10, 7, 4]], {'1': 0}, 1, 2]), [[[], []], [[10, 'UNMAPPED']]])
    check('same receiver order', solve([[[11, 1, 4], [10, 1, 5]], {'1': 0}, 1, 2]), [[[[11, 4], [10, 5]], []], []])
    check('duplicate rows', solve([[[10, 1, 4], [10, 1, 4]], {'1': 0}, 1, 2]), [[[[10, 4], [10, 4]], []], []])
    check('mapped zero', solve([[[10, 0, 4]], {'0': 1}, 0, 2]), [[[], [[10, 4]]], []])
    check('empty relation', solve([[], {}, 0, 2]), [[[], []], []])
elif N == 5:
    check('independent receivers', solve([[[10, 1, 5], [11, 2, 6]], {'1': 0, '2': 1}, 1, 3]), [[[[10, 5]], [[11, 6]], []], []])
    check('null receiver', solve([[[10, None, 5]], {}, 1, 3]), [[[], [[10, 5]], []], []])
    check('unmapped', solve([[[10, 7, 5]], {'1': 0}, 1, 2]), [[[], []], [[10, 'UNMAPPED']]])
    check('same receiver order', solve([[[11, 1, 5], [10, 1, 6]], {'1': 0}, 1, 2]), [[[[11, 5], [10, 6]], []], []])
    check('duplicate rows', solve([[[10, 1, 5], [10, 1, 5]], {'1': 0}, 1, 2]), [[[[10, 5], [10, 5]], []], []])
    check('mapped zero', solve([[[10, 0, 5]], {'0': 1}, 0, 2]), [[[], [[10, 5]]], []])
    check('empty relation', solve([[], {}, 0, 2]), [[[], []], []])
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
independent receivers[[[[10, 1]], [[11, 2]], None], []][[[[10, 1]], [[11, 2]], []], []]Failed
null receiver[[None, [[10, 1]], None], []][[[], [[10, 1]], []], []]Failed
unmapped[[None, None], [[10, 'UNMAPPED']]][[[], []], [[10, 'UNMAPPED']]]Failed
same receiver order[[[[11, 1], [10, 2]], None], []][[[[11, 1], [10, 2]], []], []]Failed
duplicate rows[[[[10, 1], [10, 1]], None], []][[[[10, 1], [10, 1]], []], []]Failed
mapped zero[[None, [[10, 1]]], []][[[], [[10, 1]]], []]Failed
empty relation[[None, None], []][[[], []], []]Failed

SHA-256 / 47a86a73ad0de49e15478365df68b08803952d0d02bf449a9ddd8641d1ae3e74

3 / The verified repair

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

N = 1
observations = []
def solve(d):
    try:
        rows,mapping,null_partition,count=d
        receivers=[[] for _ in range(count)]; rejected=[]
        for ident,key,payload in rows:
            if key is None: target=null_partition
            elif str(key) in mapping: target=mapping[str(key)]
            else: rejected.append([ident,'UNMAPPED']); continue
            receivers[target].append([ident,payload])
        return [receivers,rejected]
    except (IndexError, KeyError, ValueError, StopIteration) as exc:
        return {"representation_error": type(exc).__name__}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
if N == 1:
    check('independent receivers', solve([[[10, 1, 1], [11, 2, 2]], {'1': 0, '2': 1}, 1, 3]), [[[[10, 1]], [[11, 2]], []], []])
    check('null receiver', solve([[[10, None, 1]], {}, 1, 3]), [[[], [[10, 1]], []], []])
    check('unmapped', solve([[[10, 7, 1]], {'1': 0}, 1, 2]), [[[], []], [[10, 'UNMAPPED']]])
    check('same receiver order', solve([[[11, 1, 1], [10, 1, 2]], {'1': 0}, 1, 2]), [[[[11, 1], [10, 2]], []], []])
    check('duplicate rows', solve([[[10, 1, 1], [10, 1, 1]], {'1': 0}, 1, 2]), [[[[10, 1], [10, 1]], []], []])
    check('mapped zero', solve([[[10, 0, 1]], {'0': 1}, 0, 2]), [[[], [[10, 1]]], []])
    check('empty relation', solve([[], {}, 0, 2]), [[[], []], []])
elif N == 2:
    check('independent receivers', solve([[[10, 1, 2], [11, 2, 3]], {'1': 0, '2': 1}, 1, 3]), [[[[10, 2]], [[11, 3]], []], []])
    check('null receiver', solve([[[10, None, 2]], {}, 1, 3]), [[[], [[10, 2]], []], []])
    check('unmapped', solve([[[10, 7, 2]], {'1': 0}, 1, 2]), [[[], []], [[10, 'UNMAPPED']]])
    check('same receiver order', solve([[[11, 1, 2], [10, 1, 3]], {'1': 0}, 1, 2]), [[[[11, 2], [10, 3]], []], []])
    check('duplicate rows', solve([[[10, 1, 2], [10, 1, 2]], {'1': 0}, 1, 2]), [[[[10, 2], [10, 2]], []], []])
    check('mapped zero', solve([[[10, 0, 2]], {'0': 1}, 0, 2]), [[[], [[10, 2]]], []])
    check('empty relation', solve([[], {}, 0, 2]), [[[], []], []])
elif N == 3:
    check('independent receivers', solve([[[10, 1, 3], [11, 2, 4]], {'1': 0, '2': 1}, 1, 3]), [[[[10, 3]], [[11, 4]], []], []])
    check('null receiver', solve([[[10, None, 3]], {}, 1, 3]), [[[], [[10, 3]], []], []])
    check('unmapped', solve([[[10, 7, 3]], {'1': 0}, 1, 2]), [[[], []], [[10, 'UNMAPPED']]])
    check('same receiver order', solve([[[11, 1, 3], [10, 1, 4]], {'1': 0}, 1, 2]), [[[[11, 3], [10, 4]], []], []])
    check('duplicate rows', solve([[[10, 1, 3], [10, 1, 3]], {'1': 0}, 1, 2]), [[[[10, 3], [10, 3]], []], []])
    check('mapped zero', solve([[[10, 0, 3]], {'0': 1}, 0, 2]), [[[], [[10, 3]]], []])
    check('empty relation', solve([[], {}, 0, 2]), [[[], []], []])
elif N == 4:
    check('independent receivers', solve([[[10, 1, 4], [11, 2, 5]], {'1': 0, '2': 1}, 1, 3]), [[[[10, 4]], [[11, 5]], []], []])
    check('null receiver', solve([[[10, None, 4]], {}, 1, 3]), [[[], [[10, 4]], []], []])
    check('unmapped', solve([[[10, 7, 4]], {'1': 0}, 1, 2]), [[[], []], [[10, 'UNMAPPED']]])
    check('same receiver order', solve([[[11, 1, 4], [10, 1, 5]], {'1': 0}, 1, 2]), [[[[11, 4], [10, 5]], []], []])
    check('duplicate rows', solve([[[10, 1, 4], [10, 1, 4]], {'1': 0}, 1, 2]), [[[[10, 4], [10, 4]], []], []])
    check('mapped zero', solve([[[10, 0, 4]], {'0': 1}, 0, 2]), [[[], [[10, 4]]], []])
    check('empty relation', solve([[], {}, 0, 2]), [[[], []], []])
elif N == 5:
    check('independent receivers', solve([[[10, 1, 5], [11, 2, 6]], {'1': 0, '2': 1}, 1, 3]), [[[[10, 5]], [[11, 6]], []], []])
    check('null receiver', solve([[[10, None, 5]], {}, 1, 3]), [[[], [[10, 5]], []], []])
    check('unmapped', solve([[[10, 7, 5]], {'1': 0}, 1, 2]), [[[], []], [[10, 'UNMAPPED']]])
    check('same receiver order', solve([[[11, 1, 5], [10, 1, 6]], {'1': 0}, 1, 2]), [[[[11, 5], [10, 6]], []], []])
    check('duplicate rows', solve([[[10, 1, 5], [10, 1, 5]], {'1': 0}, 1, 2]), [[[[10, 5], [10, 5]], []], []])
    check('mapped zero', solve([[[10, 0, 5]], {'0': 1}, 0, 2]), [[[], [[10, 5]]], []])
    check('empty relation', solve([[], {}, 0, 2]), [[[], []], []])
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
independent receivers[[[[10, 1]], [[11, 2]], []], []][[[[10, 1]], [[11, 2]], []], []]Passed
null receiver[[[], [[10, 1]], []], []][[[], [[10, 1]], []], []]Passed
unmapped[[[], []], [[10, 'UNMAPPED']]][[[], []], [[10, 'UNMAPPED']]]Passed
same receiver order[[[[11, 1], [10, 2]], []], []][[[[11, 1], [10, 2]], []], []]Passed
duplicate rows[[[[10, 1], [10, 1]], []], []][[[[10, 1], [10, 1]], []], []]Passed
mapped zero[[[], [[10, 1]]], []][[[], [[10, 1]]], []]Passed
empty relation[[[], []], []][[[], []], []]Passed

SHA-256 / de2e5fed5fb62a9449df6b11d5c61154551e73704e6ca931adc6e6ed915acff7

Verification & scope

Offline stipulated semantics over valid small inputs; no performance, concurrency, or production-engine conformance claim. 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:44:25.688797+00:00.

Case digest / 7cd740a1de088549269232a2c5277d6712d38036fa55dd5d51018ba07c3f6b04