FAILURE MAP
← Case archive

FA-44691 / Data systems / Open access

Insertions carry the old value instead of the new value · case 01

Insertions carry the old value instead of the new value.

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

ROOT CAUSE

delta-filter-before-after: Insertions carry the old value instead of the new value.

THE FAILURE

delta-filter-before-after: Insertions carry the old value instead of the new value.

Unsuccessful approach: The predicate threshold is not the inserted value.

Case contract

Convert a sequence of [id,before,after] updates into signed filtered rows, with None denoting absent row. The predicate is value>=cutoff. Emit qualifying before-images negatively before qualifying after-images positively; suppress unchanged qualifying values.

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:
        cutoff,updates=d
        out=[]
        for ident,before,after in updates:
            old=before is not None and before>=cutoff
            new=after is not None and after>=cutoff
            if old and new and before==after: continue
            if old: out.append([ident,before,-1])
            if new: out.append([ident,before,1])
        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('leaves filter', solve([1, [[7, 3, 0]]]), [[7, 3, -1]])
    check('enters filter', solve([1, [[7, 0, 3]]]), [[7, 3, 1]])
    check('changes within filter', solve([1, [[7, 2, 3]]]), [[7, 2, -1], [7, 3, 1]])
    check('unchanged', solve([1, [[7, 1, 1]]]), [])
    check('insert', solve([1, [[7, None, 2]]]), [[7, 2, 1]])
    check('delete', solve([1, [[7, 2, None]]]), [[7, 2, -1]])
    check('outside both', solve([1, [[7, -1, 0]]]), [])
    check('no updates', solve([1, []]), [])
elif N == 2:
    check('leaves filter', solve([2, [[7, 4, 1]]]), [[7, 4, -1]])
    check('enters filter', solve([2, [[7, 1, 4]]]), [[7, 4, 1]])
    check('changes within filter', solve([2, [[7, 3, 4]]]), [[7, 3, -1], [7, 4, 1]])
    check('unchanged', solve([2, [[7, 2, 2]]]), [])
    check('insert', solve([2, [[7, None, 3]]]), [[7, 3, 1]])
    check('delete', solve([2, [[7, 3, None]]]), [[7, 3, -1]])
    check('outside both', solve([2, [[7, 0, 1]]]), [])
    check('no updates', solve([2, []]), [])
elif N == 3:
    check('leaves filter', solve([3, [[7, 5, 2]]]), [[7, 5, -1]])
    check('enters filter', solve([3, [[7, 2, 5]]]), [[7, 5, 1]])
    check('changes within filter', solve([3, [[7, 4, 5]]]), [[7, 4, -1], [7, 5, 1]])
    check('unchanged', solve([3, [[7, 3, 3]]]), [])
    check('insert', solve([3, [[7, None, 4]]]), [[7, 4, 1]])
    check('delete', solve([3, [[7, 4, None]]]), [[7, 4, -1]])
    check('outside both', solve([3, [[7, 1, 2]]]), [])
    check('no updates', solve([3, []]), [])
elif N == 4:
    check('leaves filter', solve([4, [[7, 6, 3]]]), [[7, 6, -1]])
    check('enters filter', solve([4, [[7, 3, 6]]]), [[7, 6, 1]])
    check('changes within filter', solve([4, [[7, 5, 6]]]), [[7, 5, -1], [7, 6, 1]])
    check('unchanged', solve([4, [[7, 4, 4]]]), [])
    check('insert', solve([4, [[7, None, 5]]]), [[7, 5, 1]])
    check('delete', solve([4, [[7, 5, None]]]), [[7, 5, -1]])
    check('outside both', solve([4, [[7, 2, 3]]]), [])
    check('no updates', solve([4, []]), [])
elif N == 5:
    check('leaves filter', solve([5, [[7, 7, 4]]]), [[7, 7, -1]])
    check('enters filter', solve([5, [[7, 4, 7]]]), [[7, 7, 1]])
    check('changes within filter', solve([5, [[7, 6, 7]]]), [[7, 6, -1], [7, 7, 1]])
    check('unchanged', solve([5, [[7, 5, 5]]]), [])
    check('insert', solve([5, [[7, None, 6]]]), [[7, 6, 1]])
    check('delete', solve([5, [[7, 6, None]]]), [[7, 6, -1]])
    check('outside both', solve([5, [[7, 3, 4]]]), [])
    check('no updates', solve([5, []]), [])
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
leaves filter[[7, 3, -1]][[7, 3, -1]]Passed
enters filter[[7, 0, 1]][[7, 3, 1]]Failed
changes within filter[[7, 2, -1], [7, 2, 1]][[7, 2, -1], [7, 3, 1]]Failed
unchanged[][]Passed
insert[[7, None, 1]][[7, 2, 1]]Failed
delete[[7, 2, -1]][[7, 2, -1]]Passed
outside both[][]Passed
no updates[][]Passed

SHA-256 / d39d39e1bc78f68dc047c523977d9519b6a03ec775bfd98d87b70cf99847a155

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(d):
    try:
        cutoff,updates=d
        out=[]
        for ident,before,after in updates:
            old=before is not None and before>=cutoff
            new=after is not None and after>=cutoff
            if old and new and before==after: continue
            if old: out.append([ident,before,-1])
            if new: out.append([ident,cutoff,1])
        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('leaves filter', solve([1, [[7, 3, 0]]]), [[7, 3, -1]])
    check('enters filter', solve([1, [[7, 0, 3]]]), [[7, 3, 1]])
    check('changes within filter', solve([1, [[7, 2, 3]]]), [[7, 2, -1], [7, 3, 1]])
    check('unchanged', solve([1, [[7, 1, 1]]]), [])
    check('insert', solve([1, [[7, None, 2]]]), [[7, 2, 1]])
    check('delete', solve([1, [[7, 2, None]]]), [[7, 2, -1]])
    check('outside both', solve([1, [[7, -1, 0]]]), [])
    check('no updates', solve([1, []]), [])
elif N == 2:
    check('leaves filter', solve([2, [[7, 4, 1]]]), [[7, 4, -1]])
    check('enters filter', solve([2, [[7, 1, 4]]]), [[7, 4, 1]])
    check('changes within filter', solve([2, [[7, 3, 4]]]), [[7, 3, -1], [7, 4, 1]])
    check('unchanged', solve([2, [[7, 2, 2]]]), [])
    check('insert', solve([2, [[7, None, 3]]]), [[7, 3, 1]])
    check('delete', solve([2, [[7, 3, None]]]), [[7, 3, -1]])
    check('outside both', solve([2, [[7, 0, 1]]]), [])
    check('no updates', solve([2, []]), [])
elif N == 3:
    check('leaves filter', solve([3, [[7, 5, 2]]]), [[7, 5, -1]])
    check('enters filter', solve([3, [[7, 2, 5]]]), [[7, 5, 1]])
    check('changes within filter', solve([3, [[7, 4, 5]]]), [[7, 4, -1], [7, 5, 1]])
    check('unchanged', solve([3, [[7, 3, 3]]]), [])
    check('insert', solve([3, [[7, None, 4]]]), [[7, 4, 1]])
    check('delete', solve([3, [[7, 4, None]]]), [[7, 4, -1]])
    check('outside both', solve([3, [[7, 1, 2]]]), [])
    check('no updates', solve([3, []]), [])
elif N == 4:
    check('leaves filter', solve([4, [[7, 6, 3]]]), [[7, 6, -1]])
    check('enters filter', solve([4, [[7, 3, 6]]]), [[7, 6, 1]])
    check('changes within filter', solve([4, [[7, 5, 6]]]), [[7, 5, -1], [7, 6, 1]])
    check('unchanged', solve([4, [[7, 4, 4]]]), [])
    check('insert', solve([4, [[7, None, 5]]]), [[7, 5, 1]])
    check('delete', solve([4, [[7, 5, None]]]), [[7, 5, -1]])
    check('outside both', solve([4, [[7, 2, 3]]]), [])
    check('no updates', solve([4, []]), [])
elif N == 5:
    check('leaves filter', solve([5, [[7, 7, 4]]]), [[7, 7, -1]])
    check('enters filter', solve([5, [[7, 4, 7]]]), [[7, 7, 1]])
    check('changes within filter', solve([5, [[7, 6, 7]]]), [[7, 6, -1], [7, 7, 1]])
    check('unchanged', solve([5, [[7, 5, 5]]]), [])
    check('insert', solve([5, [[7, None, 6]]]), [[7, 6, 1]])
    check('delete', solve([5, [[7, 6, None]]]), [[7, 6, -1]])
    check('outside both', solve([5, [[7, 3, 4]]]), [])
    check('no updates', solve([5, []]), [])
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
leaves filter[[7, 3, -1]][[7, 3, -1]]Passed
enters filter[[7, 1, 1]][[7, 3, 1]]Failed
changes within filter[[7, 2, -1], [7, 1, 1]][[7, 2, -1], [7, 3, 1]]Failed
unchanged[][]Passed
insert[[7, 1, 1]][[7, 2, 1]]Failed
delete[[7, 2, -1]][[7, 2, -1]]Passed
outside both[][]Passed
no updates[][]Passed

SHA-256 / 402f6e69269b772b8545f151d0fdba7f73f3486f2d0bfe6fb09a0ba87b537981

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

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:14.755280+00:00.

Case digest / 537a615201483ecb92510cb3e5bcdd9546120012a0ca3992028503020f2fa735