FAILURE MAP
← Case archive

FA-10981 / Audio playback scheduling / Open access

Dequeue audio preserves tail · case 01

A partial dequeue discards the rest of the queued audio.

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

ROOT CAUSE

A partial dequeue discards the rest of the queued audio.

VERIFIED REPAIR

Apply the explicit PCM/playback contract: Remove up to nonnegative count mono samples, returning [consumed,remaining] with every unconsumed sample retained.

Unsuccessful approach: Advancing the remainder by an extra sample loses one sample per callback.

Case contract

Remove up to nonnegative count mono samples, returning [consumed,remaining] with every unconsumed sample retained.

Why this case matters

A pure Python local audio pipeline stage with explicit sample formats and frame conventions; no real-time device or signal-spectrum claims.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(queue, count):
    return [queue[:count],[]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([1, 2, 3, 4], 2)),[[1, 2], [3, 4]])
check('fixture 2',solve(*([1], 3)),[[1], []])
check('fixture 3',solve(*([1, 2], 0)),[[], [1, 2]])
check('fixture 4',solve(*([], 0)),[[], []])
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[[1, 2], []][[1, 2], [3, 4]]Failed
fixture 2[[1], []][[1], []]Passed
fixture 3[[], []][[], [1, 2]]Failed
fixture 4[[], []][[], []]Passed

SHA-256 / 43c135f1045d07cfb66426f7ac84fda3f0282c6ec6443bc536fb3200e2475352

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(queue, count):
    return [queue[:count],queue[count+1:]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([1, 2, 3, 4], 2)),[[1, 2], [3, 4]])
check('fixture 2',solve(*([1], 3)),[[1], []])
check('fixture 3',solve(*([1, 2], 0)),[[], [1, 2]])
check('fixture 4',solve(*([], 0)),[[], []])
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[[1, 2], [4]][[1, 2], [3, 4]]Failed
fixture 2[[1], []][[1], []]Passed
fixture 3[[], [2]][[], [1, 2]]Failed
fixture 4[[], []][[], []]Passed

SHA-256 / ab2f4c568f5e02c34058693843b63c3301e827fb49f2f33cb1d0a27d4a3dedaf

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import math
N = 1
observations = []
def solve(queue, count):
    return [queue[:count],queue[count:]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([1, 2, 3, 4], 2)),[[1, 2], [3, 4]])
check('fixture 2',solve(*([1], 3)),[[1], []])
check('fixture 3',solve(*([1, 2], 0)),[[], [1, 2]])
check('fixture 4',solve(*([], 0)),[[], []])
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[[1, 2], [3, 4]][[1, 2], [3, 4]]Passed
fixture 2[[1], []][[1], []]Passed
fixture 3[[], [1, 2]][[], [1, 2]]Passed
fixture 4[[], []][[], []]Passed

SHA-256 / 23d6c6a2d466b8e8941d9b0d4f88964b508aef669a1f418ccb12bb49e1ddf010

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:43.850085+00:00.

Case digest / 61fc73834f3394031083cf4c8ae8aafb9ccf541b6afddd04722670c754b2fe1e