FAILURE MAP
← Case archive

FA-99716 / Chunk citation alignment / Open access

Chunk citation references remain local after bibliography compaction · case 01

Chunk citation references remain local after bibliography compaction.

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

ROOT CAUSE

Local reference numbers are not translated to compact global source IDs.

THE FAILURE

Local reference numbers are not translated to compact global source IDs.

Unsuccessful approach: Mapping only the first local reference leaves multiple citations partly invalid.

Case contract

Each chunk is [source_ids, local_refs]; return flattened global reference indices using first-seen unique source 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(chunks):
    return [i for sources,refs in chunks for i in refs]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('remapped second table',solve([[['a','b'],[1]],[['b','c'],[1,0]]]),[1,2,1])
check('one table',solve([[['x','y'],[0,1]]]),[0,1])
check('empty',solve([]),[])
check('no refs',solve([[['a'],[]]]),[])
check('repeated source',solve([[['z'],[0]],[['z'],[0]]]),[0,0])
check('multiple refs',solve([[['p','q','r'],[2,0,1]]]),[2,0,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 fixtureActualExpectedOutcome
remapped second table[1, 1, 0][1, 2, 1]Failed
one table[0, 1][0, 1]Passed
empty[][]Passed
no refs[][]Passed
repeated source[0, 0][0, 0]Passed
multiple refs[2, 0, 1][2, 0, 1]Passed

SHA-256 / 710c031cc77135e333db4f6ecd913f6c1827fd3206fe3d3cf4c6cd13c0784b66

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(chunks):
    global_ids=list(dict.fromkeys(s for sources,refs in chunks for s in sources))
    return [global_ids.index(sources[i]) for sources,refs in chunks for i in refs[:1]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('remapped second table',solve([[['a','b'],[1]],[['b','c'],[1,0]]]),[1,2,1])
check('one table',solve([[['x','y'],[0,1]]]),[0,1])
check('empty',solve([]),[])
check('no refs',solve([[['a'],[]]]),[])
check('repeated source',solve([[['z'],[0]],[['z'],[0]]]),[0,0])
check('multiple refs',solve([[['p','q','r'],[2,0,1]]]),[2,0,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 fixtureActualExpectedOutcome
remapped second table[1, 2][1, 2, 1]Failed
one table[0][0, 1]Failed
empty[][]Passed
no refs[][]Passed
repeated source[0, 0][0, 0]Passed
multiple refs[2][2, 0, 1]Failed

SHA-256 / 34bf53e8613bb0769a1b2302f2f72298bd1207e045717457b4fdded420ca26e5

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

Case digest / 6fb82779e2df2f23b35f94072d22f06df7fe4d5361445e17197af2c33cd0dd33