FAILURE MAP
← Case archive

FA-99696 / Chunk citation alignment / Open access

Citations are deduplicated by label and collapse distinct spans · case 01

Citations are deduplicated by label and collapse distinct spans.

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

ROOT CAUSE

A source label is treated as a unique citation despite separate passages.

THE FAILURE

A source label is treated as a unique citation despite separate passages.

Unsuccessful approach: Sorting the unique rows changes first-seen citation order even though it removes exact duplicates.

Case contract

Rows [source,start,end]; remove exact duplicate rows while preserving first occurrence order.

Why this case matters

A deterministic citation bookkeeping model isolates source attribution from rendering and retrieval.

1 / The failure

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

N = 1
observations = []
def solve(rows):
    return list({r[0]:r for r in rows}.values())
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('same source distinct span',solve([['a',0,2],['a',4,6]]),[['a',0,2],['a',4,6]])
check('exact duplicate',solve([['a',0,2],['a',0,2]]),[['a',0,2]])
check('same span distinct source',solve([['a',1,3],['b',1,3]]),[['a',1,3],['b',1,3]])
check('empty',solve([]),[])
check('order retained',solve([['z',0,1],['a',0,1]]),[['z',0,1],['a',0,1]])
check('three rows',solve([['a',0,1],['a',2,3],['a',0,1]]),[['a',0,1],['a',2,3]])
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
same source distinct span[['a', 4, 6]][['a', 0, 2], ['a', 4, 6]]Failed
exact duplicate[['a', 0, 2]][['a', 0, 2]]Passed
same span distinct source[['a', 1, 3], ['b', 1, 3]][['a', 1, 3], ['b', 1, 3]]Passed
empty[][]Passed
order retained[['z', 0, 1], ['a', 0, 1]][['z', 0, 1], ['a', 0, 1]]Passed
three rows[['a', 0, 1]][['a', 0, 1], ['a', 2, 3]]Failed

SHA-256 / aa62e6e78223b9a65d07d0a6bb5ca9283b1092147eca76434feea7dc3bbb4c98

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(rows):
    return [list(r) for r in sorted(set(tuple(r) for r in rows))]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('same source distinct span',solve([['a',0,2],['a',4,6]]),[['a',0,2],['a',4,6]])
check('exact duplicate',solve([['a',0,2],['a',0,2]]),[['a',0,2]])
check('same span distinct source',solve([['a',1,3],['b',1,3]]),[['a',1,3],['b',1,3]])
check('empty',solve([]),[])
check('order retained',solve([['z',0,1],['a',0,1]]),[['z',0,1],['a',0,1]])
check('three rows',solve([['a',0,1],['a',2,3],['a',0,1]]),[['a',0,1],['a',2,3]])
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
same source distinct span[['a', 0, 2], ['a', 4, 6]][['a', 0, 2], ['a', 4, 6]]Passed
exact duplicate[['a', 0, 2]][['a', 0, 2]]Passed
same span distinct source[['a', 1, 3], ['b', 1, 3]][['a', 1, 3], ['b', 1, 3]]Passed
empty[][]Passed
order retained[['a', 0, 1], ['z', 0, 1]][['z', 0, 1], ['a', 0, 1]]Failed
three rows[['a', 0, 1], ['a', 2, 3]][['a', 0, 1], ['a', 2, 3]]Passed

SHA-256 / c6857e4ebd47d10e14309e45d39abe9d3875c65d09055c098db1ecdbd5fe0cfe

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 integer offsets and identifiers under the stated toy contract; this does not define a document format or production citation API. 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:27.159189+00:00.

Case digest / a7fed1bddcb02492ad7ccadfff0d64634cd4b4ffa55a1cc7d3c7f3751a8a080a