{"abstract":"Equal offsets from distinct sources are merged.","category":"Chunk citation alignment","checks":6,"contract":"Rows are [source,start,end]; merge overlapping or touching spans only for same source and sort by source then offsets.","contract_signature":"rows","evaluation_group":"w3-cca-source_merge","failed_approach":"Merging strict overlaps leaves adjacent source intervals fragmented.","family":"w3-chunk-citation-alignment-source-aware-merge","id":"FA-99666","implementations":{"attempt":{"sha256":"aad37bf9e3c7e13d0dfbc3143d17acc4951a817bdce1cf93883f0c037b2aa8ed","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows):\n    out=[]\n    for src,s,e in sorted(rows):\n     if out and src==out[-1][0] and s<out[-1][2]: out[-1][2]=max(out[-1][2],e)\n     else: out.append([src,s,e])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('same interval sources',solve([['b',N,N+3],['a',N,N+2]]),[['a',N,N+2],['b',N,N+3]])\ncheck('same source overlap',solve([['a',0,3],['a',2,5]]),[['a',0,5]])\ncheck('touch same source',solve([['a',0,2],['a',2,4]]),[['a',0,4]])\ncheck('gap',solve([['a',0,1],['a',3,4]]),[['a',0,1],['a',3,4]])\ncheck('empty',solve([]),[])\ncheck('single',solve([['z',N,N+1]]),[['z',N,N+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":"bb37cfed34c1b19d934978a4cb7bbd1f80b3cd31c0eb0d0cb488737f24ae60d0","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(rows):\n    spans=sorted((s,e) for src,s,e in rows)\n    out=[]\n    for s,e in spans:\n     if out and s<=out[-1][1]: out[-1][1]=max(out[-1][1],e)\n     else: out.append([s,e])\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('same interval sources',solve([['b',N,N+3],['a',N,N+2]]),[['a',N,N+2],['b',N,N+3]])\ncheck('same source overlap',solve([['a',0,3],['a',2,5]]),[['a',0,5]])\ncheck('touch same source',solve([['a',0,2],['a',2,4]]),[['a',0,4]])\ncheck('gap',solve([['a',0,1],['a',3,4]]),[['a',0,1],['a',3,4]])\ncheck('empty',solve([]),[])\ncheck('single',solve([['z',N,N+1]]),[['z',N,N+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-source-aware-merge","generated_at":"2026-09-30T16:48:26.712695+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 merge key omits the source identifier.","sha256":"af14fac272217fa2afc35222411bb9e21b3f4aa8e35b580ecf0411eff4d74d0a","title":"Equal offsets from distinct sources are merged · 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":26.495,"exit_code":1,"observations":[{"actual":[["a",1,3],["b",1,4]],"check":"same interval sources","expected":[["a",1,3],["b",1,4]],"passed":true},{"actual":[["a",0,5]],"check":"same source overlap","expected":[["a",0,5]],"passed":true},{"actual":[["a",0,2],["a",2,4]],"check":"touch same source","expected":[["a",0,4]],"passed":false},{"actual":[["a",0,1],["a",3,4]],"check":"gap","expected":[["a",0,1],["a",3,4]],"passed":true},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[["z",1,2]],"check":"single","expected":[["z",1,2]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"same interval sources\", \"actual\": [[\"a\", 1, 3], [\"b\", 1, 4]], \"expected\": [[\"a\", 1, 3], [\"b\", 1, 4]], \"passed\": true}, {\"check\": \"same source overlap\", \"actual\": [[\"a\", 0, 5]], \"expected\": [[\"a\", 0, 5]], \"passed\": true}, {\"check\": \"touch same source\", \"actual\": [[\"a\", 0, 2], [\"a\", 2, 4]], \"expected\": [[\"a\", 0, 4]], \"passed\": false}, {\"check\": \"gap\", \"actual\": [[\"a\", 0, 1], [\"a\", 3, 4]], \"expected\": [[\"a\", 0, 1], [\"a\", 3, 4]], \"passed\": true}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"single\", \"actual\": [[\"z\", 1, 2]], \"expected\": [[\"z\", 1, 2]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.252,"exit_code":1,"observations":[{"actual":[[1,4]],"check":"same interval sources","expected":[["a",1,3],["b",1,4]],"passed":false},{"actual":[[0,5]],"check":"same source overlap","expected":[["a",0,5]],"passed":false},{"actual":[[0,4]],"check":"touch same source","expected":[["a",0,4]],"passed":false},{"actual":[[0,1],[3,4]],"check":"gap","expected":[["a",0,1],["a",3,4]],"passed":false},{"actual":[],"check":"empty","expected":[],"passed":true},{"actual":[[1,2]],"check":"single","expected":[["z",1,2]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"same interval sources\", \"actual\": [[1, 4]], \"expected\": [[\"a\", 1, 3], [\"b\", 1, 4]], \"passed\": false}, {\"check\": \"same source overlap\", \"actual\": [[0, 5]], \"expected\": [[\"a\", 0, 5]], \"passed\": false}, {\"check\": \"touch same source\", \"actual\": [[0, 4]], \"expected\": [[\"a\", 0, 4]], \"passed\": false}, {\"check\": \"gap\", \"actual\": [[0, 1], [3, 4]], \"expected\": [[\"a\", 0, 1], [\"a\", 3, 4]], \"passed\": false}, {\"check\": \"empty\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"single\", \"actual\": [[1, 2]], \"expected\": [[\"z\", 1, 2]], \"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."}}