{"abstract":"Line citations count the chunk header as source text.","category":"Chunk citation alignment","checks":7,"contract":"Given local displayed line numbers and header line count h, return source line numbers by subtracting h.","contract_signature":"lines, header_lines","evaluation_group":"w3-cca-line_offset","failed_approach":"Subtracting the header only for lines greater than the header size mishandles the first source line.","family":"w3-chunk-citation-alignment-line-offset","id":"FA-99736","implementations":{"attempt":{"sha256":"9b2adfc70ffa986db8f3dae74b2c989abec80cdae399baa8d4c2a1f272d020d8","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(lines, header_lines):\n    return [x-header_lines if x>header_lines else x for x in lines]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('line after header',solve([N+1,N+3],N),[1,3])\ncheck('first source line',solve([N+1],N),[1])\ncheck('header boundary',solve([N],N),[0])\ncheck('no header',solve([1,4],0),[1,4])\ncheck('empty',solve([],N),[])\ncheck('duplicate',solve([N+2,N+2],N),[2,2])\ncheck('order',solve([N+4,N+1],N),[4,1])\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"8f47c462e2532ef4b725015ae69757a53bd5cc6d4cf4b1bff47f9f4765582ec0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(lines, header_lines):\n    return list(lines)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('line after header',solve([N+1,N+3],N),[1,3])\ncheck('first source line',solve([N+1],N),[1])\ncheck('header boundary',solve([N],N),[0])\ncheck('no header',solve([1,4],0),[1,4])\ncheck('empty',solve([],N),[])\ncheck('duplicate',solve([N+2,N+2],N),[2,2])\ncheck('order',solve([N+4,N+1],N),[4,1])\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"w3-chunk-citation-alignment-line-offset","generated_at":"2026-09-30T16:48:27.615290+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic citation bookkeeping model isolates source attribution from rendering and retrieval.","root_cause":"A displayed prefix is included in the source line offset.","sha256":"f5bc0dfae6965d277e99e8e5c0a9ba0c786d87f4487d17e141dc70b928cc4a11","title":"Line citations count the chunk header as source text · case 01","variant":1,"variant_policy":"The fixture code references N, supplied as 1 through 5. Fixed boundary checks may repeat. These records share one mechanism and must remain together in evaluation splits.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":29.596,"exit_code":1,"observations":[{"actual":[1,3],"check":"line after header","expected":[1,3],"passed":true},{"actual":[1],"check":"first source line","expected":[1],"passed":true},{"actual":[1],"check":"header boundary","expected":[0],"passed":false},{"actual":[1,4],"check":"no header","expected":[1,4],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[2,2],"check":"duplicate","expected":[2,2],"passed":true},{"actual":[4,1],"check":"order","expected":[4,1],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"line after header\", \"actual\": [1, 3], \"expected\": [1, 3], \"passed\": true}, {\"check\": \"first source line\", \"actual\": [1], \"expected\": [1], \"passed\": true}, {\"check\": \"header boundary\", \"actual\": [1], \"expected\": [0], \"passed\": false}, {\"check\": \"no header\", \"actual\": [1, 4], \"expected\": [1, 4], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"duplicate\", \"actual\": [2, 2], \"expected\": [2, 2], \"passed\": true}, {\"check\": \"order\", \"actual\": [4, 1], \"expected\": [4, 1], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.092,"exit_code":1,"observations":[{"actual":[2,4],"check":"line after header","expected":[1,3],"passed":false},{"actual":[2],"check":"first source line","expected":[1],"passed":false},{"actual":[1],"check":"header boundary","expected":[0],"passed":false},{"actual":[1,4],"check":"no header","expected":[1,4],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[3,3],"check":"duplicate","expected":[2,2],"passed":false},{"actual":[5,2],"check":"order","expected":[4,1],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"line after header\", \"actual\": [2, 4], \"expected\": [1, 3], \"passed\": false}, {\"check\": \"first source line\", \"actual\": [2], \"expected\": [1], \"passed\": false}, {\"check\": \"header boundary\", \"actual\": [1], \"expected\": [0], \"passed\": false}, {\"check\": \"no header\", \"actual\": [1, 4], \"expected\": [1, 4], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"duplicate\", \"actual\": [3, 3], \"expected\": [2, 2], \"passed\": false}, {\"check\": \"order\", \"actual\": [5, 2], \"expected\": [4, 1], \"passed\": false}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}