FAILURE MAP
← Case archive

FA-44386 / Data systems / Open access

Local dictionary codes survive a global dictionary merge · case 01

Local dictionary codes survive a global dictionary merge.

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

ROOT CAUSE

dictionary-unification: Local dictionary codes survive a global dictionary merge.

THE FAILURE

dictionary-unification: Local dictionary codes survive a global dictionary merge.

Unsuccessful approach: An offset translation assumes dictionary values form a contiguous global range.

Case contract

Unify dictionaries from ordered batches by first encountered dictionary value, including unused values. Rewrite valid local indices into the unified domain, retaining null lanes and batch boundaries; duplicate dictionary values share one code.

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:
        merged=[]; batches=[]
        for dictionary,codes,valid in d:
            for value in dictionary:
                if value not in merged: merged.append(value)
            mapping=list(range(len(dictionary)))
            rewritten=[mapping[c] if valid[i] else None for i,c in enumerate(codes)]
            batches.append(rewritten)
        return [merged,batches]
    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('overlapping domains', solve([[[1, 2], [1, 0], [True, True]], [[3, 1], [1, 0], [True, True]]]), [[1, 2, 3], [[1, 0], [0, 2]]])
    check('unused values', solve([[[1, 2, 3], [1], [True]]]), [[1, 2, 3], [[1]]])
    check('nonadjacent duplicate', solve([[[1, 2, 1], [2, 0], [True, True]]]), [[1, 2], [[0, 0]]])
    check('null lanes', solve([[[1, 2], [1, 0], [False, True]]]), [[1, 2], [[None, 0]]])
    check('empty batch', solve([[[1], [], []], [[2], [0], [True]]]), [[1, 2], [[], [1]]])
    check('no batches', solve([]), [[], []])
    check('single domain', solve([[[1], [0, 0], [True, True]]]), [[1], [[0, 0]]])
elif N == 2:
    check('overlapping domains', solve([[[2, 3], [1, 0], [True, True]], [[4, 2], [1, 0], [True, True]]]), [[2, 3, 4], [[1, 0], [0, 2]]])
    check('unused values', solve([[[2, 3, 4], [1], [True]]]), [[2, 3, 4], [[1]]])
    check('nonadjacent duplicate', solve([[[2, 3, 2], [2, 0], [True, True]]]), [[2, 3], [[0, 0]]])
    check('null lanes', solve([[[2, 3], [1, 0], [False, True]]]), [[2, 3], [[None, 0]]])
    check('empty batch', solve([[[2], [], []], [[3], [0], [True]]]), [[2, 3], [[], [1]]])
    check('no batches', solve([]), [[], []])
    check('single domain', solve([[[2], [0, 0], [True, True]]]), [[2], [[0, 0]]])
elif N == 3:
    check('overlapping domains', solve([[[3, 4], [1, 0], [True, True]], [[5, 3], [1, 0], [True, True]]]), [[3, 4, 5], [[1, 0], [0, 2]]])
    check('unused values', solve([[[3, 4, 5], [1], [True]]]), [[3, 4, 5], [[1]]])
    check('nonadjacent duplicate', solve([[[3, 4, 3], [2, 0], [True, True]]]), [[3, 4], [[0, 0]]])
    check('null lanes', solve([[[3, 4], [1, 0], [False, True]]]), [[3, 4], [[None, 0]]])
    check('empty batch', solve([[[3], [], []], [[4], [0], [True]]]), [[3, 4], [[], [1]]])
    check('no batches', solve([]), [[], []])
    check('single domain', solve([[[3], [0, 0], [True, True]]]), [[3], [[0, 0]]])
elif N == 4:
    check('overlapping domains', solve([[[4, 5], [1, 0], [True, True]], [[6, 4], [1, 0], [True, True]]]), [[4, 5, 6], [[1, 0], [0, 2]]])
    check('unused values', solve([[[4, 5, 6], [1], [True]]]), [[4, 5, 6], [[1]]])
    check('nonadjacent duplicate', solve([[[4, 5, 4], [2, 0], [True, True]]]), [[4, 5], [[0, 0]]])
    check('null lanes', solve([[[4, 5], [1, 0], [False, True]]]), [[4, 5], [[None, 0]]])
    check('empty batch', solve([[[4], [], []], [[5], [0], [True]]]), [[4, 5], [[], [1]]])
    check('no batches', solve([]), [[], []])
    check('single domain', solve([[[4], [0, 0], [True, True]]]), [[4], [[0, 0]]])
elif N == 5:
    check('overlapping domains', solve([[[5, 6], [1, 0], [True, True]], [[7, 5], [1, 0], [True, True]]]), [[5, 6, 7], [[1, 0], [0, 2]]])
    check('unused values', solve([[[5, 6, 7], [1], [True]]]), [[5, 6, 7], [[1]]])
    check('nonadjacent duplicate', solve([[[5, 6, 5], [2, 0], [True, True]]]), [[5, 6], [[0, 0]]])
    check('null lanes', solve([[[5, 6], [1, 0], [False, True]]]), [[5, 6], [[None, 0]]])
    check('empty batch', solve([[[5], [], []], [[6], [0], [True]]]), [[5, 6], [[], [1]]])
    check('no batches', solve([]), [[], []])
    check('single domain', solve([[[5], [0, 0], [True, True]]]), [[5], [[0, 0]]])
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
overlapping domains[[1, 2, 3], [[1, 0], [1, 0]]][[1, 2, 3], [[1, 0], [0, 2]]]Failed
unused values[[1, 2, 3], [[1]]][[1, 2, 3], [[1]]]Passed
nonadjacent duplicate[[1, 2], [[2, 0]]][[1, 2], [[0, 0]]]Failed
null lanes[[1, 2], [[None, 0]]][[1, 2], [[None, 0]]]Passed
empty batch[[1, 2], [[], [0]]][[1, 2], [[], [1]]]Failed
no batches[[], []][[], []]Passed
single domain[[1], [[0, 0]]][[1], [[0, 0]]]Passed

SHA-256 / 878276d86695da58722706a56d915075b8bb27b03dcac3c1e173fa72eb5e29c7

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(d):
    try:
        merged=[]; batches=[]
        for dictionary,codes,valid in d:
            for value in dictionary:
                if value not in merged: merged.append(value)
            mapping=[merged.index(dictionary[0])+i for i in range(len(dictionary))]
            rewritten=[mapping[c] if valid[i] else None for i,c in enumerate(codes)]
            batches.append(rewritten)
        return [merged,batches]
    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('overlapping domains', solve([[[1, 2], [1, 0], [True, True]], [[3, 1], [1, 0], [True, True]]]), [[1, 2, 3], [[1, 0], [0, 2]]])
    check('unused values', solve([[[1, 2, 3], [1], [True]]]), [[1, 2, 3], [[1]]])
    check('nonadjacent duplicate', solve([[[1, 2, 1], [2, 0], [True, True]]]), [[1, 2], [[0, 0]]])
    check('null lanes', solve([[[1, 2], [1, 0], [False, True]]]), [[1, 2], [[None, 0]]])
    check('empty batch', solve([[[1], [], []], [[2], [0], [True]]]), [[1, 2], [[], [1]]])
    check('no batches', solve([]), [[], []])
    check('single domain', solve([[[1], [0, 0], [True, True]]]), [[1], [[0, 0]]])
elif N == 2:
    check('overlapping domains', solve([[[2, 3], [1, 0], [True, True]], [[4, 2], [1, 0], [True, True]]]), [[2, 3, 4], [[1, 0], [0, 2]]])
    check('unused values', solve([[[2, 3, 4], [1], [True]]]), [[2, 3, 4], [[1]]])
    check('nonadjacent duplicate', solve([[[2, 3, 2], [2, 0], [True, True]]]), [[2, 3], [[0, 0]]])
    check('null lanes', solve([[[2, 3], [1, 0], [False, True]]]), [[2, 3], [[None, 0]]])
    check('empty batch', solve([[[2], [], []], [[3], [0], [True]]]), [[2, 3], [[], [1]]])
    check('no batches', solve([]), [[], []])
    check('single domain', solve([[[2], [0, 0], [True, True]]]), [[2], [[0, 0]]])
elif N == 3:
    check('overlapping domains', solve([[[3, 4], [1, 0], [True, True]], [[5, 3], [1, 0], [True, True]]]), [[3, 4, 5], [[1, 0], [0, 2]]])
    check('unused values', solve([[[3, 4, 5], [1], [True]]]), [[3, 4, 5], [[1]]])
    check('nonadjacent duplicate', solve([[[3, 4, 3], [2, 0], [True, True]]]), [[3, 4], [[0, 0]]])
    check('null lanes', solve([[[3, 4], [1, 0], [False, True]]]), [[3, 4], [[None, 0]]])
    check('empty batch', solve([[[3], [], []], [[4], [0], [True]]]), [[3, 4], [[], [1]]])
    check('no batches', solve([]), [[], []])
    check('single domain', solve([[[3], [0, 0], [True, True]]]), [[3], [[0, 0]]])
elif N == 4:
    check('overlapping domains', solve([[[4, 5], [1, 0], [True, True]], [[6, 4], [1, 0], [True, True]]]), [[4, 5, 6], [[1, 0], [0, 2]]])
    check('unused values', solve([[[4, 5, 6], [1], [True]]]), [[4, 5, 6], [[1]]])
    check('nonadjacent duplicate', solve([[[4, 5, 4], [2, 0], [True, True]]]), [[4, 5], [[0, 0]]])
    check('null lanes', solve([[[4, 5], [1, 0], [False, True]]]), [[4, 5], [[None, 0]]])
    check('empty batch', solve([[[4], [], []], [[5], [0], [True]]]), [[4, 5], [[], [1]]])
    check('no batches', solve([]), [[], []])
    check('single domain', solve([[[4], [0, 0], [True, True]]]), [[4], [[0, 0]]])
elif N == 5:
    check('overlapping domains', solve([[[5, 6], [1, 0], [True, True]], [[7, 5], [1, 0], [True, True]]]), [[5, 6, 7], [[1, 0], [0, 2]]])
    check('unused values', solve([[[5, 6, 7], [1], [True]]]), [[5, 6, 7], [[1]]])
    check('nonadjacent duplicate', solve([[[5, 6, 5], [2, 0], [True, True]]]), [[5, 6], [[0, 0]]])
    check('null lanes', solve([[[5, 6], [1, 0], [False, True]]]), [[5, 6], [[None, 0]]])
    check('empty batch', solve([[[5], [], []], [[6], [0], [True]]]), [[5, 6], [[], [1]]])
    check('no batches', solve([]), [[], []])
    check('single domain', solve([[[5], [0, 0], [True, True]]]), [[5], [[0, 0]]])
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
overlapping domains[[1, 2, 3], [[1, 0], [3, 2]]][[1, 2, 3], [[1, 0], [0, 2]]]Failed
unused values[[1, 2, 3], [[1]]][[1, 2, 3], [[1]]]Passed
nonadjacent duplicate[[1, 2], [[2, 0]]][[1, 2], [[0, 0]]]Failed
null lanes[[1, 2], [[None, 0]]][[1, 2], [[None, 0]]]Passed
empty batch[[1, 2], [[], [1]]][[1, 2], [[], [1]]]Passed
no batches[[], []][[], []]Passed
single domain[[1], [[0, 0]]][[1], [[0, 0]]]Passed

SHA-256 / 7aad03c5aefc597910f486c113acc6a9d9fd493c0c87e7b65ce0a7337cb758b6

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

Case digest / 50f6e9ac7edbb5e4a976d7e0bf31b9ce97857afb5c40edb5902f39baeaaad53c