FAILURE MAP
← Case archive

FA-45521 / Data systems / Open access

Transaction coalescing emits identities whose net state is unchanged · case 01

Transaction coalescing emits identities whose net state is unchanged.

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

ROOT CAUSE

cdc-transaction-coalesce: Transaction coalescing emits identities whose net state is unchanged.

THE FAILURE

cdc-transaction-coalesce: Transaction coalescing emits identities whose net state is unchanged.

Unsuccessful approach: Suppressing only absent-to-absent rows still emits value-to-same-value no-ops.

Case contract

Coalesce an ordered transaction of [id,before,after] changes to one net before/after per identity. Keep the first before-image and last after-image, order identities by first touch, suppress equal net states including insert-then-delete, and retain None as absence.

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:
        changes=d
        state={}; order=[]
        for ident,before,after in changes:
            if ident not in state:
                state[ident]=[before,after]; order.append(ident)
            else:
                state[ident][1]=after
        return [[ident,state[ident][0],state[ident][1]] for ident in order if True]
    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('two updates', solve([[10, 1, 2], [10, 2, 3]]), [[10, 1, 3]])
    check('insert delete', solve([[10, None, 1], [10, 1, None]]), [])
    check('change revert', solve([[10, 1, 2], [10, 2, 1]]), [])
    check('touch order', solve([[20, 1, 2], [10, 3, 4]]), [[20, 1, 2], [10, 3, 4]])
    check('delete', solve([[10, 1, None]]), [[10, 1, None]])
    check('insert', solve([[10, None, 1]]), [[10, None, 1]])
    check('no transaction', solve([]), [])
elif N == 2:
    check('two updates', solve([[10, 2, 3], [10, 3, 4]]), [[10, 2, 4]])
    check('insert delete', solve([[10, None, 2], [10, 2, None]]), [])
    check('change revert', solve([[10, 2, 3], [10, 3, 2]]), [])
    check('touch order', solve([[20, 2, 3], [10, 4, 5]]), [[20, 2, 3], [10, 4, 5]])
    check('delete', solve([[10, 2, None]]), [[10, 2, None]])
    check('insert', solve([[10, None, 2]]), [[10, None, 2]])
    check('no transaction', solve([]), [])
elif N == 3:
    check('two updates', solve([[10, 3, 4], [10, 4, 5]]), [[10, 3, 5]])
    check('insert delete', solve([[10, None, 3], [10, 3, None]]), [])
    check('change revert', solve([[10, 3, 4], [10, 4, 3]]), [])
    check('touch order', solve([[20, 3, 4], [10, 5, 6]]), [[20, 3, 4], [10, 5, 6]])
    check('delete', solve([[10, 3, None]]), [[10, 3, None]])
    check('insert', solve([[10, None, 3]]), [[10, None, 3]])
    check('no transaction', solve([]), [])
elif N == 4:
    check('two updates', solve([[10, 4, 5], [10, 5, 6]]), [[10, 4, 6]])
    check('insert delete', solve([[10, None, 4], [10, 4, None]]), [])
    check('change revert', solve([[10, 4, 5], [10, 5, 4]]), [])
    check('touch order', solve([[20, 4, 5], [10, 6, 7]]), [[20, 4, 5], [10, 6, 7]])
    check('delete', solve([[10, 4, None]]), [[10, 4, None]])
    check('insert', solve([[10, None, 4]]), [[10, None, 4]])
    check('no transaction', solve([]), [])
elif N == 5:
    check('two updates', solve([[10, 5, 6], [10, 6, 7]]), [[10, 5, 7]])
    check('insert delete', solve([[10, None, 5], [10, 5, None]]), [])
    check('change revert', solve([[10, 5, 6], [10, 6, 5]]), [])
    check('touch order', solve([[20, 5, 6], [10, 7, 8]]), [[20, 5, 6], [10, 7, 8]])
    check('delete', solve([[10, 5, None]]), [[10, 5, None]])
    check('insert', solve([[10, None, 5]]), [[10, None, 5]])
    check('no transaction', 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
two updates[[10, 1, 3]][[10, 1, 3]]Passed
insert delete[[10, None, None]][]Failed
change revert[[10, 1, 1]][]Failed
touch order[[20, 1, 2], [10, 3, 4]][[20, 1, 2], [10, 3, 4]]Passed
delete[[10, 1, None]][[10, 1, None]]Passed
insert[[10, None, 1]][[10, None, 1]]Passed
no transaction[][]Passed

SHA-256 / f83a568c3040bf48839c534d29cef2879d142cdf0efbdf864d281d7751d815da

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(d):
    try:
        changes=d
        state={}; order=[]
        for ident,before,after in changes:
            if ident not in state:
                state[ident]=[before,after]; order.append(ident)
            else:
                state[ident][1]=after
        return [[ident,state[ident][0],state[ident][1]] for ident in order if state[ident][0] is not None or state[ident][1] is not None]
    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('two updates', solve([[10, 1, 2], [10, 2, 3]]), [[10, 1, 3]])
    check('insert delete', solve([[10, None, 1], [10, 1, None]]), [])
    check('change revert', solve([[10, 1, 2], [10, 2, 1]]), [])
    check('touch order', solve([[20, 1, 2], [10, 3, 4]]), [[20, 1, 2], [10, 3, 4]])
    check('delete', solve([[10, 1, None]]), [[10, 1, None]])
    check('insert', solve([[10, None, 1]]), [[10, None, 1]])
    check('no transaction', solve([]), [])
elif N == 2:
    check('two updates', solve([[10, 2, 3], [10, 3, 4]]), [[10, 2, 4]])
    check('insert delete', solve([[10, None, 2], [10, 2, None]]), [])
    check('change revert', solve([[10, 2, 3], [10, 3, 2]]), [])
    check('touch order', solve([[20, 2, 3], [10, 4, 5]]), [[20, 2, 3], [10, 4, 5]])
    check('delete', solve([[10, 2, None]]), [[10, 2, None]])
    check('insert', solve([[10, None, 2]]), [[10, None, 2]])
    check('no transaction', solve([]), [])
elif N == 3:
    check('two updates', solve([[10, 3, 4], [10, 4, 5]]), [[10, 3, 5]])
    check('insert delete', solve([[10, None, 3], [10, 3, None]]), [])
    check('change revert', solve([[10, 3, 4], [10, 4, 3]]), [])
    check('touch order', solve([[20, 3, 4], [10, 5, 6]]), [[20, 3, 4], [10, 5, 6]])
    check('delete', solve([[10, 3, None]]), [[10, 3, None]])
    check('insert', solve([[10, None, 3]]), [[10, None, 3]])
    check('no transaction', solve([]), [])
elif N == 4:
    check('two updates', solve([[10, 4, 5], [10, 5, 6]]), [[10, 4, 6]])
    check('insert delete', solve([[10, None, 4], [10, 4, None]]), [])
    check('change revert', solve([[10, 4, 5], [10, 5, 4]]), [])
    check('touch order', solve([[20, 4, 5], [10, 6, 7]]), [[20, 4, 5], [10, 6, 7]])
    check('delete', solve([[10, 4, None]]), [[10, 4, None]])
    check('insert', solve([[10, None, 4]]), [[10, None, 4]])
    check('no transaction', solve([]), [])
elif N == 5:
    check('two updates', solve([[10, 5, 6], [10, 6, 7]]), [[10, 5, 7]])
    check('insert delete', solve([[10, None, 5], [10, 5, None]]), [])
    check('change revert', solve([[10, 5, 6], [10, 6, 5]]), [])
    check('touch order', solve([[20, 5, 6], [10, 7, 8]]), [[20, 5, 6], [10, 7, 8]])
    check('delete', solve([[10, 5, None]]), [[10, 5, None]])
    check('insert', solve([[10, None, 5]]), [[10, None, 5]])
    check('no transaction', 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
two updates[[10, 1, 3]][[10, 1, 3]]Passed
insert delete[][]Passed
change revert[[10, 1, 1]][]Failed
touch order[[20, 1, 2], [10, 3, 4]][[20, 1, 2], [10, 3, 4]]Passed
delete[[10, 1, None]][[10, 1, None]]Passed
insert[[10, None, 1]][[10, None, 1]]Passed
no transaction[][]Passed

SHA-256 / 3250d76da06506960354ff085bd7d795982743529a1b2302d64a4606c2e4f306

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 7 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:23.250783+00:00.

Case digest / b771f82494cafff06544c663f15c68ea71d313a0fec0a4fe0e82bff0fb5e9430