FAILURE MAP
← Case archive

FA-44701 / Data systems / Open access

A keyed upsert looks up its old row by new key instead of identity · case 01

A keyed upsert looks up its old row by new key instead of identity.

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

ROOT CAUSE

key-changing-upsert: A keyed upsert looks up its old row by new key instead of identity.

VERIFIED REPAIR

Preserve the stated physical representation and operation order: Maintain an identity-indexed keyed table while applying [id,newkey,newvalue] upserts. A moved identity retracts its old key/value before adding the new row. Identical upserts emit no change. State and emitted changelog preserve identity distinctions.

Unsuccessful approach: Searching by new key retracts another identity and misses moved rows.

Case contract

Maintain an identity-indexed keyed table while applying [id,newkey,newvalue] upserts. A moved identity retracts its old key/value before adding the new row. Identical upserts emit no change. State and emitted changelog preserve identity distinctions.

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:
        initial,updates=d
        state={ident:[key,value] for ident,key,value in initial}
        out=[]
        for ident,key,value in updates:
            previous=state.get(key)
            if previous==[key,value]: continue
            if previous is not None: out.append([ident,previous[0],previous[1],-1])
            state[ident]=[key,value]
            out.append([ident,key,value,1])
        return [sorted([[i,k,v] for i,(k,v) in state.items()]),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('move key', solve([[[10, 1, 1]], [[10, 2, 2]]]), [[[10, 2, 2]], [[10, 1, 1, -1], [10, 2, 2, 1]]])
    check('same key changed value', solve([[[10, 1, 1]], [[10, 1, 2]]]), [[[10, 1, 2]], [[10, 1, 1, -1], [10, 1, 2, 1]]])
    check('same value moved', solve([[[10, 1, 1]], [[10, 2, 1]]]), [[[10, 2, 1]], [[10, 1, 1, -1], [10, 2, 1, 1]]])
    check('insert new identity', solve([[[10, 1, 1]], [[11, 1, 2]]]), [[[10, 1, 1], [11, 1, 2]], [[11, 1, 2, 1]]])
    check('identical upsert', solve([[[10, 1, 1]], [[10, 1, 1]]]), [[[10, 1, 1]], []])
    check('two updates', solve([[[10, 1, 1]], [[10, 2, 2], [10, 3, 3]]]), [[[10, 3, 3]], [[10, 1, 1, -1], [10, 2, 2, 1], [10, 2, 2, -1], [10, 3, 3, 1]]])
    check('empty table', solve([[], []]), [[], []])
elif N == 2:
    check('move key', solve([[[10, 1, 2]], [[10, 2, 3]]]), [[[10, 2, 3]], [[10, 1, 2, -1], [10, 2, 3, 1]]])
    check('same key changed value', solve([[[10, 1, 2]], [[10, 1, 3]]]), [[[10, 1, 3]], [[10, 1, 2, -1], [10, 1, 3, 1]]])
    check('same value moved', solve([[[10, 1, 2]], [[10, 2, 2]]]), [[[10, 2, 2]], [[10, 1, 2, -1], [10, 2, 2, 1]]])
    check('insert new identity', solve([[[10, 1, 2]], [[11, 1, 3]]]), [[[10, 1, 2], [11, 1, 3]], [[11, 1, 3, 1]]])
    check('identical upsert', solve([[[10, 1, 2]], [[10, 1, 2]]]), [[[10, 1, 2]], []])
    check('two updates', solve([[[10, 1, 2]], [[10, 2, 3], [10, 3, 4]]]), [[[10, 3, 4]], [[10, 1, 2, -1], [10, 2, 3, 1], [10, 2, 3, -1], [10, 3, 4, 1]]])
    check('empty table', solve([[], []]), [[], []])
elif N == 3:
    check('move key', solve([[[10, 1, 3]], [[10, 2, 4]]]), [[[10, 2, 4]], [[10, 1, 3, -1], [10, 2, 4, 1]]])
    check('same key changed value', solve([[[10, 1, 3]], [[10, 1, 4]]]), [[[10, 1, 4]], [[10, 1, 3, -1], [10, 1, 4, 1]]])
    check('same value moved', solve([[[10, 1, 3]], [[10, 2, 3]]]), [[[10, 2, 3]], [[10, 1, 3, -1], [10, 2, 3, 1]]])
    check('insert new identity', solve([[[10, 1, 3]], [[11, 1, 4]]]), [[[10, 1, 3], [11, 1, 4]], [[11, 1, 4, 1]]])
    check('identical upsert', solve([[[10, 1, 3]], [[10, 1, 3]]]), [[[10, 1, 3]], []])
    check('two updates', solve([[[10, 1, 3]], [[10, 2, 4], [10, 3, 5]]]), [[[10, 3, 5]], [[10, 1, 3, -1], [10, 2, 4, 1], [10, 2, 4, -1], [10, 3, 5, 1]]])
    check('empty table', solve([[], []]), [[], []])
elif N == 4:
    check('move key', solve([[[10, 1, 4]], [[10, 2, 5]]]), [[[10, 2, 5]], [[10, 1, 4, -1], [10, 2, 5, 1]]])
    check('same key changed value', solve([[[10, 1, 4]], [[10, 1, 5]]]), [[[10, 1, 5]], [[10, 1, 4, -1], [10, 1, 5, 1]]])
    check('same value moved', solve([[[10, 1, 4]], [[10, 2, 4]]]), [[[10, 2, 4]], [[10, 1, 4, -1], [10, 2, 4, 1]]])
    check('insert new identity', solve([[[10, 1, 4]], [[11, 1, 5]]]), [[[10, 1, 4], [11, 1, 5]], [[11, 1, 5, 1]]])
    check('identical upsert', solve([[[10, 1, 4]], [[10, 1, 4]]]), [[[10, 1, 4]], []])
    check('two updates', solve([[[10, 1, 4]], [[10, 2, 5], [10, 3, 6]]]), [[[10, 3, 6]], [[10, 1, 4, -1], [10, 2, 5, 1], [10, 2, 5, -1], [10, 3, 6, 1]]])
    check('empty table', solve([[], []]), [[], []])
elif N == 5:
    check('move key', solve([[[10, 1, 5]], [[10, 2, 6]]]), [[[10, 2, 6]], [[10, 1, 5, -1], [10, 2, 6, 1]]])
    check('same key changed value', solve([[[10, 1, 5]], [[10, 1, 6]]]), [[[10, 1, 6]], [[10, 1, 5, -1], [10, 1, 6, 1]]])
    check('same value moved', solve([[[10, 1, 5]], [[10, 2, 5]]]), [[[10, 2, 5]], [[10, 1, 5, -1], [10, 2, 5, 1]]])
    check('insert new identity', solve([[[10, 1, 5]], [[11, 1, 6]]]), [[[10, 1, 5], [11, 1, 6]], [[11, 1, 6, 1]]])
    check('identical upsert', solve([[[10, 1, 5]], [[10, 1, 5]]]), [[[10, 1, 5]], []])
    check('two updates', solve([[[10, 1, 5]], [[10, 2, 6], [10, 3, 7]]]), [[[10, 3, 7]], [[10, 1, 5, -1], [10, 2, 6, 1], [10, 2, 6, -1], [10, 3, 7, 1]]])
    check('empty table', solve([[], []]), [[], []])
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
move key[[[10, 2, 2]], [[10, 2, 2, 1]]][[[10, 2, 2]], [[10, 1, 1, -1], [10, 2, 2, 1]]]Failed
same key changed value[[[10, 1, 2]], [[10, 1, 2, 1]]][[[10, 1, 2]], [[10, 1, 1, -1], [10, 1, 2, 1]]]Failed
same value moved[[[10, 2, 1]], [[10, 2, 1, 1]]][[[10, 2, 1]], [[10, 1, 1, -1], [10, 2, 1, 1]]]Failed
insert new identity[[[10, 1, 1], [11, 1, 2]], [[11, 1, 2, 1]]][[[10, 1, 1], [11, 1, 2]], [[11, 1, 2, 1]]]Passed
identical upsert[[[10, 1, 1]], [[10, 1, 1, 1]]][[[10, 1, 1]], []]Failed
two updates[[[10, 3, 3]], [[10, 2, 2, 1], [10, 3, 3, 1]]][[[10, 3, 3]], [[10, 1, 1, -1], [10, 2, 2, 1], [10, 2, 2, -1], [10, 3, 3, 1]]]Failed
empty table[[], []][[], []]Passed

SHA-256 / 746512e8e56b5c115a10da53e643fe4d78754d7cc7a5f0ab532aa52f26518cf3

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(d):
    try:
        initial,updates=d
        state={ident:[key,value] for ident,key,value in initial}
        out=[]
        for ident,key,value in updates:
            previous=next((r for r in state.values() if r[0]==key),None)
            if previous==[key,value]: continue
            if previous is not None: out.append([ident,previous[0],previous[1],-1])
            state[ident]=[key,value]
            out.append([ident,key,value,1])
        return [sorted([[i,k,v] for i,(k,v) in state.items()]),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('move key', solve([[[10, 1, 1]], [[10, 2, 2]]]), [[[10, 2, 2]], [[10, 1, 1, -1], [10, 2, 2, 1]]])
    check('same key changed value', solve([[[10, 1, 1]], [[10, 1, 2]]]), [[[10, 1, 2]], [[10, 1, 1, -1], [10, 1, 2, 1]]])
    check('same value moved', solve([[[10, 1, 1]], [[10, 2, 1]]]), [[[10, 2, 1]], [[10, 1, 1, -1], [10, 2, 1, 1]]])
    check('insert new identity', solve([[[10, 1, 1]], [[11, 1, 2]]]), [[[10, 1, 1], [11, 1, 2]], [[11, 1, 2, 1]]])
    check('identical upsert', solve([[[10, 1, 1]], [[10, 1, 1]]]), [[[10, 1, 1]], []])
    check('two updates', solve([[[10, 1, 1]], [[10, 2, 2], [10, 3, 3]]]), [[[10, 3, 3]], [[10, 1, 1, -1], [10, 2, 2, 1], [10, 2, 2, -1], [10, 3, 3, 1]]])
    check('empty table', solve([[], []]), [[], []])
elif N == 2:
    check('move key', solve([[[10, 1, 2]], [[10, 2, 3]]]), [[[10, 2, 3]], [[10, 1, 2, -1], [10, 2, 3, 1]]])
    check('same key changed value', solve([[[10, 1, 2]], [[10, 1, 3]]]), [[[10, 1, 3]], [[10, 1, 2, -1], [10, 1, 3, 1]]])
    check('same value moved', solve([[[10, 1, 2]], [[10, 2, 2]]]), [[[10, 2, 2]], [[10, 1, 2, -1], [10, 2, 2, 1]]])
    check('insert new identity', solve([[[10, 1, 2]], [[11, 1, 3]]]), [[[10, 1, 2], [11, 1, 3]], [[11, 1, 3, 1]]])
    check('identical upsert', solve([[[10, 1, 2]], [[10, 1, 2]]]), [[[10, 1, 2]], []])
    check('two updates', solve([[[10, 1, 2]], [[10, 2, 3], [10, 3, 4]]]), [[[10, 3, 4]], [[10, 1, 2, -1], [10, 2, 3, 1], [10, 2, 3, -1], [10, 3, 4, 1]]])
    check('empty table', solve([[], []]), [[], []])
elif N == 3:
    check('move key', solve([[[10, 1, 3]], [[10, 2, 4]]]), [[[10, 2, 4]], [[10, 1, 3, -1], [10, 2, 4, 1]]])
    check('same key changed value', solve([[[10, 1, 3]], [[10, 1, 4]]]), [[[10, 1, 4]], [[10, 1, 3, -1], [10, 1, 4, 1]]])
    check('same value moved', solve([[[10, 1, 3]], [[10, 2, 3]]]), [[[10, 2, 3]], [[10, 1, 3, -1], [10, 2, 3, 1]]])
    check('insert new identity', solve([[[10, 1, 3]], [[11, 1, 4]]]), [[[10, 1, 3], [11, 1, 4]], [[11, 1, 4, 1]]])
    check('identical upsert', solve([[[10, 1, 3]], [[10, 1, 3]]]), [[[10, 1, 3]], []])
    check('two updates', solve([[[10, 1, 3]], [[10, 2, 4], [10, 3, 5]]]), [[[10, 3, 5]], [[10, 1, 3, -1], [10, 2, 4, 1], [10, 2, 4, -1], [10, 3, 5, 1]]])
    check('empty table', solve([[], []]), [[], []])
elif N == 4:
    check('move key', solve([[[10, 1, 4]], [[10, 2, 5]]]), [[[10, 2, 5]], [[10, 1, 4, -1], [10, 2, 5, 1]]])
    check('same key changed value', solve([[[10, 1, 4]], [[10, 1, 5]]]), [[[10, 1, 5]], [[10, 1, 4, -1], [10, 1, 5, 1]]])
    check('same value moved', solve([[[10, 1, 4]], [[10, 2, 4]]]), [[[10, 2, 4]], [[10, 1, 4, -1], [10, 2, 4, 1]]])
    check('insert new identity', solve([[[10, 1, 4]], [[11, 1, 5]]]), [[[10, 1, 4], [11, 1, 5]], [[11, 1, 5, 1]]])
    check('identical upsert', solve([[[10, 1, 4]], [[10, 1, 4]]]), [[[10, 1, 4]], []])
    check('two updates', solve([[[10, 1, 4]], [[10, 2, 5], [10, 3, 6]]]), [[[10, 3, 6]], [[10, 1, 4, -1], [10, 2, 5, 1], [10, 2, 5, -1], [10, 3, 6, 1]]])
    check('empty table', solve([[], []]), [[], []])
elif N == 5:
    check('move key', solve([[[10, 1, 5]], [[10, 2, 6]]]), [[[10, 2, 6]], [[10, 1, 5, -1], [10, 2, 6, 1]]])
    check('same key changed value', solve([[[10, 1, 5]], [[10, 1, 6]]]), [[[10, 1, 6]], [[10, 1, 5, -1], [10, 1, 6, 1]]])
    check('same value moved', solve([[[10, 1, 5]], [[10, 2, 5]]]), [[[10, 2, 5]], [[10, 1, 5, -1], [10, 2, 5, 1]]])
    check('insert new identity', solve([[[10, 1, 5]], [[11, 1, 6]]]), [[[10, 1, 5], [11, 1, 6]], [[11, 1, 6, 1]]])
    check('identical upsert', solve([[[10, 1, 5]], [[10, 1, 5]]]), [[[10, 1, 5]], []])
    check('two updates', solve([[[10, 1, 5]], [[10, 2, 6], [10, 3, 7]]]), [[[10, 3, 7]], [[10, 1, 5, -1], [10, 2, 6, 1], [10, 2, 6, -1], [10, 3, 7, 1]]])
    check('empty table', solve([[], []]), [[], []])
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
move key[[[10, 2, 2]], [[10, 2, 2, 1]]][[[10, 2, 2]], [[10, 1, 1, -1], [10, 2, 2, 1]]]Failed
same key changed value[[[10, 1, 2]], [[10, 1, 1, -1], [10, 1, 2, 1]]][[[10, 1, 2]], [[10, 1, 1, -1], [10, 1, 2, 1]]]Passed
same value moved[[[10, 2, 1]], [[10, 2, 1, 1]]][[[10, 2, 1]], [[10, 1, 1, -1], [10, 2, 1, 1]]]Failed
insert new identity[[[10, 1, 1], [11, 1, 2]], [[11, 1, 1, -1], [11, 1, 2, 1]]][[[10, 1, 1], [11, 1, 2]], [[11, 1, 2, 1]]]Failed
identical upsert[[[10, 1, 1]], []][[[10, 1, 1]], []]Passed
two updates[[[10, 3, 3]], [[10, 2, 2, 1], [10, 3, 3, 1]]][[[10, 3, 3]], [[10, 1, 1, -1], [10, 2, 2, 1], [10, 2, 2, -1], [10, 3, 3, 1]]]Failed
empty table[[], []][[], []]Passed

SHA-256 / 67c0e0ac8005f62ec83ed4c7603308b9ddca902247857bd52da4f59626af3ab1

3 / The verified repair

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

N = 1
observations = []
def solve(d):
    try:
        initial,updates=d
        state={ident:[key,value] for ident,key,value in initial}
        out=[]
        for ident,key,value in updates:
            previous=state.get(ident)
            if previous==[key,value]: continue
            if previous is not None: out.append([ident,previous[0],previous[1],-1])
            state[ident]=[key,value]
            out.append([ident,key,value,1])
        return [sorted([[i,k,v] for i,(k,v) in state.items()]),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('move key', solve([[[10, 1, 1]], [[10, 2, 2]]]), [[[10, 2, 2]], [[10, 1, 1, -1], [10, 2, 2, 1]]])
    check('same key changed value', solve([[[10, 1, 1]], [[10, 1, 2]]]), [[[10, 1, 2]], [[10, 1, 1, -1], [10, 1, 2, 1]]])
    check('same value moved', solve([[[10, 1, 1]], [[10, 2, 1]]]), [[[10, 2, 1]], [[10, 1, 1, -1], [10, 2, 1, 1]]])
    check('insert new identity', solve([[[10, 1, 1]], [[11, 1, 2]]]), [[[10, 1, 1], [11, 1, 2]], [[11, 1, 2, 1]]])
    check('identical upsert', solve([[[10, 1, 1]], [[10, 1, 1]]]), [[[10, 1, 1]], []])
    check('two updates', solve([[[10, 1, 1]], [[10, 2, 2], [10, 3, 3]]]), [[[10, 3, 3]], [[10, 1, 1, -1], [10, 2, 2, 1], [10, 2, 2, -1], [10, 3, 3, 1]]])
    check('empty table', solve([[], []]), [[], []])
elif N == 2:
    check('move key', solve([[[10, 1, 2]], [[10, 2, 3]]]), [[[10, 2, 3]], [[10, 1, 2, -1], [10, 2, 3, 1]]])
    check('same key changed value', solve([[[10, 1, 2]], [[10, 1, 3]]]), [[[10, 1, 3]], [[10, 1, 2, -1], [10, 1, 3, 1]]])
    check('same value moved', solve([[[10, 1, 2]], [[10, 2, 2]]]), [[[10, 2, 2]], [[10, 1, 2, -1], [10, 2, 2, 1]]])
    check('insert new identity', solve([[[10, 1, 2]], [[11, 1, 3]]]), [[[10, 1, 2], [11, 1, 3]], [[11, 1, 3, 1]]])
    check('identical upsert', solve([[[10, 1, 2]], [[10, 1, 2]]]), [[[10, 1, 2]], []])
    check('two updates', solve([[[10, 1, 2]], [[10, 2, 3], [10, 3, 4]]]), [[[10, 3, 4]], [[10, 1, 2, -1], [10, 2, 3, 1], [10, 2, 3, -1], [10, 3, 4, 1]]])
    check('empty table', solve([[], []]), [[], []])
elif N == 3:
    check('move key', solve([[[10, 1, 3]], [[10, 2, 4]]]), [[[10, 2, 4]], [[10, 1, 3, -1], [10, 2, 4, 1]]])
    check('same key changed value', solve([[[10, 1, 3]], [[10, 1, 4]]]), [[[10, 1, 4]], [[10, 1, 3, -1], [10, 1, 4, 1]]])
    check('same value moved', solve([[[10, 1, 3]], [[10, 2, 3]]]), [[[10, 2, 3]], [[10, 1, 3, -1], [10, 2, 3, 1]]])
    check('insert new identity', solve([[[10, 1, 3]], [[11, 1, 4]]]), [[[10, 1, 3], [11, 1, 4]], [[11, 1, 4, 1]]])
    check('identical upsert', solve([[[10, 1, 3]], [[10, 1, 3]]]), [[[10, 1, 3]], []])
    check('two updates', solve([[[10, 1, 3]], [[10, 2, 4], [10, 3, 5]]]), [[[10, 3, 5]], [[10, 1, 3, -1], [10, 2, 4, 1], [10, 2, 4, -1], [10, 3, 5, 1]]])
    check('empty table', solve([[], []]), [[], []])
elif N == 4:
    check('move key', solve([[[10, 1, 4]], [[10, 2, 5]]]), [[[10, 2, 5]], [[10, 1, 4, -1], [10, 2, 5, 1]]])
    check('same key changed value', solve([[[10, 1, 4]], [[10, 1, 5]]]), [[[10, 1, 5]], [[10, 1, 4, -1], [10, 1, 5, 1]]])
    check('same value moved', solve([[[10, 1, 4]], [[10, 2, 4]]]), [[[10, 2, 4]], [[10, 1, 4, -1], [10, 2, 4, 1]]])
    check('insert new identity', solve([[[10, 1, 4]], [[11, 1, 5]]]), [[[10, 1, 4], [11, 1, 5]], [[11, 1, 5, 1]]])
    check('identical upsert', solve([[[10, 1, 4]], [[10, 1, 4]]]), [[[10, 1, 4]], []])
    check('two updates', solve([[[10, 1, 4]], [[10, 2, 5], [10, 3, 6]]]), [[[10, 3, 6]], [[10, 1, 4, -1], [10, 2, 5, 1], [10, 2, 5, -1], [10, 3, 6, 1]]])
    check('empty table', solve([[], []]), [[], []])
elif N == 5:
    check('move key', solve([[[10, 1, 5]], [[10, 2, 6]]]), [[[10, 2, 6]], [[10, 1, 5, -1], [10, 2, 6, 1]]])
    check('same key changed value', solve([[[10, 1, 5]], [[10, 1, 6]]]), [[[10, 1, 6]], [[10, 1, 5, -1], [10, 1, 6, 1]]])
    check('same value moved', solve([[[10, 1, 5]], [[10, 2, 5]]]), [[[10, 2, 5]], [[10, 1, 5, -1], [10, 2, 5, 1]]])
    check('insert new identity', solve([[[10, 1, 5]], [[11, 1, 6]]]), [[[10, 1, 5], [11, 1, 6]], [[11, 1, 6, 1]]])
    check('identical upsert', solve([[[10, 1, 5]], [[10, 1, 5]]]), [[[10, 1, 5]], []])
    check('two updates', solve([[[10, 1, 5]], [[10, 2, 6], [10, 3, 7]]]), [[[10, 3, 7]], [[10, 1, 5, -1], [10, 2, 6, 1], [10, 2, 6, -1], [10, 3, 7, 1]]])
    check('empty table', solve([[], []]), [[], []])
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
move key[[[10, 2, 2]], [[10, 1, 1, -1], [10, 2, 2, 1]]][[[10, 2, 2]], [[10, 1, 1, -1], [10, 2, 2, 1]]]Passed
same key changed value[[[10, 1, 2]], [[10, 1, 1, -1], [10, 1, 2, 1]]][[[10, 1, 2]], [[10, 1, 1, -1], [10, 1, 2, 1]]]Passed
same value moved[[[10, 2, 1]], [[10, 1, 1, -1], [10, 2, 1, 1]]][[[10, 2, 1]], [[10, 1, 1, -1], [10, 2, 1, 1]]]Passed
insert new identity[[[10, 1, 1], [11, 1, 2]], [[11, 1, 2, 1]]][[[10, 1, 1], [11, 1, 2]], [[11, 1, 2, 1]]]Passed
identical upsert[[[10, 1, 1]], []][[[10, 1, 1]], []]Passed
two updates[[[10, 3, 3]], [[10, 1, 1, -1], [10, 2, 2, 1], [10, 2, 2, -1], [10, 3, 3, 1]]][[[10, 3, 3]], [[10, 1, 1, -1], [10, 2, 2, 1], [10, 2, 2, -1], [10, 3, 3, 1]]]Passed
empty table[[], []][[], []]Passed

SHA-256 / 6ec85e0927649c58478e8cc1402bee0b2bfec36ed10bf78311d0a77c2b1bfc2f

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

Case digest / 44e976442fbf9e42a04f5d1741050fc3835b7b4a2146c89071871792655ddb4d