FA-100256 / Dataset deduplication grouping / Open access
Dataset deduplication: token permutations are treated as distinct documents · case 01
token permutations are treated as distinct documents.
ROOT CAUSE
The deduplication key is an ordered token sequence although the contract is set-based.
THE FAILURE
The deduplication key is an ordered token sequence although the contract is set-based.
Unsuccessful approach: Sorting tokens preserves duplicate multiplicity and still splits set-equivalent documents.
Case contract
Return the number of distinct token sets. Token order and multiplicity do not matter.
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(docs):
return len({tuple(d) for d in docs})
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
a='t'+str(N)
check('permutation',solve([[a,'x'],['x',a]]),1)
check('multiplicity ignored',solve([[a,a,'x'],[a,'x']]),1)
check('different token',solve([[a],['x']]),2)
check('empty documents',solve([[],[]]),1)
check('empty corpus',solve([]),0)
check('singleton',solve([[a]]),1)
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| permutation | 2 | 1 | Failed |
| multiplicity ignored | 2 | 1 | Failed |
| different token | 2 | 2 | Passed |
| empty documents | 1 | 1 | Passed |
| empty corpus | 0 | 0 | Passed |
| singleton | 1 | 1 | Passed |
SHA-256 / 166e41cc8fdedb3584faef0ad8d9c9508f2a50d46b953c8ad2672b1e9b2bd191
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(docs):
return len({tuple(sorted(d)) for d in docs})
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
a='t'+str(N)
check('permutation',solve([[a,'x'],['x',a]]),1)
check('multiplicity ignored',solve([[a,a,'x'],[a,'x']]),1)
check('different token',solve([[a],['x']]),2)
check('empty documents',solve([[],[]]),1)
check('empty corpus',solve([]),0)
check('singleton',solve([[a]]),1)
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| permutation | 1 | 1 | Passed |
| multiplicity ignored | 2 | 1 | Failed |
| different token | 2 | 2 | Passed |
| empty documents | 1 | 1 | Passed |
| empty corpus | 0 | 0 | Passed |
| singleton | 1 | 1 | Passed |
SHA-256 / ce6c1ca62bdd3f95437838e4519338da3b9e9312b0d6e038ad652d348c8319a8
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:33.560900+00:00.
Case digest / 36a522dba8449029e58e56ffda4e648ed77aacd6e3bde7dd2893581aed7c30e0