FA-100221 / Annotation span alignment / Open access
Tab expansion leaves annotation endpoints on old columns · case 01
Tab expansion leaves annotation endpoints on old columns.
ROOT CAUSE
Source offsets are reused after tabs expand to multiple display columns.
THE FAILURE
Source offsets are reused after tabs expand to multiple display columns.
Unsuccessful approach: Adding a fixed width per earlier tab ignores the current display column.
Case contract
Map each source half-open span through tab expansion using tabstop columns: each tab advances to the next multiple of tabstop; return mapped boundaries.
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(text, spans, tabstop):
return [list(span) for span in spans]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('single tab before span', solve('a b',[[2,3]],4), [[4,5]])
check('tab inside span', solve('a b',[[1,3]],4), [[1,5]])
check('second tab depends on column', solve('ab c d',[[4,6]],4), [[5,9]])
check('no tabs unchanged', solve('abc',[[0,2]],N), [[0,2]])
check('empty spans', solve('a b',[],N), [])
check('span ending before tab', solve('ab c',[[0,2]],3), [[0,2]])
check('singleton after tab', solve('x y',[[2,3]],N+1), [[N+1,N+2]])
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 |
|---|---|---|---|
| single tab before span | [[2, 3]] | [[4, 5]] | Failed |
| tab inside span | [[1, 3]] | [[1, 5]] | Failed |
| second tab depends on column | [[4, 6]] | [[5, 9]] | Failed |
| no tabs unchanged | [[0, 2]] | [[0, 2]] | Passed |
| empty spans | [] | [] | Passed |
| span ending before tab | [[0, 2]] | [[0, 2]] | Passed |
| singleton after tab | [[2, 3]] | [[2, 3]] | Passed |
SHA-256 / 08808514daa7a314264f044e179cf37e062ac9418c615f4bb470c2c22c99af0a
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(text, spans, tabstop):
out=[]
for s,e in spans:
out.append([s+text[:s].count("\t")*(tabstop-1),e+text[:e].count("\t")*(tabstop-1)])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('single tab before span', solve('a b',[[2,3]],4), [[4,5]])
check('tab inside span', solve('a b',[[1,3]],4), [[1,5]])
check('second tab depends on column', solve('ab c d',[[4,6]],4), [[5,9]])
check('no tabs unchanged', solve('abc',[[0,2]],N), [[0,2]])
check('empty spans', solve('a b',[],N), [])
check('span ending before tab', solve('ab c',[[0,2]],3), [[0,2]])
check('singleton after tab', solve('x y',[[2,3]],N+1), [[N+1,N+2]])
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 |
|---|---|---|---|
| single tab before span | [[5, 6]] | [[4, 5]] | Failed |
| tab inside span | [[1, 6]] | [[1, 5]] | Failed |
| second tab depends on column | [[7, 12]] | [[5, 9]] | Failed |
| no tabs unchanged | [[0, 2]] | [[0, 2]] | Passed |
| empty spans | [] | [] | Passed |
| span ending before tab | [[0, 2]] | [[0, 2]] | Passed |
| singleton after tab | [[3, 4]] | [[2, 3]] | Failed |
SHA-256 / 8ac3ce138886d31dcbac2d9dbb91d3ded55285accdba6a48bd52ad4612fd29c5
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:33.099098+00:00.
Case digest / e8895b50c15c6d32bd546d6d6da8d10fc1bba681bab492133a46516dc3e64481