FA-44491 / Data systems / Open access
Dense union gather sorts logical row addresses · case 01
Dense union gather sorts logical row addresses.
ROOT CAUSE
dense-union-gather: Dense union gather sorts logical row addresses.
THE FAILURE
dense-union-gather: Dense union gather sorts logical row addresses.
Unsuccessful approach: Removing repeated selected rows still changes cardinality.
Case contract
Decode a dense tagged union. Tags select named child buffers through a tag map; offsets address those buffers independently of output position. Parent and selected child validity both apply. Emit [child-name,value] for valid parents, None for null parents.
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:
tags,offsets,names,children,valid,parent,selection=d
out=[]
for row in sorted(selection):
tag=tags[row]
name=names[str(tag)]
offset=offsets[row]
value=children[name][offset] if valid[name][offset] else None
out.append([name,value] if parent[row] else None)
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('mixed tags', solve([[7, 9, 7], [1, 0, 0], {'7': 'a', '9': 'b'}, {'a': [1, 2, 3], 'b': [4, 5, 6]}, {'a': [True, True, True], 'b': [True, True, True]}, [True, True, True], [2, 0, 1]]), [['a', 1], ['a', 2], ['b', 4]])
check('child null', solve([[7, 7], [0, 1], {'7': 'a'}, {'a': [1, 2]}, {'a': [False, True]}, [True, True], [0, 1]]), [['a', None], ['a', 2]])
check('parent null', solve([[7], [0], {'7': 'a'}, {'a': [1]}, {'a': [True]}, [False], [0]]), [None])
check('repeat row', solve([[7], [0], {'7': 'a'}, {'a': [1]}, {'a': [True]}, [True], [0, 0]]), [['a', 1], ['a', 1]])
check('empty selection', solve([[7], [0], {'7': 'a'}, {'a': [1]}, {'a': [True]}, [True], []]), [])
check('second tag', solve([[9], [1], {'7': 'a', '9': 'b'}, {'a': [1, 2], 'b': [3, 4]}, {'a': [True, True], 'b': [True, True]}, [True], [0]]), [['b', 4]])
elif N == 2:
check('mixed tags', solve([[7, 9, 7], [1, 0, 0], {'7': 'a', '9': 'b'}, {'a': [2, 3, 4], 'b': [5, 6, 7]}, {'a': [True, True, True], 'b': [True, True, True]}, [True, True, True], [2, 0, 1]]), [['a', 2], ['a', 3], ['b', 5]])
check('child null', solve([[7, 7], [0, 1], {'7': 'a'}, {'a': [2, 3]}, {'a': [False, True]}, [True, True], [0, 1]]), [['a', None], ['a', 3]])
check('parent null', solve([[7], [0], {'7': 'a'}, {'a': [2]}, {'a': [True]}, [False], [0]]), [None])
check('repeat row', solve([[7], [0], {'7': 'a'}, {'a': [2]}, {'a': [True]}, [True], [0, 0]]), [['a', 2], ['a', 2]])
check('empty selection', solve([[7], [0], {'7': 'a'}, {'a': [2]}, {'a': [True]}, [True], []]), [])
check('second tag', solve([[9], [1], {'7': 'a', '9': 'b'}, {'a': [2, 3], 'b': [4, 5]}, {'a': [True, True], 'b': [True, True]}, [True], [0]]), [['b', 5]])
elif N == 3:
check('mixed tags', solve([[7, 9, 7], [1, 0, 0], {'7': 'a', '9': 'b'}, {'a': [3, 4, 5], 'b': [6, 7, 8]}, {'a': [True, True, True], 'b': [True, True, True]}, [True, True, True], [2, 0, 1]]), [['a', 3], ['a', 4], ['b', 6]])
check('child null', solve([[7, 7], [0, 1], {'7': 'a'}, {'a': [3, 4]}, {'a': [False, True]}, [True, True], [0, 1]]), [['a', None], ['a', 4]])
check('parent null', solve([[7], [0], {'7': 'a'}, {'a': [3]}, {'a': [True]}, [False], [0]]), [None])
check('repeat row', solve([[7], [0], {'7': 'a'}, {'a': [3]}, {'a': [True]}, [True], [0, 0]]), [['a', 3], ['a', 3]])
check('empty selection', solve([[7], [0], {'7': 'a'}, {'a': [3]}, {'a': [True]}, [True], []]), [])
check('second tag', solve([[9], [1], {'7': 'a', '9': 'b'}, {'a': [3, 4], 'b': [5, 6]}, {'a': [True, True], 'b': [True, True]}, [True], [0]]), [['b', 6]])
elif N == 4:
check('mixed tags', solve([[7, 9, 7], [1, 0, 0], {'7': 'a', '9': 'b'}, {'a': [4, 5, 6], 'b': [7, 8, 9]}, {'a': [True, True, True], 'b': [True, True, True]}, [True, True, True], [2, 0, 1]]), [['a', 4], ['a', 5], ['b', 7]])
check('child null', solve([[7, 7], [0, 1], {'7': 'a'}, {'a': [4, 5]}, {'a': [False, True]}, [True, True], [0, 1]]), [['a', None], ['a', 5]])
check('parent null', solve([[7], [0], {'7': 'a'}, {'a': [4]}, {'a': [True]}, [False], [0]]), [None])
check('repeat row', solve([[7], [0], {'7': 'a'}, {'a': [4]}, {'a': [True]}, [True], [0, 0]]), [['a', 4], ['a', 4]])
check('empty selection', solve([[7], [0], {'7': 'a'}, {'a': [4]}, {'a': [True]}, [True], []]), [])
check('second tag', solve([[9], [1], {'7': 'a', '9': 'b'}, {'a': [4, 5], 'b': [6, 7]}, {'a': [True, True], 'b': [True, True]}, [True], [0]]), [['b', 7]])
elif N == 5:
check('mixed tags', solve([[7, 9, 7], [1, 0, 0], {'7': 'a', '9': 'b'}, {'a': [5, 6, 7], 'b': [8, 9, 10]}, {'a': [True, True, True], 'b': [True, True, True]}, [True, True, True], [2, 0, 1]]), [['a', 5], ['a', 6], ['b', 8]])
check('child null', solve([[7, 7], [0, 1], {'7': 'a'}, {'a': [5, 6]}, {'a': [False, True]}, [True, True], [0, 1]]), [['a', None], ['a', 6]])
check('parent null', solve([[7], [0], {'7': 'a'}, {'a': [5]}, {'a': [True]}, [False], [0]]), [None])
check('repeat row', solve([[7], [0], {'7': 'a'}, {'a': [5]}, {'a': [True]}, [True], [0, 0]]), [['a', 5], ['a', 5]])
check('empty selection', solve([[7], [0], {'7': 'a'}, {'a': [5]}, {'a': [True]}, [True], []]), [])
check('second tag', solve([[9], [1], {'7': 'a', '9': 'b'}, {'a': [5, 6], 'b': [7, 8]}, {'a': [True, True], 'b': [True, True]}, [True], [0]]), [['b', 8]])
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 |
|---|---|---|---|
| mixed tags | [['a', 2], ['b', 4], ['a', 1]] | [['a', 1], ['a', 2], ['b', 4]] | Failed |
| child null | [['a', None], ['a', 2]] | [['a', None], ['a', 2]] | Passed |
| parent null | [None] | [None] | Passed |
| repeat row | [['a', 1], ['a', 1]] | [['a', 1], ['a', 1]] | Passed |
| empty selection | [] | [] | Passed |
| second tag | [['b', 4]] | [['b', 4]] | Passed |
SHA-256 / 1f6bd609cc7fd954fdc7ed2cc7a290290cc75be07976a8452571cd86384c1a9d
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(d):
try:
tags,offsets,names,children,valid,parent,selection=d
out=[]
for row in dict.fromkeys(selection):
tag=tags[row]
name=names[str(tag)]
offset=offsets[row]
value=children[name][offset] if valid[name][offset] else None
out.append([name,value] if parent[row] else None)
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('mixed tags', solve([[7, 9, 7], [1, 0, 0], {'7': 'a', '9': 'b'}, {'a': [1, 2, 3], 'b': [4, 5, 6]}, {'a': [True, True, True], 'b': [True, True, True]}, [True, True, True], [2, 0, 1]]), [['a', 1], ['a', 2], ['b', 4]])
check('child null', solve([[7, 7], [0, 1], {'7': 'a'}, {'a': [1, 2]}, {'a': [False, True]}, [True, True], [0, 1]]), [['a', None], ['a', 2]])
check('parent null', solve([[7], [0], {'7': 'a'}, {'a': [1]}, {'a': [True]}, [False], [0]]), [None])
check('repeat row', solve([[7], [0], {'7': 'a'}, {'a': [1]}, {'a': [True]}, [True], [0, 0]]), [['a', 1], ['a', 1]])
check('empty selection', solve([[7], [0], {'7': 'a'}, {'a': [1]}, {'a': [True]}, [True], []]), [])
check('second tag', solve([[9], [1], {'7': 'a', '9': 'b'}, {'a': [1, 2], 'b': [3, 4]}, {'a': [True, True], 'b': [True, True]}, [True], [0]]), [['b', 4]])
elif N == 2:
check('mixed tags', solve([[7, 9, 7], [1, 0, 0], {'7': 'a', '9': 'b'}, {'a': [2, 3, 4], 'b': [5, 6, 7]}, {'a': [True, True, True], 'b': [True, True, True]}, [True, True, True], [2, 0, 1]]), [['a', 2], ['a', 3], ['b', 5]])
check('child null', solve([[7, 7], [0, 1], {'7': 'a'}, {'a': [2, 3]}, {'a': [False, True]}, [True, True], [0, 1]]), [['a', None], ['a', 3]])
check('parent null', solve([[7], [0], {'7': 'a'}, {'a': [2]}, {'a': [True]}, [False], [0]]), [None])
check('repeat row', solve([[7], [0], {'7': 'a'}, {'a': [2]}, {'a': [True]}, [True], [0, 0]]), [['a', 2], ['a', 2]])
check('empty selection', solve([[7], [0], {'7': 'a'}, {'a': [2]}, {'a': [True]}, [True], []]), [])
check('second tag', solve([[9], [1], {'7': 'a', '9': 'b'}, {'a': [2, 3], 'b': [4, 5]}, {'a': [True, True], 'b': [True, True]}, [True], [0]]), [['b', 5]])
elif N == 3:
check('mixed tags', solve([[7, 9, 7], [1, 0, 0], {'7': 'a', '9': 'b'}, {'a': [3, 4, 5], 'b': [6, 7, 8]}, {'a': [True, True, True], 'b': [True, True, True]}, [True, True, True], [2, 0, 1]]), [['a', 3], ['a', 4], ['b', 6]])
check('child null', solve([[7, 7], [0, 1], {'7': 'a'}, {'a': [3, 4]}, {'a': [False, True]}, [True, True], [0, 1]]), [['a', None], ['a', 4]])
check('parent null', solve([[7], [0], {'7': 'a'}, {'a': [3]}, {'a': [True]}, [False], [0]]), [None])
check('repeat row', solve([[7], [0], {'7': 'a'}, {'a': [3]}, {'a': [True]}, [True], [0, 0]]), [['a', 3], ['a', 3]])
check('empty selection', solve([[7], [0], {'7': 'a'}, {'a': [3]}, {'a': [True]}, [True], []]), [])
check('second tag', solve([[9], [1], {'7': 'a', '9': 'b'}, {'a': [3, 4], 'b': [5, 6]}, {'a': [True, True], 'b': [True, True]}, [True], [0]]), [['b', 6]])
elif N == 4:
check('mixed tags', solve([[7, 9, 7], [1, 0, 0], {'7': 'a', '9': 'b'}, {'a': [4, 5, 6], 'b': [7, 8, 9]}, {'a': [True, True, True], 'b': [True, True, True]}, [True, True, True], [2, 0, 1]]), [['a', 4], ['a', 5], ['b', 7]])
check('child null', solve([[7, 7], [0, 1], {'7': 'a'}, {'a': [4, 5]}, {'a': [False, True]}, [True, True], [0, 1]]), [['a', None], ['a', 5]])
check('parent null', solve([[7], [0], {'7': 'a'}, {'a': [4]}, {'a': [True]}, [False], [0]]), [None])
check('repeat row', solve([[7], [0], {'7': 'a'}, {'a': [4]}, {'a': [True]}, [True], [0, 0]]), [['a', 4], ['a', 4]])
check('empty selection', solve([[7], [0], {'7': 'a'}, {'a': [4]}, {'a': [True]}, [True], []]), [])
check('second tag', solve([[9], [1], {'7': 'a', '9': 'b'}, {'a': [4, 5], 'b': [6, 7]}, {'a': [True, True], 'b': [True, True]}, [True], [0]]), [['b', 7]])
elif N == 5:
check('mixed tags', solve([[7, 9, 7], [1, 0, 0], {'7': 'a', '9': 'b'}, {'a': [5, 6, 7], 'b': [8, 9, 10]}, {'a': [True, True, True], 'b': [True, True, True]}, [True, True, True], [2, 0, 1]]), [['a', 5], ['a', 6], ['b', 8]])
check('child null', solve([[7, 7], [0, 1], {'7': 'a'}, {'a': [5, 6]}, {'a': [False, True]}, [True, True], [0, 1]]), [['a', None], ['a', 6]])
check('parent null', solve([[7], [0], {'7': 'a'}, {'a': [5]}, {'a': [True]}, [False], [0]]), [None])
check('repeat row', solve([[7], [0], {'7': 'a'}, {'a': [5]}, {'a': [True]}, [True], [0, 0]]), [['a', 5], ['a', 5]])
check('empty selection', solve([[7], [0], {'7': 'a'}, {'a': [5]}, {'a': [True]}, [True], []]), [])
check('second tag', solve([[9], [1], {'7': 'a', '9': 'b'}, {'a': [5, 6], 'b': [7, 8]}, {'a': [True, True], 'b': [True, True]}, [True], [0]]), [['b', 8]])
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 |
|---|---|---|---|
| mixed tags | [['a', 1], ['a', 2], ['b', 4]] | [['a', 1], ['a', 2], ['b', 4]] | Passed |
| child null | [['a', None], ['a', 2]] | [['a', None], ['a', 2]] | Passed |
| parent null | [None] | [None] | Passed |
| repeat row | [['a', 1]] | [['a', 1], ['a', 1]] | Failed |
| empty selection | [] | [] | Passed |
| second tag | [['b', 4]] | [['b', 4]] | Passed |
SHA-256 / 32db637a02f6ee98d5250281f545c249294a043d0f8f84023253eead38de5e14
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 6 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
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:13.047233+00:00.
Case digest / d2ff23a76744d1eddd15453324838a9037f1624b0d9ed1eafabe14f7edb39dd2