{"abstract":"Nested annotations are sorted by end before start.","category":"Annotation span alignment","checks":7,"contract":"Return [start,end,label] spans sorted by start ascending, then end descending, then label ascending.","contract_signature":"spans","evaluation_group":"annotation-span-stable-span-order","failed_approach":"Sorting by start alone leaves equal-start annotations nondeterministic.","family":"w3-annotation-span-alignment-stable-span-order","id":"FA-100176","implementations":{"attempt":{"sha256":"81d459bdb18b64a81ba06867fcf20787e539c0ad8bb915b94d55d0120450fe48","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(spans):\n    return sorted(spans,key=lambda x:x[0])\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('nested first container', solve([[2,4,'b'],[2,9,'a'],[1,3,'z']]), [[1,3,'z'],[2,9,'a'],[2,4,'b']])\ncheck('equal bounds label tie', solve([[0,2,'z'],[0,2,'a']]), [[0,2,'a'],[0,2,'z']])\ncheck('later start', solve([[4,5,'x'],[1,8,'y']]), [[1,8,'y'],[4,5,'x']])\ncheck('empty list', solve([]), [])\ncheck('singleton', solve([[N,N+1,'x']]), [[N,N+1,'x']])\ncheck('same start long first', solve([[N,N+2,'b'],[N,N+3,'a']]), [[N,N+3,'a'],[N,N+2,'b']])\ncheck('same length labels', solve([[3,6,'b'],[3,6,'a']]), [[3,6,'a'],[3,6,'b']])\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":"3b71eca9597833024c072e2820906216e51e36e9c869a86c98d579cbea0ea90c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(spans):\n    return sorted(spans,key=lambda x:(x[1],x[0],x[2]))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('nested first container', solve([[2,4,'b'],[2,9,'a'],[1,3,'z']]), [[1,3,'z'],[2,9,'a'],[2,4,'b']])\ncheck('equal bounds label tie', solve([[0,2,'z'],[0,2,'a']]), [[0,2,'a'],[0,2,'z']])\ncheck('later start', solve([[4,5,'x'],[1,8,'y']]), [[1,8,'y'],[4,5,'x']])\ncheck('empty list', solve([]), [])\ncheck('singleton', solve([[N,N+1,'x']]), [[N,N+1,'x']])\ncheck('same start long first', solve([[N,N+2,'b'],[N,N+3,'a']]), [[N,N+3,'a'],[N,N+2,'b']])\ncheck('same length labels', solve([[3,6,'b'],[3,6,'a']]), [[3,6,'a'],[3,6,'b']])\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":"Contracts use integer offsets, explicit edits, and supplied token boundaries; they do not define a tokenizer or production annotation format. 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-annotation-span-alignment-stable-span-order","generated_at":"2026-09-30T16:48:32.646507+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A small offline annotation transformation keeps span coordinates explicit when text or token boundaries change.","root_cause":"Sorting by end position places a short nested span before its container.","sha256":"ed1898691b8d0d56c3ca4b5ebb732e846ab2a3e9d6a2cdf3699ddecd6244a21d","title":"Nested annotations are sorted by end before start · 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.304,"exit_code":1,"observations":[{"actual":[[1,3,"z"],[2,4,"b"],[2,9,"a"]],"check":"nested first container","expected":[[1,3,"z"],[2,9,"a"],[2,4,"b"]],"passed":false},{"actual":[[0,2,"z"],[0,2,"a"]],"check":"equal bounds label tie","expected":[[0,2,"a"],[0,2,"z"]],"passed":false},{"actual":[[1,8,"y"],[4,5,"x"]],"check":"later start","expected":[[1,8,"y"],[4,5,"x"]],"passed":true},{"actual":[],"check":"empty list","expected":[],"passed":true},{"actual":[[1,2,"x"]],"check":"singleton","expected":[[1,2,"x"]],"passed":true},{"actual":[[1,3,"b"],[1,4,"a"]],"check":"same start long first","expected":[[1,4,"a"],[1,3,"b"]],"passed":false},{"actual":[[3,6,"b"],[3,6,"a"]],"check":"same length labels","expected":[[3,6,"a"],[3,6,"b"]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"nested first container\", \"actual\": [[1, 3, \"z\"], [2, 4, \"b\"], [2, 9, \"a\"]], \"expected\": [[1, 3, \"z\"], [2, 9, \"a\"], [2, 4, \"b\"]], \"passed\": false}, {\"check\": \"equal bounds label tie\", \"actual\": [[0, 2, \"z\"], [0, 2, \"a\"]], \"expected\": [[0, 2, \"a\"], [0, 2, \"z\"]], \"passed\": false}, {\"check\": \"later start\", \"actual\": [[1, 8, \"y\"], [4, 5, \"x\"]], \"expected\": [[1, 8, \"y\"], [4, 5, \"x\"]], \"passed\": true}, {\"check\": \"empty list\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"singleton\", \"actual\": [[1, 2, \"x\"]], \"expected\": [[1, 2, \"x\"]], \"passed\": true}, {\"check\": \"same start long first\", \"actual\": [[1, 3, \"b\"], [1, 4, \"a\"]], \"expected\": [[1, 4, \"a\"], [1, 3, \"b\"]], \"passed\": false}, {\"check\": \"same length labels\", \"actual\": [[3, 6, \"b\"], [3, 6, \"a\"]], \"expected\": [[3, 6, \"a\"], [3, 6, \"b\"]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":27.456,"exit_code":1,"observations":[{"actual":[[1,3,"z"],[2,4,"b"],[2,9,"a"]],"check":"nested first container","expected":[[1,3,"z"],[2,9,"a"],[2,4,"b"]],"passed":false},{"actual":[[0,2,"a"],[0,2,"z"]],"check":"equal bounds label tie","expected":[[0,2,"a"],[0,2,"z"]],"passed":true},{"actual":[[4,5,"x"],[1,8,"y"]],"check":"later start","expected":[[1,8,"y"],[4,5,"x"]],"passed":false},{"actual":[],"check":"empty list","expected":[],"passed":true},{"actual":[[1,2,"x"]],"check":"singleton","expected":[[1,2,"x"]],"passed":true},{"actual":[[1,3,"b"],[1,4,"a"]],"check":"same start long first","expected":[[1,4,"a"],[1,3,"b"]],"passed":false},{"actual":[[3,6,"a"],[3,6,"b"]],"check":"same length labels","expected":[[3,6,"a"],[3,6,"b"]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"nested first container\", \"actual\": [[1, 3, \"z\"], [2, 4, \"b\"], [2, 9, \"a\"]], \"expected\": [[1, 3, \"z\"], [2, 9, \"a\"], [2, 4, \"b\"]], \"passed\": false}, {\"check\": \"equal bounds label tie\", \"actual\": [[0, 2, \"a\"], [0, 2, \"z\"]], \"expected\": [[0, 2, \"a\"], [0, 2, \"z\"]], \"passed\": true}, {\"check\": \"later start\", \"actual\": [[4, 5, \"x\"], [1, 8, \"y\"]], \"expected\": [[1, 8, \"y\"], [4, 5, \"x\"]], \"passed\": false}, {\"check\": \"empty list\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"singleton\", \"actual\": [[1, 2, \"x\"]], \"expected\": [[1, 2, \"x\"]], \"passed\": true}, {\"check\": \"same start long first\", \"actual\": [[1, 3, \"b\"], [1, 4, \"a\"]], \"expected\": [[1, 4, \"a\"], [1, 3, \"b\"]], \"passed\": false}, {\"check\": \"same length labels\", \"actual\": [[3, 6, \"a\"], [3, 6, \"b\"]], \"expected\": [[3, 6, \"a\"], [3, 6, \"b\"]], \"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."}}