{"abstract":"Removing a failed download from inflight without requeueing permanently loses that segment.","category":"Streaming segment lifecycle","checks":4,"contract":"A retryable failure moves its segment ID from inflight to the end of pending only if not already pending, preserving unrelated work.","evaluation_group":"xmed-download-failure-restores-pending","failed_approach":"Appending a retry while leaving it inflight blocks dispatch and may duplicate pending identities.","family":"xmed-download-failure-restores-pending","id":"FA-11156","implementations":{"attempt":{"sha256":"70108be5b2f7155262f55c2dff8a8a8f16ae18d527402f323f518d8e2da3c04b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(pending, inflight, identity):\n    return [list(pending)+[identity],list(inflight)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1',solve(*(['a'], ['b'], 'b')),[['a', 'b'], []])\ncheck('fixture 2',solve(*(['b'], ['b'], 'b')),[['b'], []])\ncheck('fixture 3',solve(*([], ['a', 'b'], 'a')),[['a'], ['b']])\ncheck('fixture 4',solve(*([], ['a'], 'a')),[['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":"e93eaa5394190fef31e94ae7697e50529e282eda179a440a89901900043a2359","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(pending, inflight, identity):\n    return [list(pending),[x for x in inflight if x!=identity]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1',solve(*(['a'], ['b'], 'b')),[['a', 'b'], []])\ncheck('fixture 2',solve(*(['b'], ['b'], 'b')),[['b'], []])\ncheck('fixture 3',solve(*([], ['a', 'b'], 'a')),[['a'], ['b']])\ncheck('fixture 4',solve(*([], ['a'], 'a')),[['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"},"fixed":{"sha256":"e785431dafa3957791b416b0b9dde41c8ace2965d2f00b71ecc8d0a84ffed5c5","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(pending, inflight, identity):\n    return [list(pending)+([identity] if identity not in pending else []),[x for x in inflight if x!=identity]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1',solve(*(['a'], ['b'], 'b')),[['a', 'b'], []])\ncheck('fixture 2',solve(*(['b'], ['b'], 'b')),[['b'], []])\ncheck('fixture 3',solve(*([], ['a', 'b'], 'a')),[['a'], ['b']])\ncheck('fixture 4',solve(*([], ['a'], 'a')),[['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":" 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-download-failure-restores-pending","generated_at":"2026-09-29T14:38:45.521401+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: A retryable failure moves its segment ID from inflight to the end of pending only if not already pending, preserving unrelated work.","root_cause":"Removing a failed download from inflight without requeueing permanently loses that segment.","sha256":"50a0c048bf8f9b9860a07b3169be746c8168fa1bba61d3b15ee0b7c0ff231e9e","title":"Download failure restores pending · 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":39.011,"exit_code":1,"observations":[{"actual":[["a","b"],["b"]],"check":"fixture 1","expected":[["a","b"],[]],"passed":false},{"actual":[["b","b"],["b"]],"check":"fixture 2","expected":[["b"],[]],"passed":false},{"actual":[["a"],["a","b"]],"check":"fixture 3","expected":[["a"],["b"]],"passed":false},{"actual":[["a"],["a"]],"check":"fixture 4","expected":[["a"],[]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [[\"a\", \"b\"], [\"b\"]], \"expected\": [[\"a\", \"b\"], []], \"passed\": false}, {\"check\": \"fixture 2\", \"actual\": [[\"b\", \"b\"], [\"b\"]], \"expected\": [[\"b\"], []], \"passed\": false}, {\"check\": \"fixture 3\", \"actual\": [[\"a\"], [\"a\", \"b\"]], \"expected\": [[\"a\"], [\"b\"]], \"passed\": false}, {\"check\": \"fixture 4\", \"actual\": [[\"a\"], [\"a\"]], \"expected\": [[\"a\"], []], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.46,"exit_code":1,"observations":[{"actual":[["a"],[]],"check":"fixture 1","expected":[["a","b"],[]],"passed":false},{"actual":[["b"],[]],"check":"fixture 2","expected":[["b"],[]],"passed":true},{"actual":[[],["b"]],"check":"fixture 3","expected":[["a"],["b"]],"passed":false},{"actual":[[],[]],"check":"fixture 4","expected":[["a"],[]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [[\"a\"], []], \"expected\": [[\"a\", \"b\"], []], \"passed\": false}, {\"check\": \"fixture 2\", \"actual\": [[\"b\"], []], \"expected\": [[\"b\"], []], \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": [[], [\"b\"]], \"expected\": [[\"a\"], [\"b\"]], \"passed\": false}, {\"check\": \"fixture 4\", \"actual\": [[], []], \"expected\": [[\"a\"], []], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.704,"exit_code":0,"observations":[{"actual":[["a","b"],[]],"check":"fixture 1","expected":[["a","b"],[]],"passed":true},{"actual":[["b"],[]],"check":"fixture 2","expected":[["b"],[]],"passed":true},{"actual":[["a"],["b"]],"check":"fixture 3","expected":[["a"],["b"]],"passed":true},{"actual":[["a"],[]],"check":"fixture 4","expected":[["a"],[]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [[\"a\", \"b\"], []], \"expected\": [[\"a\", \"b\"], []], \"passed\": true}, {\"check\": \"fixture 2\", \"actual\": [[\"b\"], []], \"expected\": [[\"b\"], []], \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": [[\"a\"], [\"b\"]], \"expected\": [[\"a\"], [\"b\"]], \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": [[\"a\"], []], \"expected\": [[\"a\"], []], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}