FA-49501 / PCM sample encoding / Open access
Aiff pcm offset block: complete frame count · case 01
Partial PCM frame bytes are counted as a complete frame.
ROOT CAUSE
Partial PCM frame bytes are counted as a complete frame.
VERIFIED REPAIR
Use the stated conversion contract at complete frame count.
Unsuccessful approach: Reporting bytes as frames multiplies playback duration.
Case contract
For stipulated AIFF-like sound chunks, exclude the eight-byte offset/block preamble and offset prefix, count complete PCM frames and inspect absolute block alignment.
Why this case matters
Offline PCM interchange uses these exact bounded packet and sample representation decisions.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(blocks, frame_bytes):
out=[]
for chunk_start,chunk_size,offset,block_size in blocks:
start=chunk_start+8+offset
usable=max(0,chunk_size-8-offset)
frames=(usable+frame_bytes-1)//frame_bytes
remainder=usable%frame_bytes
aligned=(block_size==0 or start%block_size==0)
out.append([start,frames,remainder,aligned])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([[100, 27, 3, 1]], 4)), [[111, 4, 0, True]])
check('oracle 2', solve(*([[12, 20, 0, 4], [16, 19, 1, 4]], 4)), [[20, 3, 0, True], [25, 2, 2, False]])
check('oracle 3', solve(*([[0, 7, 0, 0]], 2)), [[8, 0, 0, True]])
check('oracle 4', solve(*([], 4)), [])
check('oracle 5', solve(*([[5, 31, 7, 8]], 3)), [[20, 5, 1, False]])
check('oracle 6', solve(*([[10, 12, 8, 0]], 2)), [[26, 0, 0, True]])
check('oracle 7', solve(*([[0, 16, 0, 16]], 4)), [[8, 2, 0, False]])
if N == 1: check('variant packet 1', solve(*[[[100, 27, 3, 1], [100, 27, 3, 1]], 4]), [[111, 4, 0, True], [111, 4, 0, True]])
if N == 2: check('variant packet 2', solve(*[[[100, 27, 3, 1], [100, 27, 3, 1], [100, 27, 3, 1]], 4]), [[111, 4, 0, True], [111, 4, 0, True], [111, 4, 0, True]])
if N == 3: check('variant packet 3', solve(*[[[100, 27, 3, 1], [100, 27, 3, 1], [100, 27, 3, 1], [100, 27, 3, 1]], 4]), [[111, 4, 0, True], [111, 4, 0, True], [111, 4, 0, True], [111, 4, 0, True]])
if N == 4: check('variant packet 4', solve(*[[[100, 27, 3, 1], [100, 27, 3, 1], [100, 27, 3, 1], [100, 27, 3, 1], [100, 27, 3, 1]], 4]), [[111, 4, 0, True], [111, 4, 0, True], [111, 4, 0, True], [111, 4, 0, True], [111, 4, 0, True]])
if N == 5: check('variant packet 5', solve(*[[[100, 27, 3, 1], [100, 27, 3, 1], [100, 27, 3, 1], [100, 27, 3, 1], [100, 27, 3, 1], [100, 27, 3, 1]], 4]), [[111, 4, 0, True], [111, 4, 0, True], [111, 4, 0, True], [111, 4, 0, True], [111, 4, 0, True], [111, 4, 0, True]])
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| oracle 1 | [[111, 4, 0, True]] | [[111, 4, 0, True]] | Passed |
| oracle 2 | [[20, 3, 0, True], [25, 3, 2, False]] | [[20, 3, 0, True], [25, 2, 2, False]] | Failed |
| oracle 3 | [[8, 0, 0, True]] | [[8, 0, 0, True]] | Passed |
| oracle 4 | [] | [] | Passed |
| oracle 5 | [[20, 6, 1, False]] | [[20, 5, 1, False]] | Failed |
| oracle 6 | [[26, 0, 0, True]] | [[26, 0, 0, True]] | Passed |
| oracle 7 | [[8, 2, 0, False]] | [[8, 2, 0, False]] | Passed |
| variant packet 1 | [[111, 4, 0, True], [111, 4, 0, True]] | [[111, 4, 0, True], [111, 4, 0, True]] | Passed |
SHA-256 / d5e199187b409ac34e811d8fae9f03c5cb779e16378373254df7bb7aa97cfc4f
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(blocks, frame_bytes):
out=[]
for chunk_start,chunk_size,offset,block_size in blocks:
start=chunk_start+8+offset
usable=max(0,chunk_size-8-offset)
frames=usable
remainder=usable%frame_bytes
aligned=(block_size==0 or start%block_size==0)
out.append([start,frames,remainder,aligned])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([[100, 27, 3, 1]], 4)), [[111, 4, 0, True]])
check('oracle 2', solve(*([[12, 20, 0, 4], [16, 19, 1, 4]], 4)), [[20, 3, 0, True], [25, 2, 2, False]])
check('oracle 3', solve(*([[0, 7, 0, 0]], 2)), [[8, 0, 0, True]])
check('oracle 4', solve(*([], 4)), [])
check('oracle 5', solve(*([[5, 31, 7, 8]], 3)), [[20, 5, 1, False]])
check('oracle 6', solve(*([[10, 12, 8, 0]], 2)), [[26, 0, 0, True]])
check('oracle 7', solve(*([[0, 16, 0, 16]], 4)), [[8, 2, 0, False]])
if N == 1: check('variant packet 1', solve(*[[[100, 27, 3, 1], [100, 27, 3, 1]], 4]), [[111, 4, 0, True], [111, 4, 0, True]])
if N == 2: check('variant packet 2', solve(*[[[100, 27, 3, 1], [100, 27, 3, 1], [100, 27, 3, 1]], 4]), [[111, 4, 0, True], [111, 4, 0, True], [111, 4, 0, True]])
if N == 3: check('variant packet 3', solve(*[[[100, 27, 3, 1], [100, 27, 3, 1], [100, 27, 3, 1], [100, 27, 3, 1]], 4]), [[111, 4, 0, True], [111, 4, 0, True], [111, 4, 0, True], [111, 4, 0, True]])
if N == 4: check('variant packet 4', solve(*[[[100, 27, 3, 1], [100, 27, 3, 1], [100, 27, 3, 1], [100, 27, 3, 1], [100, 27, 3, 1]], 4]), [[111, 4, 0, True], [111, 4, 0, True], [111, 4, 0, True], [111, 4, 0, True], [111, 4, 0, True]])
if N == 5: check('variant packet 5', solve(*[[[100, 27, 3, 1], [100, 27, 3, 1], [100, 27, 3, 1], [100, 27, 3, 1], [100, 27, 3, 1], [100, 27, 3, 1]], 4]), [[111, 4, 0, True], [111, 4, 0, True], [111, 4, 0, True], [111, 4, 0, True], [111, 4, 0, True], [111, 4, 0, True]])
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| oracle 1 | [[111, 16, 0, True]] | [[111, 4, 0, True]] | Failed |
| oracle 2 | [[20, 12, 0, True], [25, 10, 2, False]] | [[20, 3, 0, True], [25, 2, 2, False]] | Failed |
| oracle 3 | [[8, 0, 0, True]] | [[8, 0, 0, True]] | Passed |
| oracle 4 | [] | [] | Passed |
| oracle 5 | [[20, 16, 1, False]] | [[20, 5, 1, False]] | Failed |
| oracle 6 | [[26, 0, 0, True]] | [[26, 0, 0, True]] | Passed |
| oracle 7 | [[8, 8, 0, False]] | [[8, 2, 0, False]] | Failed |
| variant packet 1 | [[111, 16, 0, True], [111, 16, 0, True]] | [[111, 4, 0, True], [111, 4, 0, True]] | Failed |
SHA-256 / 977a0565989f82b654e0e408eaf17215392faac190231de9488e40fa9677750a
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(blocks, frame_bytes):
out=[]
for chunk_start,chunk_size,offset,block_size in blocks:
start=chunk_start+8+offset
usable=max(0,chunk_size-8-offset)
frames=usable//frame_bytes
remainder=usable%frame_bytes
aligned=(block_size==0 or start%block_size==0)
out.append([start,frames,remainder,aligned])
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([[100, 27, 3, 1]], 4)), [[111, 4, 0, True]])
check('oracle 2', solve(*([[12, 20, 0, 4], [16, 19, 1, 4]], 4)), [[20, 3, 0, True], [25, 2, 2, False]])
check('oracle 3', solve(*([[0, 7, 0, 0]], 2)), [[8, 0, 0, True]])
check('oracle 4', solve(*([], 4)), [])
check('oracle 5', solve(*([[5, 31, 7, 8]], 3)), [[20, 5, 1, False]])
check('oracle 6', solve(*([[10, 12, 8, 0]], 2)), [[26, 0, 0, True]])
check('oracle 7', solve(*([[0, 16, 0, 16]], 4)), [[8, 2, 0, False]])
if N == 1: check('variant packet 1', solve(*[[[100, 27, 3, 1], [100, 27, 3, 1]], 4]), [[111, 4, 0, True], [111, 4, 0, True]])
if N == 2: check('variant packet 2', solve(*[[[100, 27, 3, 1], [100, 27, 3, 1], [100, 27, 3, 1]], 4]), [[111, 4, 0, True], [111, 4, 0, True], [111, 4, 0, True]])
if N == 3: check('variant packet 3', solve(*[[[100, 27, 3, 1], [100, 27, 3, 1], [100, 27, 3, 1], [100, 27, 3, 1]], 4]), [[111, 4, 0, True], [111, 4, 0, True], [111, 4, 0, True], [111, 4, 0, True]])
if N == 4: check('variant packet 4', solve(*[[[100, 27, 3, 1], [100, 27, 3, 1], [100, 27, 3, 1], [100, 27, 3, 1], [100, 27, 3, 1]], 4]), [[111, 4, 0, True], [111, 4, 0, True], [111, 4, 0, True], [111, 4, 0, True], [111, 4, 0, True]])
if N == 5: check('variant packet 5', solve(*[[[100, 27, 3, 1], [100, 27, 3, 1], [100, 27, 3, 1], [100, 27, 3, 1], [100, 27, 3, 1], [100, 27, 3, 1]], 4]), [[111, 4, 0, True], [111, 4, 0, True], [111, 4, 0, True], [111, 4, 0, True], [111, 4, 0, True], [111, 4, 0, True]])
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| oracle 1 | [[111, 4, 0, True]] | [[111, 4, 0, True]] | Passed |
| oracle 2 | [[20, 3, 0, True], [25, 2, 2, False]] | [[20, 3, 0, True], [25, 2, 2, False]] | Passed |
| oracle 3 | [[8, 0, 0, True]] | [[8, 0, 0, True]] | Passed |
| oracle 4 | [] | [] | Passed |
| oracle 5 | [[20, 5, 1, False]] | [[20, 5, 1, False]] | Passed |
| oracle 6 | [[26, 0, 0, True]] | [[26, 0, 0, True]] | Passed |
| oracle 7 | [[8, 2, 0, False]] | [[8, 2, 0, False]] | Passed |
| variant packet 1 | [[111, 4, 0, True], [111, 4, 0, True]] | [[111, 4, 0, True], [111, 4, 0, True]] | Passed |
SHA-256 / 1cea7e9c0a73070746dd52c6d72784c4b2d83404b46a4ff5e2e8e84d7f37d423
Verification & scope
Stipulated finite model; no claim of hardware timing or full file-format conformance. 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:45:00.525062+00:00.
Case digest / 35beaec2376d86a0715bd9fed7b6a9e9cae2cc56adc83dda55e5197f144f5d39