FA-100161 / Annotation span alignment / Open access
Character span misses a token that it partially covers · case 01
Character span misses a token that it partially covers.
ROOT CAUSE
Token membership requires both token edges to stay inside the annotation.
THE FAILURE
Token membership requires both token edges to stay inside the annotation.
Unsuccessful approach: Selecting tokens whose starts lie inside misses a token that begins before the span.
Case contract
Return indices of tokens [a,b) that overlap span [start,end) with positive length; touching boundaries do not overlap.
Why this case matters
A small offline annotation transformation keeps span coordinates explicit when text or token boundaries change.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(tokens, start, end):
return [i for i,(a,b) in enumerate(tokens) if start<=a and b<=end]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('partial at left edge', solve([[0,4],[5,8]],3,6), [0,1])
check('partial at right edge', solve([[0,4],[5,8]],2,6), [0,1])
check('touching only', solve([[0,3],[6,9]],3,6), [])
check('fully contained', solve([[1,2],[3,5]],0,8), [0,1])
check('empty span', solve([[0,5]],3,3), [])
check('no tokens', solve([],N,N+2), [])
check('one overlapping token', solve([[N,N+4]],N+1,N+2), [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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| partial at left edge | [] | [0, 1] | Failed |
| partial at right edge | [] | [0, 1] | Failed |
| touching only | [] | [] | Passed |
| fully contained | [0, 1] | [0, 1] | Passed |
| empty span | [] | [] | Passed |
| no tokens | [] | [] | Passed |
| one overlapping token | [] | [0] | Failed |
SHA-256 / 8ca5c7550aab353b806222df29ac47f9ba6072c711de7378356d4332222501f5
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(tokens, start, end):
return [i for i,(a,b) in enumerate(tokens) if start<=a<end]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('partial at left edge', solve([[0,4],[5,8]],3,6), [0,1])
check('partial at right edge', solve([[0,4],[5,8]],2,6), [0,1])
check('touching only', solve([[0,3],[6,9]],3,6), [])
check('fully contained', solve([[1,2],[3,5]],0,8), [0,1])
check('empty span', solve([[0,5]],3,3), [])
check('no tokens', solve([],N,N+2), [])
check('one overlapping token', solve([[N,N+4]],N+1,N+2), [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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| partial at left edge | [1] | [0, 1] | Failed |
| partial at right edge | [1] | [0, 1] | Failed |
| touching only | [] | [] | Passed |
| fully contained | [0, 1] | [0, 1] | Passed |
| empty span | [] | [] | Passed |
| no tokens | [] | [] | Passed |
| one overlapping token | [] | [0] | Failed |
SHA-256 / a85838f12e355820692f1a362c5b8cee5d70085d71a34505fc86ea12d1b91f3e
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 7 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
Contracts use integer offsets, explicit edits, and supplied token boundaries; they do not define a tokenizer or production annotation format. 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:32.646555+00:00.
Case digest / dd82195723b7e648341d2e79d7d36a0037143356432170218c7d327bb70bbf6f