FAILURE MAP
← Case archive

FA-49491 / PCM sample encoding / Open access

Aiff pcm offset block: offset origin · case 01

PCM sound offset is measured before the sound-data preamble.

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

ROOT CAUSE

PCM sound offset is measured before the sound-data preamble.

VERIFIED REPAIR

Use the stated conversion contract at offset origin.

Unsuccessful approach: Treating relative offset as absolute discards chunk position.

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+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 fixtureActualExpectedOutcome
oracle 1[[103, 4, 0, True]][[111, 4, 0, True]]Failed
oracle 2[[12, 3, 0, True], [17, 2, 2, False]][[20, 3, 0, True], [25, 2, 2, False]]Failed
oracle 3[[0, 0, 0, True]][[8, 0, 0, True]]Failed
oracle 4[][]Passed
oracle 5[[12, 5, 1, False]][[20, 5, 1, False]]Failed
oracle 6[[18, 0, 0, True]][[26, 0, 0, True]]Failed
oracle 7[[0, 2, 0, True]][[8, 2, 0, False]]Failed
variant packet 1[[103, 4, 0, True], [103, 4, 0, True]][[111, 4, 0, True], [111, 4, 0, True]]Failed

SHA-256 / 0ce281c64893a69a75efd711e81ab1921ea7ad574675c959f6d9c23bbc846bf4

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=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 fixtureActualExpectedOutcome
oracle 1[[3, 4, 0, True]][[111, 4, 0, True]]Failed
oracle 2[[0, 3, 0, True], [1, 2, 2, False]][[20, 3, 0, True], [25, 2, 2, False]]Failed
oracle 3[[0, 0, 0, True]][[8, 0, 0, True]]Failed
oracle 4[][]Passed
oracle 5[[7, 5, 1, False]][[20, 5, 1, False]]Failed
oracle 6[[8, 0, 0, True]][[26, 0, 0, True]]Failed
oracle 7[[0, 2, 0, True]][[8, 2, 0, False]]Failed
variant packet 1[[3, 4, 0, True], [3, 4, 0, True]][[111, 4, 0, True], [111, 4, 0, True]]Failed

SHA-256 / 506b8e7acd7f668a509b4628863950558b1d49439b58ecadfd1aa6bb13eb927e

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

Case digest / 71e26936f84a371d92e9f12a9103ab8346cf51eb8febec21b33583951fae865b