FAILURE MAP
← Case archive

FA-100191 / Annotation span alignment / Open access

Windowed export keeps original coordinates after clipping · case 01

Windowed export keeps original coordinates after clipping.

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

ROOT CAUSE

Clipped spans are returned without subtracting the window origin.

THE FAILURE

Clipped spans are returned without subtracting the window origin.

Unsuccessful approach: Subtracting the origin before clipping can retain spans wholly before the window.

Case contract

Clip spans to [left,right), discard zero-width results, and return coordinates relative to left while preserving labels.

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 [[max(s,left),min(e,right),l] for s,e,l in spans if min(e,right)>max(s,left)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('partial both sides', solve([[1,8,'x']],3,6), [[0,3,'x']])
check('inside window', solve([[4,5,'x']],3,8), [[1,2,'x']])
check('before window removed', solve([[0,3,'x']],3,8), [])
check('after window removed', solve([[8,9,'x']],3,8), [])
check('touch boundary removed', solve([[0,3,'x'],[8,9,'y']],3,8), [])
check('empty spans', solve([],N,N+3), [])
check('zero width window', solve([[1,5,'x']],3,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
partial both sides[[3, 6, 'x']][[0, 3, 'x']]Failed
inside window[[4, 5, 'x']][[1, 2, 'x']]Failed
before window removed[][]Passed
after window removed[][]Passed
touch boundary removed[][]Passed
empty spans[][]Passed
zero width window[][]Passed

SHA-256 / 0600e1d4a9db5ff5b4207bf89277abf819cfc74f626afc15fa34eb7362a6e47b

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 [[max(s-left,0),min(e-left,right-left),l] for s,e,l in spans if e>s]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('partial both sides', solve([[1,8,'x']],3,6), [[0,3,'x']])
check('inside window', solve([[4,5,'x']],3,8), [[1,2,'x']])
check('before window removed', solve([[0,3,'x']],3,8), [])
check('after window removed', solve([[8,9,'x']],3,8), [])
check('touch boundary removed', solve([[0,3,'x'],[8,9,'y']],3,8), [])
check('empty spans', solve([],N,N+3), [])
check('zero width window', solve([[1,5,'x']],3,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
partial both sides[[0, 3, 'x']][[0, 3, 'x']]Passed
inside window[[1, 2, 'x']][[1, 2, 'x']]Passed
before window removed[[0, 0, 'x']][]Failed
after window removed[[5, 5, 'x']][]Failed
touch boundary removed[[0, 0, 'x'], [5, 5, 'y']][]Failed
empty spans[][]Passed
zero width window[[0, 0, 'x']][]Failed

SHA-256 / cb0791f7d0cdcdec83518f94387cccec14de5281715db77a81ca3257b52cb278

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

Case digest / 7fa2c56a5a9923b301e990819b1b48ce62388b0b5f7b589013762d8d650367e8