FAILURE MAP
← Case archive

FA-49511 / PCM sample encoding / Open access

Aiff pcm offset block: block alignment · case 01

Block alignment is checked at the enclosing chunk instead of first PCM byte.

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

ROOT CAUSE

Block alignment is checked at the enclosing chunk instead of first PCM byte.

VERIFIED REPAIR

Use the stated conversion contract at block alignment.

Unsuccessful approach: Checking offset alone ignores absolute placement.

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
        remainder=usable%frame_bytes
        aligned=(block_size==0 or chunk_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, True]][[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, 5, 1, False]][[20, 5, 1, False]]Passed
oracle 6[[26, 0, 0, True]][[26, 0, 0, True]]Passed
oracle 7[[8, 2, 0, True]][[8, 2, 0, False]]Failed
variant packet 1[[111, 4, 0, True], [111, 4, 0, True]][[111, 4, 0, True], [111, 4, 0, True]]Passed

SHA-256 / 47b5b692e973deabad9f017e3b1a7f282daf2b2e376ea6db66927a4b30d1db01

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//frame_bytes
        remainder=usable%frame_bytes
        aligned=(block_size==0 or offset%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, True]][[8, 2, 0, False]]Failed
variant packet 1[[111, 4, 0, True], [111, 4, 0, True]][[111, 4, 0, True], [111, 4, 0, True]]Passed

SHA-256 / 4cfa1101dc1afae41f938eb9bcb9df58d3118bfd995d8713e66277f516a25058

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

Case digest / 349036a2477a8a06a5bceb49183cf472930e8d3e77d45cac2281575f713166b7