FAILURE MAP
← Case archive

FA-100301 / Dataset deduplication grouping / Open access

Dataset deduplication: single insertion makes two fingerprints unrelated · case 01

single insertion makes two fingerprints unrelated.

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

ROOT CAUSE

The near-duplicate score only compares aligned positions.

THE FAILURE

The near-duplicate score only compares aligned positions.

Unsuccessful approach: A common-prefix count handles insertions at the end but fails for interior edits.

Case contract

Return Levenshtein edit distance between two strings using unit insertion, deletion, substitution.

Why this case matters

This deterministic toy operation makes one dataset equivalence or representative rule explicit.

1 / The failure

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

N = 1
observations = []
def solve(a, b):
    return sum(x!=y for x,y in zip(a,b))+abs(len(a)-len(b))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('append token',solve('abc','abcx'),1)
check('interior insert',solve('abc','axbc'),1)
check('delete',solve('axbc','abc'),1)
check('substitution',solve('abc','axc'),1)
check('empty to text',solve('','x'*N),N)
check('same',solve('abc','abc'),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
append token11Passed
interior insert31Failed
delete31Failed
substitution11Passed
empty to text11Passed
same00Passed

SHA-256 / 574dc725b8375c063af1c3a726b94adae83060d3f45533e25347be71e1dd76ae

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(a, b):
    return abs(len(a)-len(b)) + sum(x!=y for x,y in zip(a,b))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('append token',solve('abc','abcx'),1)
check('interior insert',solve('abc','axbc'),1)
check('delete',solve('axbc','abc'),1)
check('substitution',solve('abc','axc'),1)
check('empty to text',solve('','x'*N),N)
check('same',solve('abc','abc'),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
append token11Passed
interior insert31Failed
delete31Failed
substitution11Passed
empty to text11Passed
same00Passed

SHA-256 / 08bbf28ec4ada7b393a5347174800b051146711658fe2ba9b2a19cfa006fd284

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

Inputs are small in-memory fixtures with the stated contract; results do not claim production deduplication quality. 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-30T16:48:34.014126+00:00.

Case digest / 6bde24d94ae2cfc6e8777bde2c4e33cb4915099cfb51515a68b1560b026f07ff