FA-45261 / Data systems / Open access
Partition injection uses an empty string for missing fields · case 01
Partition injection uses an empty string for missing fields.
ROOT CAUSE
partition-column-injection: Partition injection uses an empty string for missing fields.
VERIFIED REPAIR
Preserve the stated physical representation and operation order: Read ordered file fragments [partition-values,physical-rows] under a projection of field names. Partition values override stale physical columns of the same name; unprojected fields disappear, missing fields become None, and physically empty fragments do not synthesize rows.
Unsuccessful approach: Zero remains a fabricated missing-field value.
Case contract
Read ordered file fragments [partition-values,physical-rows] under a projection of field names. Partition values override stale physical columns of the same name; unprojected fields disappear, missing fields become None, and physically empty fragments do not synthesize 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:
fragments,projection=d
out=[]
for partition,rows in fragments:
for row in rows:
merged=dict(row)
merged.update(partition)
out.append([merged.get(name, "") for name in projection])
return out
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('partition overrides', solve([[[{'p': 'new'}, [{'p': 'old', 'v': 1}]]], ['v', 'p']]), [[1, 'new']])
check('multiple fragments', solve([[[{'p': 'a'}, [{'v': 1}]], [{'p': 'b'}, [{'v': 2}]]], ['p', 'v']]), [['a', 1], ['b', 2]])
check('empty fragment', solve([[[{'p': 'a'}, []]], ['p']]), [])
check('missing projected', solve([[[{}, [{'v': 1}]]], ['v', 'x']]), [[1, None]])
check('duplicate rows', solve([[[{}, [{'v': 1}, {'v': 1}]]], ['v']]), [[1], [1]])
check('duplicate projection', solve([[[{}, [{'v': 1}]]], ['v', 'v']]), [[1, 1]])
check('no fragments', solve([[], ['v']]), [])
elif N == 2:
check('partition overrides', solve([[[{'p': 'new'}, [{'p': 'old', 'v': 2}]]], ['v', 'p']]), [[2, 'new']])
check('multiple fragments', solve([[[{'p': 'a'}, [{'v': 2}]], [{'p': 'b'}, [{'v': 3}]]], ['p', 'v']]), [['a', 2], ['b', 3]])
check('empty fragment', solve([[[{'p': 'a'}, []]], ['p']]), [])
check('missing projected', solve([[[{}, [{'v': 2}]]], ['v', 'x']]), [[2, None]])
check('duplicate rows', solve([[[{}, [{'v': 2}, {'v': 2}]]], ['v']]), [[2], [2]])
check('duplicate projection', solve([[[{}, [{'v': 2}]]], ['v', 'v']]), [[2, 2]])
check('no fragments', solve([[], ['v']]), [])
elif N == 3:
check('partition overrides', solve([[[{'p': 'new'}, [{'p': 'old', 'v': 3}]]], ['v', 'p']]), [[3, 'new']])
check('multiple fragments', solve([[[{'p': 'a'}, [{'v': 3}]], [{'p': 'b'}, [{'v': 4}]]], ['p', 'v']]), [['a', 3], ['b', 4]])
check('empty fragment', solve([[[{'p': 'a'}, []]], ['p']]), [])
check('missing projected', solve([[[{}, [{'v': 3}]]], ['v', 'x']]), [[3, None]])
check('duplicate rows', solve([[[{}, [{'v': 3}, {'v': 3}]]], ['v']]), [[3], [3]])
check('duplicate projection', solve([[[{}, [{'v': 3}]]], ['v', 'v']]), [[3, 3]])
check('no fragments', solve([[], ['v']]), [])
elif N == 4:
check('partition overrides', solve([[[{'p': 'new'}, [{'p': 'old', 'v': 4}]]], ['v', 'p']]), [[4, 'new']])
check('multiple fragments', solve([[[{'p': 'a'}, [{'v': 4}]], [{'p': 'b'}, [{'v': 5}]]], ['p', 'v']]), [['a', 4], ['b', 5]])
check('empty fragment', solve([[[{'p': 'a'}, []]], ['p']]), [])
check('missing projected', solve([[[{}, [{'v': 4}]]], ['v', 'x']]), [[4, None]])
check('duplicate rows', solve([[[{}, [{'v': 4}, {'v': 4}]]], ['v']]), [[4], [4]])
check('duplicate projection', solve([[[{}, [{'v': 4}]]], ['v', 'v']]), [[4, 4]])
check('no fragments', solve([[], ['v']]), [])
elif N == 5:
check('partition overrides', solve([[[{'p': 'new'}, [{'p': 'old', 'v': 5}]]], ['v', 'p']]), [[5, 'new']])
check('multiple fragments', solve([[[{'p': 'a'}, [{'v': 5}]], [{'p': 'b'}, [{'v': 6}]]], ['p', 'v']]), [['a', 5], ['b', 6]])
check('empty fragment', solve([[[{'p': 'a'}, []]], ['p']]), [])
check('missing projected', solve([[[{}, [{'v': 5}]]], ['v', 'x']]), [[5, None]])
check('duplicate rows', solve([[[{}, [{'v': 5}, {'v': 5}]]], ['v']]), [[5], [5]])
check('duplicate projection', solve([[[{}, [{'v': 5}]]], ['v', 'v']]), [[5, 5]])
check('no fragments', solve([[], ['v']]), [])
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 |
|---|---|---|---|
| partition overrides | [[1, 'new']] | [[1, 'new']] | Passed |
| multiple fragments | [['a', 1], ['b', 2]] | [['a', 1], ['b', 2]] | Passed |
| empty fragment | [] | [] | Passed |
| missing projected | [[1, '']] | [[1, None]] | Failed |
| duplicate rows | [[1], [1]] | [[1], [1]] | Passed |
| duplicate projection | [[1, 1]] | [[1, 1]] | Passed |
| no fragments | [] | [] | Passed |
SHA-256 / 0a9c4b2d56f90bfd6d8f8cfc831b2071ef0fb9408892a069ba1fa33fbbd5dee8
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
try:
fragments,projection=d
out=[]
for partition,rows in fragments:
for row in rows:
merged=dict(row)
merged.update(partition)
out.append([merged.get(name, 0) for name in projection])
return out
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('partition overrides', solve([[[{'p': 'new'}, [{'p': 'old', 'v': 1}]]], ['v', 'p']]), [[1, 'new']])
check('multiple fragments', solve([[[{'p': 'a'}, [{'v': 1}]], [{'p': 'b'}, [{'v': 2}]]], ['p', 'v']]), [['a', 1], ['b', 2]])
check('empty fragment', solve([[[{'p': 'a'}, []]], ['p']]), [])
check('missing projected', solve([[[{}, [{'v': 1}]]], ['v', 'x']]), [[1, None]])
check('duplicate rows', solve([[[{}, [{'v': 1}, {'v': 1}]]], ['v']]), [[1], [1]])
check('duplicate projection', solve([[[{}, [{'v': 1}]]], ['v', 'v']]), [[1, 1]])
check('no fragments', solve([[], ['v']]), [])
elif N == 2:
check('partition overrides', solve([[[{'p': 'new'}, [{'p': 'old', 'v': 2}]]], ['v', 'p']]), [[2, 'new']])
check('multiple fragments', solve([[[{'p': 'a'}, [{'v': 2}]], [{'p': 'b'}, [{'v': 3}]]], ['p', 'v']]), [['a', 2], ['b', 3]])
check('empty fragment', solve([[[{'p': 'a'}, []]], ['p']]), [])
check('missing projected', solve([[[{}, [{'v': 2}]]], ['v', 'x']]), [[2, None]])
check('duplicate rows', solve([[[{}, [{'v': 2}, {'v': 2}]]], ['v']]), [[2], [2]])
check('duplicate projection', solve([[[{}, [{'v': 2}]]], ['v', 'v']]), [[2, 2]])
check('no fragments', solve([[], ['v']]), [])
elif N == 3:
check('partition overrides', solve([[[{'p': 'new'}, [{'p': 'old', 'v': 3}]]], ['v', 'p']]), [[3, 'new']])
check('multiple fragments', solve([[[{'p': 'a'}, [{'v': 3}]], [{'p': 'b'}, [{'v': 4}]]], ['p', 'v']]), [['a', 3], ['b', 4]])
check('empty fragment', solve([[[{'p': 'a'}, []]], ['p']]), [])
check('missing projected', solve([[[{}, [{'v': 3}]]], ['v', 'x']]), [[3, None]])
check('duplicate rows', solve([[[{}, [{'v': 3}, {'v': 3}]]], ['v']]), [[3], [3]])
check('duplicate projection', solve([[[{}, [{'v': 3}]]], ['v', 'v']]), [[3, 3]])
check('no fragments', solve([[], ['v']]), [])
elif N == 4:
check('partition overrides', solve([[[{'p': 'new'}, [{'p': 'old', 'v': 4}]]], ['v', 'p']]), [[4, 'new']])
check('multiple fragments', solve([[[{'p': 'a'}, [{'v': 4}]], [{'p': 'b'}, [{'v': 5}]]], ['p', 'v']]), [['a', 4], ['b', 5]])
check('empty fragment', solve([[[{'p': 'a'}, []]], ['p']]), [])
check('missing projected', solve([[[{}, [{'v': 4}]]], ['v', 'x']]), [[4, None]])
check('duplicate rows', solve([[[{}, [{'v': 4}, {'v': 4}]]], ['v']]), [[4], [4]])
check('duplicate projection', solve([[[{}, [{'v': 4}]]], ['v', 'v']]), [[4, 4]])
check('no fragments', solve([[], ['v']]), [])
elif N == 5:
check('partition overrides', solve([[[{'p': 'new'}, [{'p': 'old', 'v': 5}]]], ['v', 'p']]), [[5, 'new']])
check('multiple fragments', solve([[[{'p': 'a'}, [{'v': 5}]], [{'p': 'b'}, [{'v': 6}]]], ['p', 'v']]), [['a', 5], ['b', 6]])
check('empty fragment', solve([[[{'p': 'a'}, []]], ['p']]), [])
check('missing projected', solve([[[{}, [{'v': 5}]]], ['v', 'x']]), [[5, None]])
check('duplicate rows', solve([[[{}, [{'v': 5}, {'v': 5}]]], ['v']]), [[5], [5]])
check('duplicate projection', solve([[[{}, [{'v': 5}]]], ['v', 'v']]), [[5, 5]])
check('no fragments', solve([[], ['v']]), [])
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 |
|---|---|---|---|
| partition overrides | [[1, 'new']] | [[1, 'new']] | Passed |
| multiple fragments | [['a', 1], ['b', 2]] | [['a', 1], ['b', 2]] | Passed |
| empty fragment | [] | [] | Passed |
| missing projected | [[1, 0]] | [[1, None]] | Failed |
| duplicate rows | [[1], [1]] | [[1], [1]] | Passed |
| duplicate projection | [[1, 1]] | [[1, 1]] | Passed |
| no fragments | [] | [] | Passed |
SHA-256 / 4280306a3f1655771f69dbbc9805cac30b73a759ee524ddd811229b43692de70
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
try:
fragments,projection=d
out=[]
for partition,rows in fragments:
for row in rows:
merged=dict(row)
merged.update(partition)
out.append([merged.get(name) for name in projection])
return out
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('partition overrides', solve([[[{'p': 'new'}, [{'p': 'old', 'v': 1}]]], ['v', 'p']]), [[1, 'new']])
check('multiple fragments', solve([[[{'p': 'a'}, [{'v': 1}]], [{'p': 'b'}, [{'v': 2}]]], ['p', 'v']]), [['a', 1], ['b', 2]])
check('empty fragment', solve([[[{'p': 'a'}, []]], ['p']]), [])
check('missing projected', solve([[[{}, [{'v': 1}]]], ['v', 'x']]), [[1, None]])
check('duplicate rows', solve([[[{}, [{'v': 1}, {'v': 1}]]], ['v']]), [[1], [1]])
check('duplicate projection', solve([[[{}, [{'v': 1}]]], ['v', 'v']]), [[1, 1]])
check('no fragments', solve([[], ['v']]), [])
elif N == 2:
check('partition overrides', solve([[[{'p': 'new'}, [{'p': 'old', 'v': 2}]]], ['v', 'p']]), [[2, 'new']])
check('multiple fragments', solve([[[{'p': 'a'}, [{'v': 2}]], [{'p': 'b'}, [{'v': 3}]]], ['p', 'v']]), [['a', 2], ['b', 3]])
check('empty fragment', solve([[[{'p': 'a'}, []]], ['p']]), [])
check('missing projected', solve([[[{}, [{'v': 2}]]], ['v', 'x']]), [[2, None]])
check('duplicate rows', solve([[[{}, [{'v': 2}, {'v': 2}]]], ['v']]), [[2], [2]])
check('duplicate projection', solve([[[{}, [{'v': 2}]]], ['v', 'v']]), [[2, 2]])
check('no fragments', solve([[], ['v']]), [])
elif N == 3:
check('partition overrides', solve([[[{'p': 'new'}, [{'p': 'old', 'v': 3}]]], ['v', 'p']]), [[3, 'new']])
check('multiple fragments', solve([[[{'p': 'a'}, [{'v': 3}]], [{'p': 'b'}, [{'v': 4}]]], ['p', 'v']]), [['a', 3], ['b', 4]])
check('empty fragment', solve([[[{'p': 'a'}, []]], ['p']]), [])
check('missing projected', solve([[[{}, [{'v': 3}]]], ['v', 'x']]), [[3, None]])
check('duplicate rows', solve([[[{}, [{'v': 3}, {'v': 3}]]], ['v']]), [[3], [3]])
check('duplicate projection', solve([[[{}, [{'v': 3}]]], ['v', 'v']]), [[3, 3]])
check('no fragments', solve([[], ['v']]), [])
elif N == 4:
check('partition overrides', solve([[[{'p': 'new'}, [{'p': 'old', 'v': 4}]]], ['v', 'p']]), [[4, 'new']])
check('multiple fragments', solve([[[{'p': 'a'}, [{'v': 4}]], [{'p': 'b'}, [{'v': 5}]]], ['p', 'v']]), [['a', 4], ['b', 5]])
check('empty fragment', solve([[[{'p': 'a'}, []]], ['p']]), [])
check('missing projected', solve([[[{}, [{'v': 4}]]], ['v', 'x']]), [[4, None]])
check('duplicate rows', solve([[[{}, [{'v': 4}, {'v': 4}]]], ['v']]), [[4], [4]])
check('duplicate projection', solve([[[{}, [{'v': 4}]]], ['v', 'v']]), [[4, 4]])
check('no fragments', solve([[], ['v']]), [])
elif N == 5:
check('partition overrides', solve([[[{'p': 'new'}, [{'p': 'old', 'v': 5}]]], ['v', 'p']]), [[5, 'new']])
check('multiple fragments', solve([[[{'p': 'a'}, [{'v': 5}]], [{'p': 'b'}, [{'v': 6}]]], ['p', 'v']]), [['a', 5], ['b', 6]])
check('empty fragment', solve([[[{'p': 'a'}, []]], ['p']]), [])
check('missing projected', solve([[[{}, [{'v': 5}]]], ['v', 'x']]), [[5, None]])
check('duplicate rows', solve([[[{}, [{'v': 5}, {'v': 5}]]], ['v']]), [[5], [5]])
check('duplicate projection', solve([[[{}, [{'v': 5}]]], ['v', 'v']]), [[5, 5]])
check('no fragments', solve([[], ['v']]), [])
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 |
|---|---|---|---|
| partition overrides | [[1, 'new']] | [[1, 'new']] | Passed |
| multiple fragments | [['a', 1], ['b', 2]] | [['a', 1], ['b', 2]] | Passed |
| empty fragment | [] | [] | Passed |
| missing projected | [[1, None]] | [[1, None]] | Passed |
| duplicate rows | [[1], [1]] | [[1], [1]] | Passed |
| duplicate projection | [[1, 1]] | [[1, 1]] | Passed |
| no fragments | [] | [] | Passed |
SHA-256 / 8773b6564c84ebcfbab64e61c1151d56863f1616de9bfd1e4574b43d2afae784
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:20.451693+00:00.
Case digest / a2e695f8bf9c00b8a665a2d27d9ed999bbf0788918a15dc9c259b4bd16f704dd