{"abstract":"The stream ends before all declared media segments have been appended.","category":"Streaming segment lifecycle","checks":4,"contract":"Transition a stream to ended only after terminal manifest is known and both pending and active appends are exhausted.","evaluation_group":"xmed-end-of-stream-waits-for-queued-appends","failed_approach":"An idle live stream is incorrectly finalized despite no terminal manifest.","family":"xmed-end-of-stream-waits-for-queued-appends","id":"FA-11176","implementations":{"attempt":{"sha256":"5afba882e241dccf1330e71eff3ad6f1bb12a1dff90556c31d9bd562fa1251bc","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(manifest_ended, queue, inflight):\n    return \"ended\" if not queue and inflight is None else \"open\"\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1',solve(*(True, ['a'], None)),'open')\ncheck('fixture 2',solve(*(True, [], 'a')),'open')\ncheck('fixture 3',solve(*(True, [], None)),'ended')\ncheck('fixture 4',solve(*(False, [], None)),'open')\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":"67ef97131f378980cc8c63fddca2d3ae194c78cf7b259fa359ec8efc956d7c5f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(manifest_ended, queue, inflight):\n    return \"ended\" if manifest_ended else \"open\"\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1',solve(*(True, ['a'], None)),'open')\ncheck('fixture 2',solve(*(True, [], 'a')),'open')\ncheck('fixture 3',solve(*(True, [], None)),'ended')\ncheck('fixture 4',solve(*(False, [], None)),'open')\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":"a69e4a3e8b856824925e7c7f7b837249919a5e2bf2f234a850b5a095d3abda0b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(manifest_ended, queue, inflight):\n    return \"ended\" if manifest_ended and not queue and inflight is None else \"open\"\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1',solve(*(True, ['a'], None)),'open')\ncheck('fixture 2',solve(*(True, [], 'a')),'open')\ncheck('fixture 3',solve(*(True, [], None)),'ended')\ncheck('fixture 4',solve(*(False, [], None)),'open')\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-end-of-stream-waits-for-queued-appends","generated_at":"2026-09-29T14:38:45.604934+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: Transition a stream to ended only after terminal manifest is known and both pending and active appends are exhausted.","root_cause":"The stream ends before all declared media segments have been appended.","sha256":"a03f8ef7a512b2dc482e53be8cf45c41e2409d5cb7283a9546c8a788d8532946","title":"End of stream waits for queued appends · 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":40.326,"exit_code":1,"observations":[{"actual":"open","check":"fixture 1","expected":"open","passed":true},{"actual":"open","check":"fixture 2","expected":"open","passed":true},{"actual":"ended","check":"fixture 3","expected":"ended","passed":true},{"actual":"ended","check":"fixture 4","expected":"open","passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": \"open\", \"expected\": \"open\", \"passed\": true}, {\"check\": \"fixture 2\", \"actual\": \"open\", \"expected\": \"open\", \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": \"ended\", \"expected\": \"ended\", \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": \"ended\", \"expected\": \"open\", \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.057,"exit_code":1,"observations":[{"actual":"ended","check":"fixture 1","expected":"open","passed":false},{"actual":"ended","check":"fixture 2","expected":"open","passed":false},{"actual":"ended","check":"fixture 3","expected":"ended","passed":true},{"actual":"open","check":"fixture 4","expected":"open","passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": \"ended\", \"expected\": \"open\", \"passed\": false}, {\"check\": \"fixture 2\", \"actual\": \"ended\", \"expected\": \"open\", \"passed\": false}, {\"check\": \"fixture 3\", \"actual\": \"ended\", \"expected\": \"ended\", \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": \"open\", \"expected\": \"open\", \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":37.737,"exit_code":0,"observations":[{"actual":"open","check":"fixture 1","expected":"open","passed":true},{"actual":"open","check":"fixture 2","expected":"open","passed":true},{"actual":"ended","check":"fixture 3","expected":"ended","passed":true},{"actual":"open","check":"fixture 4","expected":"open","passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": \"open\", \"expected\": \"open\", \"passed\": true}, {\"check\": \"fixture 2\", \"actual\": \"open\", \"expected\": \"open\", \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": \"ended\", \"expected\": \"ended\", \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": \"open\", \"expected\": \"open\", \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}