{"abstract":"Windowed export keeps original coordinates after clipping.","category":"Annotation span alignment","checks":7,"contract":"Clip spans to [left,right), discard zero-width results, and return coordinates relative to left while preserving labels.","contract_signature":"spans, left, right","evaluation_group":"annotation-span-window-clip-rebase","failed_approach":"Subtracting the origin before clipping can retain spans wholly before the window.","family":"w3-annotation-span-alignment-window-clip-rebase","id":"FA-100191","implementations":{"attempt":{"sha256":"cb0791f7d0cdcdec83518f94387cccec14de5281715db77a81ca3257b52cb278","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(spans, left, right):\n    return [[max(s-left,0),min(e-left,right-left),l] for s,e,l in spans if e>s]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('partial both sides', solve([[1,8,'x']],3,6), [[0,3,'x']])\ncheck('inside window', solve([[4,5,'x']],3,8), [[1,2,'x']])\ncheck('before window removed', solve([[0,3,'x']],3,8), [])\ncheck('after window removed', solve([[8,9,'x']],3,8), [])\ncheck('touch boundary removed', solve([[0,3,'x'],[8,9,'y']],3,8), [])\ncheck('empty spans', solve([],N,N+3), [])\ncheck('zero width window', solve([[1,5,'x']],3,3), [])\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":"0600e1d4a9db5ff5b4207bf89277abf819cfc74f626afc15fa34eb7362a6e47b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(spans, left, right):\n    return [[max(s,left),min(e,right),l] for s,e,l in spans if min(e,right)>max(s,left)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('partial both sides', solve([[1,8,'x']],3,6), [[0,3,'x']])\ncheck('inside window', solve([[4,5,'x']],3,8), [[1,2,'x']])\ncheck('before window removed', solve([[0,3,'x']],3,8), [])\ncheck('after window removed', solve([[8,9,'x']],3,8), [])\ncheck('touch boundary removed', solve([[0,3,'x'],[8,9,'y']],3,8), [])\ncheck('empty spans', solve([],N,N+3), [])\ncheck('zero width window', solve([[1,5,'x']],3,3), [])\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-window-clip-rebase","generated_at":"2026-09-30T16:48:32.646154+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":"Clipped spans are returned without subtracting the window origin.","sha256":"7fa2c56a5a9923b301e990819b1b48ce62388b0b5f7b589013762d8d650367e8","title":"Windowed export keeps original coordinates after clipping · 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":27.877,"exit_code":1,"observations":[{"actual":[[0,3,"x"]],"check":"partial both sides","expected":[[0,3,"x"]],"passed":true},{"actual":[[1,2,"x"]],"check":"inside window","expected":[[1,2,"x"]],"passed":true},{"actual":[[0,0,"x"]],"check":"before window removed","expected":[],"passed":false},{"actual":[[5,5,"x"]],"check":"after window removed","expected":[],"passed":false},{"actual":[[0,0,"x"],[5,5,"y"]],"check":"touch boundary removed","expected":[],"passed":false},{"actual":[],"check":"empty spans","expected":[],"passed":true},{"actual":[[0,0,"x"]],"check":"zero width window","expected":[],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"partial both sides\", \"actual\": [[0, 3, \"x\"]], \"expected\": [[0, 3, \"x\"]], \"passed\": true}, {\"check\": \"inside window\", \"actual\": [[1, 2, \"x\"]], \"expected\": [[1, 2, \"x\"]], \"passed\": true}, {\"check\": \"before window removed\", \"actual\": [[0, 0, \"x\"]], \"expected\": [], \"passed\": false}, {\"check\": \"after window removed\", \"actual\": [[5, 5, \"x\"]], \"expected\": [], \"passed\": false}, {\"check\": \"touch boundary removed\", \"actual\": [[0, 0, \"x\"], [5, 5, \"y\"]], \"expected\": [], \"passed\": false}, {\"check\": \"empty spans\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"zero width window\", \"actual\": [[0, 0, \"x\"]], \"expected\": [], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":26.288,"exit_code":1,"observations":[{"actual":[[3,6,"x"]],"check":"partial both sides","expected":[[0,3,"x"]],"passed":false},{"actual":[[4,5,"x"]],"check":"inside window","expected":[[1,2,"x"]],"passed":false},{"actual":[],"check":"before window removed","expected":[],"passed":true},{"actual":[],"check":"after window removed","expected":[],"passed":true},{"actual":[],"check":"touch boundary removed","expected":[],"passed":true},{"actual":[],"check":"empty spans","expected":[],"passed":true},{"actual":[],"check":"zero width window","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"partial both sides\", \"actual\": [[3, 6, \"x\"]], \"expected\": [[0, 3, \"x\"]], \"passed\": false}, {\"check\": \"inside window\", \"actual\": [[4, 5, \"x\"]], \"expected\": [[1, 2, \"x\"]], \"passed\": false}, {\"check\": \"before window removed\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"after window removed\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"touch boundary removed\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"empty spans\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"zero width window\", \"actual\": [], \"expected\": [], \"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."}}