FAILURE MAP
← Case archive

FA-11166 / Streaming segment lifecycle / Open access

Segment append must finish before next · case 01

A second append is started while the previous asynchronous append is still active.

Verified by executionVariant 1 · 4 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

A second append is started while the previous asynchronous append is still active.

VERIFIED REPAIR

Preserve the media contract: Schedule at most one source-buffer append: when busy retain queue; otherwise dequeue its head. Return [scheduled ID or None,pending].

Unsuccessful approach: Never dispatching avoids overlap but stalls all queued media.

Case contract

Schedule at most one source-buffer append: when busy retain queue; otherwise dequeue its head. Return [scheduled ID or None,pending].

Why this case matters

A deterministic local media controller stage; metadata and downloaded data are supplied explicitly. No external player, service or codec is required.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(queue, busy):
    return [queue[0],queue[1:]] if queue else [None,[]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*(['a', 'b'], True)),[None, ['a', 'b']])
check('fixture 2',solve(*(['a', 'b'], False)),['a', ['b']])
check('fixture 3',solve(*([], False)),[None, []])
check('fixture 4',solve(*(['a'], False)),['a', []])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 1['a', ['b']][None, ['a', 'b']]Failed
fixture 2['a', ['b']]['a', ['b']]Passed
fixture 3[None, []][None, []]Passed
fixture 4['a', []]['a', []]Passed

SHA-256 / 74415d1b5301fe6759d76c4c5fc8eb3aaac6dc070c86499044ddbb7617ffd78c

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(queue, busy):
    return [None,list(queue)]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*(['a', 'b'], True)),[None, ['a', 'b']])
check('fixture 2',solve(*(['a', 'b'], False)),['a', ['b']])
check('fixture 3',solve(*([], False)),[None, []])
check('fixture 4',solve(*(['a'], False)),['a', []])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 1[None, ['a', 'b']][None, ['a', 'b']]Passed
fixture 2[None, ['a', 'b']]['a', ['b']]Failed
fixture 3[None, []][None, []]Passed
fixture 4[None, ['a']]['a', []]Failed

SHA-256 / e63efad5c4d6a06cc79c109b64e5e613b816d0672711fa5a9d36bc9c71099f13

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(queue, busy):
    return [None,list(queue)] if busy or not queue else [queue[0],queue[1:]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*(['a', 'b'], True)),[None, ['a', 'b']])
check('fixture 2',solve(*(['a', 'b'], False)),['a', ['b']])
check('fixture 3',solve(*([], False)),[None, []])
check('fixture 4',solve(*(['a'], False)),['a', []])
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
fixture 1[None, ['a', 'b']][None, ['a', 'b']]Passed
fixture 2['a', ['b']]['a', ['b']]Passed
fixture 3[None, []][None, []]Passed
fixture 4['a', []]['a', []]Passed

SHA-256 / a3e05cf1c5fa1755d361b82f2b02107853fc92a673aa9776390ae4796f42a2fe

Verification & scope

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.

Observations recorded using Python 3.12.14 at 2026-09-29T14:38:45.562380+00:00.

Case digest / 5fad77696e67e9563c40e6d284e7d04cb28bbda58722aee13cfdfe4de7cacd3b