{"abstract":"Inclusive segment ends select the previous segment at a shared boundary.","category":"Streaming segment lifecycle","checks":4,"contract":"Select segment ID containing a presentation time using nonoverlapping sorted half-open intervals; gaps and final endpoint return None.","evaluation_group":"xmed-segment-selection-by-time-interval","failed_approach":"Making both boundaries strict loses the exact start of every segment.","family":"xmed-segment-selection-by-time-interval","id":"FA-11181","implementations":{"attempt":{"sha256":"de7d1bc64ae3a23ccf241ca29747321328be622d72ff8bdcc644e1461b9568dd","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(segments, time):\n    return next((identity for identity,start,end in segments if start<time<end),None)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1',solve(*([['a', 0, 5], ['b', 5, 10]], 5)),'b')\ncheck('fixture 2',solve(*([['a', 0, 5]], 0)),'a')\ncheck('fixture 3',solve(*([['a', 0, 5]], 5)),None)\ncheck('fixture 4',solve(*([], 2)),None)\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":"fb446979bcf6df38012d3bdc2574b818febf87de78fff741d420dc0cd1bbb8f6","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(segments, time):\n    return next((identity for identity,start,end in segments if start<=time<=end),None)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1',solve(*([['a', 0, 5], ['b', 5, 10]], 5)),'b')\ncheck('fixture 2',solve(*([['a', 0, 5]], 0)),'a')\ncheck('fixture 3',solve(*([['a', 0, 5]], 5)),None)\ncheck('fixture 4',solve(*([], 2)),None)\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"},"fixed":{"sha256":"7e7c947ba2c777687ac9cec670c3a0a8e3d654d945afffdf9b4a2a57064125b2","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(segments, time):\n    return next((identity for identity,start,end in segments if start<=time<end),None)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1',solve(*([['a', 0, 5], ['b', 5, 10]], 5)),'b')\ncheck('fixture 2',solve(*([['a', 0, 5]], 0)),'a')\ncheck('fixture 3',solve(*([['a', 0, 5]], 5)),None)\ncheck('fixture 4',solve(*([], 2)),None)\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":" 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":"xmed-segment-selection-by-time-interval","generated_at":"2026-09-29T14:38:45.605213+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic local media controller stage; metadata and downloaded data are supplied explicitly. No external player, service or codec is required.","repair":"Preserve the media contract: Select segment ID containing a presentation time using nonoverlapping sorted half-open intervals; gaps and final endpoint return None.","root_cause":"Inclusive segment ends select the previous segment at a shared boundary.","sha256":"cc0667a7b5ef723ecc49c0c16011b13269e72aa3160deb64580b6d27a497642c","title":"Segment selection by time interval · case 01","variant":1,"variant_policy":"The five numbered cases rerun the same authored boundary fixtures; they are reproducibility runs, not independent input variants.","verification":{"attempt":{"elapsed_ms":36.581,"exit_code":1,"observations":[{"actual":null,"check":"fixture 1","expected":"b","passed":false},{"actual":null,"check":"fixture 2","expected":"a","passed":false},{"actual":null,"check":"fixture 3","expected":null,"passed":true},{"actual":null,"check":"fixture 4","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": null, \"expected\": \"b\", \"passed\": false}, {\"check\": \"fixture 2\", \"actual\": null, \"expected\": \"a\", \"passed\": false}, {\"check\": \"fixture 3\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.21,"exit_code":1,"observations":[{"actual":"a","check":"fixture 1","expected":"b","passed":false},{"actual":"a","check":"fixture 2","expected":"a","passed":true},{"actual":"a","check":"fixture 3","expected":null,"passed":false},{"actual":null,"check":"fixture 4","expected":null,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": \"a\", \"expected\": \"b\", \"passed\": false}, {\"check\": \"fixture 2\", \"actual\": \"a\", \"expected\": \"a\", \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": \"a\", \"expected\": null, \"passed\": false}, {\"check\": \"fixture 4\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":38.877,"exit_code":0,"observations":[{"actual":"b","check":"fixture 1","expected":"b","passed":true},{"actual":"a","check":"fixture 2","expected":"a","passed":true},{"actual":null,"check":"fixture 3","expected":null,"passed":true},{"actual":null,"check":"fixture 4","expected":null,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": \"b\", \"expected\": \"b\", \"passed\": true}, {\"check\": \"fixture 2\", \"actual\": \"a\", \"expected\": \"a\", \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": null, \"expected\": null, \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": null, \"expected\": null, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}