FAILURE MAP
← Case archive

FA-100196 / Annotation span alignment / Open access

Boundary-touching spans pass a containment filter · case 01

Boundary-touching spans pass a containment filter.

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

ROOT CAUSE

A candidate span is accepted when either endpoint merely touches the container.

THE FAILURE

A candidate span is accepted when either endpoint merely touches the container.

Unsuccessful approach: Checking only candidate midpoint admits spans extending beyond the container.

Case contract

Return input spans fully contained in [left,right), including equal boundaries; zero-width candidates are allowed when their point is within the closed boundary range.

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(spans, left, right):
    return [[s,e,l] for s,e,l in spans if s<=right and e>=left]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('contained', solve([[2,4,'a']],1,6), [[2,4,'a']])
check('starts before', solve([[0,4,'a']],1,6), [])
check('ends after', solve([[2,7,'a']],1,6), [])
check('equal boundaries', solve([[1,6,'a']],1,6), [[1,6,'a']])
check('zero width inside', solve([[N,N,'p']],0,8), [[N,N,'p']])
check('empty input', solve([],1,6), [])
check('zero width outside', solve([[0,0,'p']],1,6), [])
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
contained[[2, 4, 'a']][[2, 4, 'a']]Passed
starts before[[0, 4, 'a']][]Failed
ends after[[2, 7, 'a']][]Failed
equal boundaries[[1, 6, 'a']][[1, 6, 'a']]Passed
zero width inside[[1, 1, 'p']][[1, 1, 'p']]Passed
empty input[][]Passed
zero width outside[][]Passed

SHA-256 / 9260ffceb9d7b635ad1d60445a27157fee3beaa61075ca9f3931d3b942b57f4f

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(spans, left, right):
    return [[s,e,l] for s,e,l in spans if left<=((s+e)//2)<=right]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('contained', solve([[2,4,'a']],1,6), [[2,4,'a']])
check('starts before', solve([[0,4,'a']],1,6), [])
check('ends after', solve([[2,7,'a']],1,6), [])
check('equal boundaries', solve([[1,6,'a']],1,6), [[1,6,'a']])
check('zero width inside', solve([[N,N,'p']],0,8), [[N,N,'p']])
check('empty input', solve([],1,6), [])
check('zero width outside', solve([[0,0,'p']],1,6), [])
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
contained[[2, 4, 'a']][[2, 4, 'a']]Passed
starts before[[0, 4, 'a']][]Failed
ends after[[2, 7, 'a']][]Failed
equal boundaries[[1, 6, 'a']][[1, 6, 'a']]Passed
zero width inside[[1, 1, 'p']][[1, 1, 'p']]Passed
empty input[][]Passed
zero width outside[][]Passed

SHA-256 / 23e6bde86dc9ef98950d43cc81b5351b34b3d600eb6220e699e620a7e083131f

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

Case digest / cf8a61991e1ea053a1346e5966030a4a33705bb44be1c645dca5226b55d919d6