FAILURE MAP
← Case archive

FA-49821 / PCM sample encoding / Open access

Pcm adaptation table: current delta · case 01

Adaptation always scales the minimum rather than evolving delta.

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

ROOT CAUSE

Adaptation always scales the minimum rather than evolving delta.

VERIFIED REPAIR

Use the stated conversion contract at current delta.

Unsuccessful approach: Adding factor mixes fixed-point ratio and amplitude units.

Case contract

Apply a stipulated 16-code fixed-point PCM adaptation table sequentially, enforcing a minimum positive amplitude delta and returning continuation scale.

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(codes, delta, minimum, table):
    out=[]
    for code in codes:
        factor=table[code&15]
        product=minimum*factor
        delta=max(minimum,product//256)
        out.append(delta)
    return [out,delta]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230])), [[17, 40, 95, 85], 85])
check('oracle 2', solve(*([0, 0, 0, 0], 5, 4, [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128])), [[4, 4, 4, 4], 4])
check('oracle 3', solve(*([1, 2, 3], 10, 1, [200, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, 310, 320, 330, 340, 350])), [[8, 6, 5], 5])
check('oracle 4', solve(*([], 8, 2, [256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256])), [[], 8])
check('oracle 5', solve(*([15, 8, 0], 9, 3, [200, 208, 216, 224, 232, 240, 248, 256, 264, 272, 280, 288, 296, 304, 312, 320])), [[11, 11, 8], 8])
check('oracle 6', solve(*([7, 7], 4, 4, [256, 256, 256, 256, 256, 256, 256, 512, 256, 256, 256, 256, 256, 256, 256, 256])), [[8, 16], 16])
check('oracle 7', solve(*([0, 1], 1, 1, [128, 768, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256])), [[1, 3], 3])
if N == 1: check('variant packet 1', solve(*[[0, 7, 8, 15, 0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230]]), [[17, 40, 95, 85, 76, 182, 436, 391], 391])
if N == 2: check('variant packet 2', solve(*[[0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230]]), [[17, 40, 95, 85, 76, 182, 436, 391, 351, 841, 2017, 1812], 1812])
if N == 3: check('variant packet 3', solve(*[[0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230]]), [[17, 40, 95, 85, 76, 182, 436, 391, 351, 841, 2017, 1812, 1627, 3902, 9358, 8407], 8407])
if N == 4: check('variant packet 4', solve(*[[0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230]]), [[17, 40, 95, 85, 76, 182, 436, 391, 351, 841, 2017, 1812, 1627, 3902, 9358, 8407, 7553, 18115, 43447, 39034], 39034])
if N == 5: check('variant packet 5', solve(*[[0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230]]), [[17, 40, 95, 85, 76, 182, 436, 391, 351, 841, 2017, 1812, 1627, 3902, 9358, 8407, 7553, 18115, 43447, 39034, 35069, 84110, 201732, 181243], 181243])
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[[4, 9, 9, 4], 4][[17, 40, 95, 85], 85]Failed
oracle 2[[4, 4, 4, 4], 4][[4, 4, 4, 4], 4]Passed
oracle 3[[1, 1, 1], 1][[8, 6, 5], 5]Failed
oracle 4[[], 8][[], 8]Passed
oracle 5[[3, 3, 3], 3][[11, 11, 8], 8]Failed
oracle 6[[8, 8], 8][[8, 16], 16]Failed
oracle 7[[1, 3], 3][[1, 3], 3]Passed
variant packet 1[[4, 9, 9, 4, 4, 9, 9, 4], 4][[17, 40, 95, 85, 76, 182, 436, 391], 391]Failed

SHA-256 / c2700a7b3310993079f889a9caa55c546832da2c784fefcbc7d2d8df36182034

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(codes, delta, minimum, table):
    out=[]
    for code in codes:
        factor=table[code&15]
        product=delta+factor
        delta=max(minimum,product//256)
        out.append(delta)
    return [out,delta]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230])), [[17, 40, 95, 85], 85])
check('oracle 2', solve(*([0, 0, 0, 0], 5, 4, [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128])), [[4, 4, 4, 4], 4])
check('oracle 3', solve(*([1, 2, 3], 10, 1, [200, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, 310, 320, 330, 340, 350])), [[8, 6, 5], 5])
check('oracle 4', solve(*([], 8, 2, [256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256])), [[], 8])
check('oracle 5', solve(*([15, 8, 0], 9, 3, [200, 208, 216, 224, 232, 240, 248, 256, 264, 272, 280, 288, 296, 304, 312, 320])), [[11, 11, 8], 8])
check('oracle 6', solve(*([7, 7], 4, 4, [256, 256, 256, 256, 256, 256, 256, 512, 256, 256, 256, 256, 256, 256, 256, 256])), [[8, 16], 16])
check('oracle 7', solve(*([0, 1], 1, 1, [128, 768, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256])), [[1, 3], 3])
if N == 1: check('variant packet 1', solve(*[[0, 7, 8, 15, 0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230]]), [[17, 40, 95, 85, 76, 182, 436, 391], 391])
if N == 2: check('variant packet 2', solve(*[[0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230]]), [[17, 40, 95, 85, 76, 182, 436, 391, 351, 841, 2017, 1812], 1812])
if N == 3: check('variant packet 3', solve(*[[0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230]]), [[17, 40, 95, 85, 76, 182, 436, 391, 351, 841, 2017, 1812, 1627, 3902, 9358, 8407], 8407])
if N == 4: check('variant packet 4', solve(*[[0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230]]), [[17, 40, 95, 85, 76, 182, 436, 391, 351, 841, 2017, 1812, 1627, 3902, 9358, 8407, 7553, 18115, 43447, 39034], 39034])
if N == 5: check('variant packet 5', solve(*[[0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230]]), [[17, 40, 95, 85, 76, 182, 436, 391, 351, 841, 2017, 1812, 1627, 3902, 9358, 8407, 7553, 18115, 43447, 39034, 35069, 84110, 201732, 181243], 181243])
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[[4, 4, 4, 4], 4][[17, 40, 95, 85], 85]Failed
oracle 2[[4, 4, 4, 4], 4][[4, 4, 4, 4], 4]Passed
oracle 3[[1, 1, 1], 1][[8, 6, 5], 5]Failed
oracle 4[[], 8][[], 8]Passed
oracle 5[[3, 3, 3], 3][[11, 11, 8], 8]Failed
oracle 6[[4, 4], 4][[8, 16], 16]Failed
oracle 7[[1, 3], 3][[1, 3], 3]Passed
variant packet 1[[4, 4, 4, 4, 4, 4, 4, 4], 4][[17, 40, 95, 85, 76, 182, 436, 391], 391]Failed

SHA-256 / 29009c538ef0c4c615cfd4a531812119aa410e6a1fcf537d82d211ae55b6bdc0

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(codes, delta, minimum, table):
    out=[]
    for code in codes:
        factor=table[code&15]
        product=delta*factor
        delta=max(minimum,product//256)
        out.append(delta)
    return [out,delta]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('oracle 1', solve(*([0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230])), [[17, 40, 95, 85], 85])
check('oracle 2', solve(*([0, 0, 0, 0], 5, 4, [128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128])), [[4, 4, 4, 4], 4])
check('oracle 3', solve(*([1, 2, 3], 10, 1, [200, 210, 220, 230, 240, 250, 260, 270, 280, 290, 300, 310, 320, 330, 340, 350])), [[8, 6, 5], 5])
check('oracle 4', solve(*([], 8, 2, [256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256])), [[], 8])
check('oracle 5', solve(*([15, 8, 0], 9, 3, [200, 208, 216, 224, 232, 240, 248, 256, 264, 272, 280, 288, 296, 304, 312, 320])), [[11, 11, 8], 8])
check('oracle 6', solve(*([7, 7], 4, 4, [256, 256, 256, 256, 256, 256, 256, 512, 256, 256, 256, 256, 256, 256, 256, 256])), [[8, 16], 16])
check('oracle 7', solve(*([0, 1], 1, 1, [128, 768, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256, 256])), [[1, 3], 3])
if N == 1: check('variant packet 1', solve(*[[0, 7, 8, 15, 0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230]]), [[17, 40, 95, 85, 76, 182, 436, 391], 391])
if N == 2: check('variant packet 2', solve(*[[0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230]]), [[17, 40, 95, 85, 76, 182, 436, 391, 351, 841, 2017, 1812], 1812])
if N == 3: check('variant packet 3', solve(*[[0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230]]), [[17, 40, 95, 85, 76, 182, 436, 391, 351, 841, 2017, 1812, 1627, 3902, 9358, 8407], 8407])
if N == 4: check('variant packet 4', solve(*[[0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230]]), [[17, 40, 95, 85, 76, 182, 436, 391, 351, 841, 2017, 1812, 1627, 3902, 9358, 8407, 7553, 18115, 43447, 39034], 39034])
if N == 5: check('variant packet 5', solve(*[[0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15, 0, 7, 8, 15], 20, 4, [230, 230, 230, 230, 307, 409, 512, 614, 614, 512, 409, 307, 230, 230, 230, 230]]), [[17, 40, 95, 85, 76, 182, 436, 391, 351, 841, 2017, 1812, 1627, 3902, 9358, 8407, 7553, 18115, 43447, 39034, 35069, 84110, 201732, 181243], 181243])
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[[17, 40, 95, 85], 85][[17, 40, 95, 85], 85]Passed
oracle 2[[4, 4, 4, 4], 4][[4, 4, 4, 4], 4]Passed
oracle 3[[8, 6, 5], 5][[8, 6, 5], 5]Passed
oracle 4[[], 8][[], 8]Passed
oracle 5[[11, 11, 8], 8][[11, 11, 8], 8]Passed
oracle 6[[8, 16], 16][[8, 16], 16]Passed
oracle 7[[1, 3], 3][[1, 3], 3]Passed
variant packet 1[[17, 40, 95, 85, 76, 182, 436, 391], 391][[17, 40, 95, 85, 76, 182, 436, 391], 391]Passed

SHA-256 / ac398c765caeb6f955461bf73fe9a2e69eb45dc120cf4f4fe5f557e917274543

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

Case digest / c93de5392b40767f56d0732a022de5cb4e7550e479d8b09c5f51a6cfa68212cf