{"abstract":"A citation in joined text is attributed to the wrong chunk.","category":"Chunk citation alignment","checks":6,"contract":"Given chunk starts and lengths, map point p to its containing chunk index using half-open intervals; return None for gaps or out of range.","contract_signature":"starts, lengths, point","evaluation_group":"w3-cca-joined_map","failed_approach":"Choosing the first chunk whose end exceeds the point ignores that the point may precede the chunk start.","family":"w3-chunk-citation-alignment-joined-span-map","id":"FA-99706","implementations":{"attempt":{"sha256":"0610990f5d8dbf25b6b2abd7737f6d16f5ffabff190f39141fcc1cbde4f7a75d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(starts, lengths, point):\n    return next((i for i,(s,n) in enumerate(zip(starts,lengths)) if point<s+n),None)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('later chunk',solve([0,N+3],[N,2],N+3),1)\ncheck('first start',solve([0,5],[3,2],0),0)\ncheck('end excluded',solve([0],[3],3),None)\ncheck('gap',solve([0,5],[3,2],4),None)\ncheck('empty',solve([],[],1),None)\ncheck('second interior',solve([0,5],[3,2],6),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":"c25ce441de28f71e9c4e34787b964425dbbcd470374dadd624164a50f84d9fc7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(starts, lengths, point):\n    return next((i for i,(s,n) in enumerate(zip(starts,lengths)) if i==point),None)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('later chunk',solve([0,N+3],[N,2],N+3),1)\ncheck('first start',solve([0,5],[3,2],0),0)\ncheck('end excluded',solve([0],[3],3),None)\ncheck('gap',solve([0,5],[3,2],4),None)\ncheck('empty',solve([],[],1),None)\ncheck('second interior',solve([0,5],[3,2],6),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-joined-span-map","generated_at":"2026-09-30T16:48:27.159386+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":"The global position is interpreted as an index into the chunk list.","sha256":"55bf285e60641a68366ea584288c9080b1e94d2d5d27a62a0a8e5d053ce00490","title":"A citation in joined text is attributed to the wrong chunk · 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.02,"exit_code":1,"observations":[{"actual":1,"check":"later chunk","expected":1,"passed":true},{"actual":0,"check":"first start","expected":0,"passed":true},{"actual":null,"check":"end excluded","expected":null,"passed":true},{"actual":1,"check":"gap","expected":null,"passed":false},{"actual":null,"check":"empty","expected":null,"passed":true},{"actual":1,"check":"second interior","expected":1,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"later chunk\", \"actual\": 1, \"expected\": 1, \"passed\": true}, {\"check\": \"first start\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"end excluded\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"gap\", \"actual\": 1, \"expected\": null, \"passed\": false}, {\"check\": \"empty\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"second interior\", \"actual\": 1, \"expected\": 1, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.342,"exit_code":1,"observations":[{"actual":null,"check":"later chunk","expected":1,"passed":false},{"actual":0,"check":"first start","expected":0,"passed":true},{"actual":null,"check":"end excluded","expected":null,"passed":true},{"actual":null,"check":"gap","expected":null,"passed":true},{"actual":null,"check":"empty","expected":null,"passed":true},{"actual":null,"check":"second interior","expected":1,"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"later chunk\", \"actual\": null, \"expected\": 1, \"passed\": false}, {\"check\": \"first start\", \"actual\": 0, \"expected\": 0, \"passed\": true}, {\"check\": \"end excluded\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"gap\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"empty\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"second interior\", \"actual\": null, \"expected\": 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."}}