FA-45766 / Data systems / Open access
Exchange silently routes unmapped keys to receiver zero · case 01
Exchange silently routes unmapped keys to receiver zero.
ROOT CAUSE
partition-exchange-routing: Exchange silently routes unmapped keys to receiver zero.
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: The null receiver does not stand for unmapped non-null keys.
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: target=0
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| independent receivers | [[[[10, 1]], [[11, 2]], []], []] | [[[[10, 1]], [[11, 2]], []], []] | Passed |
| null receiver | [[[], [[10, 1]], []], []] | [[[], [[10, 1]], []], []] | Passed |
| unmapped | [[[[10, 1]], []], []] | [[[], []], [[10, 'UNMAPPED']]] | Failed |
| 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 / 927acfedc1aa6db7cb54eceb5bea523ed8e55e63641417dd1b4e32f6efb00347
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: target=null_partition
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| independent receivers | [[[[10, 1]], [[11, 2]], []], []] | [[[[10, 1]], [[11, 2]], []], []] | Passed |
| null receiver | [[[], [[10, 1]], []], []] | [[[], [[10, 1]], []], []] | Passed |
| unmapped | [[[], [[10, 1]]], []] | [[[], []], [[10, 'UNMAPPED']]] | Failed |
| 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 / 6ac2b057ae1923839f3a312279eb674589e9a14b565f6518124abfff0607835b
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| 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.532254+00:00.
Case digest / e97518ac536ca4ec8bee3e85c65255810b6f198f03810d47a72ee54a97d224e0