FAILURE MAP
← Case archive

FA-99556 / RAG context assembly / Open access

Overlapping neighboring chunks repeat evidence tokens · case 01

Overlapping neighboring chunks repeat evidence tokens.

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

ROOT CAUSE

The assembler concatenates chunks without removing their shared boundary tokens.

THE FAILURE

The assembler concatenates chunks without removing their shared boundary tokens.

Unsuccessful approach: Removing only a one-token overlap leaves larger shared spans duplicated.

Case contract

For token-list chunks, concatenate in order while removing the maximal exact suffix/prefix overlap with accumulated output.

Why this case matters

A small deterministic evidence assembly model makes context budgeting behavior inspectable.

1 / The failure

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

N = 1
observations = []
def solve(chunks):
    out=[]
    for chunk in chunks: out.extend(chunk)
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
x='x'+str(N); y='y'+str(N); z='z'+str(N)
check('two token overlap', solve([[x,y,z],[y,z,'q']]), [x,y,z,'q'])
check('no overlap', solve([[x],[y]]), [x,y])
check('full overlap', solve([[x,y],[x,y]]), [x,y])
check('empty chunks', solve([[],[x],[]]), [x])
check('single', solve([[x]]), [x])
check('shorter overlap', solve([[x,y,z],[z,'q']]), [x,y,z,'q'])
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
two token overlap['x1', 'y1', 'z1', 'y1', 'z1', 'q']['x1', 'y1', 'z1', 'q']Failed
no overlap['x1', 'y1']['x1', 'y1']Passed
full overlap['x1', 'y1', 'x1', 'y1']['x1', 'y1']Failed
empty chunks['x1']['x1']Passed
single['x1']['x1']Passed
shorter overlap['x1', 'y1', 'z1', 'z1', 'q']['x1', 'y1', 'z1', 'q']Failed

SHA-256 / e7ceb67039591442dc957f8c772cc48ffcc7e4b8785f574c9c9ea3572176b980

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(chunks):
    out=[]
    for chunk in chunks:
        k=1 if out and chunk and out[-1]==chunk[0] else 0
        out.extend(chunk[k:])
    return out
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
x='x'+str(N); y='y'+str(N); z='z'+str(N)
check('two token overlap', solve([[x,y,z],[y,z,'q']]), [x,y,z,'q'])
check('no overlap', solve([[x],[y]]), [x,y])
check('full overlap', solve([[x,y],[x,y]]), [x,y])
check('empty chunks', solve([[],[x],[]]), [x])
check('single', solve([[x]]), [x])
check('shorter overlap', solve([[x,y,z],[z,'q']]), [x,y,z,'q'])
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
two token overlap['x1', 'y1', 'z1', 'y1', 'z1', 'q']['x1', 'y1', 'z1', 'q']Failed
no overlap['x1', 'y1']['x1', 'y1']Passed
full overlap['x1', 'y1', 'x1', 'y1']['x1', 'y1']Failed
empty chunks['x1']['x1']Passed
single['x1']['x1']Passed
shorter overlap['x1', 'y1', 'z1', 'q']['x1', 'y1', 'z1', 'q']Passed

SHA-256 / c0272db56377f14c3e3fa2f1c92c34e806d898189ecf9652ae2121504cc6c391

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

Toy inputs and token counts only; this does not claim compatibility with a tokenizer, prompt format, or production retrieval system. 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:25.373039+00:00.

Case digest / ef4be1778f667cc97b3359373340238fa6a1c167af801c78f4af9a7396591eee