FAILURE MAP
← Case archive

FA-11001 / Audio playback scheduling / Open access

Stream reset discards old carry · case 01

Resetting the cursor retains samples from the previous stream incarnation.

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

ROOT CAUSE

Resetting the cursor retains samples from the previous stream incarnation.

VERIFIED REPAIR

Apply the explicit PCM/playback contract: Resetting playback clears incomplete frame carry and cursor together; without reset preserve both.

Unsuccessful approach: Unconditional reset clears carry and progress during ordinary playback.

Case contract

Resetting playback clears incomplete frame carry and cursor together; without reset preserve both.

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(carry, position, resetting):
    return [list(carry),0] if resetting else [list(carry),position]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1',solve(*([1], 8, True)),[[], 0])
check('fixture 2',solve(*([1], 8, False)),[[1], 8])
check('fixture 3',solve(*([], 0, True)),[[], 0])
check('fixture 4',solve(*([2, 3], 4, False)),[[2, 3], 4])
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], 0][[], 0]Failed
fixture 2[[1], 8][[1], 8]Passed
fixture 3[[], 0][[], 0]Passed
fixture 4[[2, 3], 4][[2, 3], 4]Passed

SHA-256 / 18f1aaa879a720640952b0b03e1f96be87edc509b00a57598ffd2cfcf4ebdb81

2 / The unsuccessful fix

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

SHA-256 / 39ce11cf29387e95ea62e2e8846f28dd50f8c2ecb78effa52ec21a258a49dd47

3 / The verified repair

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

SHA-256 / 7dbce8a951f4451e49484cf874105c0a0e6bf6a7d26bd26b2ff391eef6e0b505

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

Case digest / 1c77a5a84a86ef5cfd2c508ab402a69851009792adac415f962b1017eef95a7a