FA-99736 / Chunk citation alignment / Open access
Line citations count the chunk header as source text · case 01
Line citations count the chunk header as source text.
ROOT CAUSE
A displayed prefix is included in the source line offset.
THE FAILURE
A displayed prefix is included in the source line offset.
Unsuccessful approach: Subtracting the header only for lines greater than the header size mishandles the first source line.
Case contract
Given local displayed line numbers and header line count h, return source line numbers by subtracting h.
Why this case matters
A deterministic citation bookkeeping model isolates source attribution from rendering and retrieval.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(lines, header_lines):
return list(lines)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('line after header',solve([N+1,N+3],N),[1,3])
check('first source line',solve([N+1],N),[1])
check('header boundary',solve([N],N),[0])
check('no header',solve([1,4],0),[1,4])
check('empty',solve([],N),[])
check('duplicate',solve([N+2,N+2],N),[2,2])
check('order',solve([N+4,N+1],N),[4,1])
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 |
|---|---|---|---|
| line after header | [2, 4] | [1, 3] | Failed |
| first source line | [2] | [1] | Failed |
| header boundary | [1] | [0] | Failed |
| no header | [1, 4] | [1, 4] | Passed |
| empty | [] | [] | Passed |
| duplicate | [3, 3] | [2, 2] | Failed |
| order | [5, 2] | [4, 1] | Failed |
SHA-256 / 8f47c462e2532ef4b725015ae69757a53bd5cc6d4cf4b1bff47f9f4765582ec0
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(lines, header_lines):
return [x-header_lines if x>header_lines else x for x in lines]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('line after header',solve([N+1,N+3],N),[1,3])
check('first source line',solve([N+1],N),[1])
check('header boundary',solve([N],N),[0])
check('no header',solve([1,4],0),[1,4])
check('empty',solve([],N),[])
check('duplicate',solve([N+2,N+2],N),[2,2])
check('order',solve([N+4,N+1],N),[4,1])
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 |
|---|---|---|---|
| line after header | [1, 3] | [1, 3] | Passed |
| first source line | [1] | [1] | Passed |
| header boundary | [1] | [0] | Failed |
| no header | [1, 4] | [1, 4] | Passed |
| empty | [] | [] | Passed |
| duplicate | [2, 2] | [2, 2] | Passed |
| order | [4, 1] | [4, 1] | Passed |
SHA-256 / 9b2adfc70ffa986db8f3dae74b2c989abec80cdae399baa8d4c2a1f272d020d8
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
Inputs are small integer offsets and identifiers under the stated toy contract; this does not define a document format or production citation API. 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:27.615290+00:00.
Case digest / f5bc0dfae6965d277e99e8e5c0a9ba0c786d87f4487d17e141dc70b928cc4a11