{"abstract":"The last cited source replaces a higher-priority source.","category":"Chunk citation alignment","checks":6,"contract":"Rows [source_id,rank]; return source ID of lowest rank, then lexical ID; empty input returns None.","contract_signature":"sources","evaluation_group":"xc-lfu-tie-by-recency","failed_approach":"Sorting by rank alone makes tied source choice depend on input order.","family":"w3-chunk-citation-alignment-source-priority","id":"FA-99691","implementations":{"attempt":{"sha256":"bf3e79b17119b47ac5ff0c1d792a7274ffdde3db927cfa96cef8895904dca3c2","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(sources):\n    return min(sources,key=lambda x:x[1])[0] if sources else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('rank wins',solve([['b',2],['a',1]]),'a')\ncheck('tie lexical',solve([['z',1],['a',1]]),'a')\ncheck('empty',solve([]),None)\ncheck('single',solve([['q',N]]),'q')\ncheck('negative rank',solve([['x',0],['y',-1]]),'y')\ncheck('input reversal',solve([['a',1],['z',1]]),'a')\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":"88ec935d7e96d16fd91916241e1a15a9402a7c8da7d4eb899208c61717710eb1","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(sources):\n    return sources[-1][0] if sources else None\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('rank wins',solve([['b',2],['a',1]]),'a')\ncheck('tie lexical',solve([['z',1],['a',1]]),'a')\ncheck('empty',solve([]),None)\ncheck('single',solve([['q',N]]),'q')\ncheck('negative rank',solve([['x',0],['y',-1]]),'y')\ncheck('input reversal',solve([['a',1],['z',1]]),'a')\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-priority","generated_at":"2026-09-30T16:48:27.159125+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":"Source precedence is inferred from list order rather than the declared rank.","sha256":"a733240fe6526108ae17c43e50b6eaae1b9150f90c247edf1c97190e02b0f3d1","title":"The last cited source replaces a higher-priority source · 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":28.621,"exit_code":1,"observations":[{"actual":"a","check":"rank wins","expected":"a","passed":true},{"actual":"z","check":"tie lexical","expected":"a","passed":false},{"actual":null,"check":"empty","expected":null,"passed":true},{"actual":"q","check":"single","expected":"q","passed":true},{"actual":"y","check":"negative rank","expected":"y","passed":true},{"actual":"a","check":"input reversal","expected":"a","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"rank wins\", \"actual\": \"a\", \"expected\": \"a\", \"passed\": true}, {\"check\": \"tie lexical\", \"actual\": \"z\", \"expected\": \"a\", \"passed\": false}, {\"check\": \"empty\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"single\", \"actual\": \"q\", \"expected\": \"q\", \"passed\": true}, {\"check\": \"negative rank\", \"actual\": \"y\", \"expected\": \"y\", \"passed\": true}, {\"check\": \"input reversal\", \"actual\": \"a\", \"expected\": \"a\", \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":28.703,"exit_code":1,"observations":[{"actual":"a","check":"rank wins","expected":"a","passed":true},{"actual":"a","check":"tie lexical","expected":"a","passed":true},{"actual":null,"check":"empty","expected":null,"passed":true},{"actual":"q","check":"single","expected":"q","passed":true},{"actual":"y","check":"negative rank","expected":"y","passed":true},{"actual":"z","check":"input reversal","expected":"a","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"rank wins\", \"actual\": \"a\", \"expected\": \"a\", \"passed\": true}, {\"check\": \"tie lexical\", \"actual\": \"a\", \"expected\": \"a\", \"passed\": true}, {\"check\": \"empty\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"single\", \"actual\": \"q\", \"expected\": \"q\", \"passed\": true}, {\"check\": \"negative rank\", \"actual\": \"y\", \"expected\": \"y\", \"passed\": true}, {\"check\": \"input reversal\", \"actual\": \"z\", \"expected\": \"a\", \"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."}}