{"abstract":"Citations after an insertion retain stale offsets.","category":"Chunk citation alignment","checks":6,"contract":"Given span [s,e), insertion at p of length d shifts both endpoints when p <= s; shifts only end when s < p < e; otherwise unchanged.","contract_signature":"span, position, length","evaluation_group":"w3-cca-edit_shift","failed_approach":"Shifting only spans fully after the insertion misses spans that cross the insertion.","family":"w3-chunk-citation-alignment-edit-shift","id":"FA-99726","implementations":{"attempt":{"sha256":"6ec1e5b55d063c7ddf1d1f9b4b172e87d228b2cf2bf587d44a9063aa6d1bc1b6","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(span, position, length):\n    s,e=span\n    return [s+length,e+length] if s>=position else [s,e]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('after insertion',solve([N+2,N+5],N,3),[N+5,N+8])\ncheck('crosses insertion',solve([N-2,N+2],N,3),[N-2,N+5])\ncheck('before insertion',solve([0,2],N+2,4),[0,2])\ncheck('at start',solve([N,N+2],N,1),[N+1,N+3])\ncheck('at end',solve([N-2,N],N,2),[N-2,N])\ncheck('zero insertion',solve([1,4],2,0),[1,4])\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":"5d6d5eb188c11fd2f29e7c4bb64b0d48f33f9fdc2037e39b0b92d8536b96291e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(span, position, length):\n    s,e=span\n    return [s,e]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('after insertion',solve([N+2,N+5],N,3),[N+5,N+8])\ncheck('crosses insertion',solve([N-2,N+2],N,3),[N-2,N+5])\ncheck('before insertion',solve([0,2],N+2,4),[0,2])\ncheck('at start',solve([N,N+2],N,1),[N+1,N+3])\ncheck('at end',solve([N-2,N],N,2),[N-2,N])\ncheck('zero insertion',solve([1,4],2,0),[1,4])\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-edit-shift","generated_at":"2026-09-30T16:48:27.615445+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 source edit shifts later positions but citation offsets are copied unchanged.","sha256":"1f9ebc222c9266e04529ed31d126afa6fd29ee5468cd165abb242800e5a75d32","title":"Citations after an insertion retain stale offsets · 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.395,"exit_code":1,"observations":[{"actual":[6,9],"check":"after insertion","expected":[6,9],"passed":true},{"actual":[-1,3],"check":"crosses insertion","expected":[-1,6],"passed":false},{"actual":[0,2],"check":"before insertion","expected":[0,2],"passed":true},{"actual":[2,4],"check":"at start","expected":[2,4],"passed":true},{"actual":[-1,1],"check":"at end","expected":[-1,1],"passed":true},{"actual":[1,4],"check":"zero insertion","expected":[1,4],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"after insertion\", \"actual\": [6, 9], \"expected\": [6, 9], \"passed\": true}, {\"check\": \"crosses insertion\", \"actual\": [-1, 3], \"expected\": [-1, 6], \"passed\": false}, {\"check\": \"before insertion\", \"actual\": [0, 2], \"expected\": [0, 2], \"passed\": true}, {\"check\": \"at start\", \"actual\": [2, 4], \"expected\": [2, 4], \"passed\": true}, {\"check\": \"at end\", \"actual\": [-1, 1], \"expected\": [-1, 1], \"passed\": true}, {\"check\": \"zero insertion\", \"actual\": [1, 4], \"expected\": [1, 4], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.138,"exit_code":1,"observations":[{"actual":[3,6],"check":"after insertion","expected":[6,9],"passed":false},{"actual":[-1,3],"check":"crosses insertion","expected":[-1,6],"passed":false},{"actual":[0,2],"check":"before insertion","expected":[0,2],"passed":true},{"actual":[1,3],"check":"at start","expected":[2,4],"passed":false},{"actual":[-1,1],"check":"at end","expected":[-1,1],"passed":true},{"actual":[1,4],"check":"zero insertion","expected":[1,4],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"after insertion\", \"actual\": [3, 6], \"expected\": [6, 9], \"passed\": false}, {\"check\": \"crosses insertion\", \"actual\": [-1, 3], \"expected\": [-1, 6], \"passed\": false}, {\"check\": \"before insertion\", \"actual\": [0, 2], \"expected\": [0, 2], \"passed\": true}, {\"check\": \"at start\", \"actual\": [1, 3], \"expected\": [2, 4], \"passed\": false}, {\"check\": \"at end\", \"actual\": [-1, 1], \"expected\": [-1, 1], \"passed\": true}, {\"check\": \"zero insertion\", \"actual\": [1, 4], \"expected\": [1, 4], \"passed\": true}], \"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."}}