{"abstract":"Adaptive PCM residual nibble is interpreted as sign magnitude.","category":"PCM sample encoding","checks":8,"contract":"Stipulated two-history adaptive PCM decoder with explicit integer predictor coefficients, floor divisor, signed residual nibble and fixed residual amplitude scale.","contract_signature":"codes, last, older, coefficients, divisor, delta","evaluation_group":"s3-pcm-pcm-two-tap-predictor","failed_approach":"Unsigned residuals push all negative corrections upward.","family":"s3-pcm-pcm-two-tap-predictor-residual-sign","id":"FA-49801","implementations":{"attempt":{"sha256":"f680301336c64bcac6a2dd00c71b1b5870d5cc5462960a03fcaa20343e8bcda5","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(codes, last, older, coefficients, divisor, delta):\n    out=[]\n    for code in codes:\n        predicted=(last*coefficients[0]+older*coefficients[1])//divisor\n        signed=code\n        sample=predicted+signed*delta\n        older,last=last,sample\n        out.append(sample)\n    return [out,last,older]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('oracle 1', solve(*([1, 15, 8, 7], 3, 1, [3, -1], 2, 2)), [[6, 5, -12, -7], -7, -12])\ncheck('oracle 2', solve(*([1, 2, 3], 2, -3, [1, 1], 3, 1)), [[0, 2, 3], 3, 2])\ncheck('oracle 3', solve(*([0, 0], -2, 1, [1, 2], 3, 4)), [[0, -2], -2, 0])\ncheck('oracle 4', solve(*([], 5, 2, [2, -1], 1, 1)), [[], 5, 2])\ncheck('oracle 5', solve(*([8, 0, 7], 0, 0, [1, 0], 1, 3)), [[-24, -24, -3], -3, -24])\ncheck('oracle 6', solve(*([15, 15, 1], 4, 3, [2, -1], 2, 2)), [[0, -4, -2], -2, -4])\ncheck('oracle 7', solve(*([2, 0, 14], -3, -1, [3, 1], 4, 1)), [[-1, -2, -4], -4, -2])\nif N == 1: check('variant packet 1', solve(*[[1, 15, 8, 7, 1, 15, 8, 7], 3, 1, [3, -1], 2, 2]), [[6, 5, -12, -7, -3, -3, -19, -13], -13, -19])\nif N == 2: check('variant packet 2', solve(*[[1, 15, 8, 7, 1, 15, 8, 7, 1, 15, 8, 7], 3, 1, [3, -1], 2, 2]), [[6, 5, -12, -7, -3, -3, -19, -13, -8, -8, -24, -18], -18, -24])\nif N == 3: check('variant packet 3', solve(*[[1, 15, 8, 7, 1, 15, 8, 7, 1, 15, 8, 7, 1, 15, 8, 7], 3, 1, [3, -1], 2, 2]), [[6, 5, -12, -7, -3, -3, -19, -13, -8, -8, -24, -18, -13, -13, -29, -23], -23, -29])\nif N == 4: check('variant packet 4', solve(*[[1, 15, 8, 7, 1, 15, 8, 7, 1, 15, 8, 7, 1, 15, 8, 7, 1, 15, 8, 7], 3, 1, [3, -1], 2, 2]), [[6, 5, -12, -7, -3, -3, -19, -13, -8, -8, -24, -18, -13, -13, -29, -23, -18, -18, -34, -28], -28, -34])\nif N == 5: check('variant packet 5', solve(*[[1, 15, 8, 7, 1, 15, 8, 7, 1, 15, 8, 7, 1, 15, 8, 7, 1, 15, 8, 7, 1, 15, 8, 7], 3, 1, [3, -1], 2, 2]), [[6, 5, -12, -7, -3, -3, -19, -13, -8, -8, -24, -18, -13, -13, -29, -23, -18, -18, -34, -28, -23, -23, -39, -33], -33, -39])\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"77c835451f8115e5d0222577bacc213eaf96d1304663fde16c8d206706187b87","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(codes, last, older, coefficients, divisor, delta):\n    out=[]\n    for code in codes:\n        predicted=(last*coefficients[0]+older*coefficients[1])//divisor\n        signed=-(code&7) if code&8 else code\n        sample=predicted+signed*delta\n        older,last=last,sample\n        out.append(sample)\n    return [out,last,older]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('oracle 1', solve(*([1, 15, 8, 7], 3, 1, [3, -1], 2, 2)), [[6, 5, -12, -7], -7, -12])\ncheck('oracle 2', solve(*([1, 2, 3], 2, -3, [1, 1], 3, 1)), [[0, 2, 3], 3, 2])\ncheck('oracle 3', solve(*([0, 0], -2, 1, [1, 2], 3, 4)), [[0, -2], -2, 0])\ncheck('oracle 4', solve(*([], 5, 2, [2, -1], 1, 1)), [[], 5, 2])\ncheck('oracle 5', solve(*([8, 0, 7], 0, 0, [1, 0], 1, 3)), [[-24, -24, -3], -3, -24])\ncheck('oracle 6', solve(*([15, 15, 1], 4, 3, [2, -1], 2, 2)), [[0, -4, -2], -2, -4])\ncheck('oracle 7', solve(*([2, 0, 14], -3, -1, [3, 1], 4, 1)), [[-1, -2, -4], -4, -2])\nif N == 1: check('variant packet 1', solve(*[[1, 15, 8, 7, 1, 15, 8, 7], 3, 1, [3, -1], 2, 2]), [[6, 5, -12, -7, -3, -3, -19, -13], -13, -19])\nif N == 2: check('variant packet 2', solve(*[[1, 15, 8, 7, 1, 15, 8, 7, 1, 15, 8, 7], 3, 1, [3, -1], 2, 2]), [[6, 5, -12, -7, -3, -3, -19, -13, -8, -8, -24, -18], -18, -24])\nif N == 3: check('variant packet 3', solve(*[[1, 15, 8, 7, 1, 15, 8, 7, 1, 15, 8, 7, 1, 15, 8, 7], 3, 1, [3, -1], 2, 2]), [[6, 5, -12, -7, -3, -3, -19, -13, -8, -8, -24, -18, -13, -13, -29, -23], -23, -29])\nif N == 4: check('variant packet 4', solve(*[[1, 15, 8, 7, 1, 15, 8, 7, 1, 15, 8, 7, 1, 15, 8, 7, 1, 15, 8, 7], 3, 1, [3, -1], 2, 2]), [[6, 5, -12, -7, -3, -3, -19, -13, -8, -8, -24, -18, -13, -13, -29, -23, -18, -18, -34, -28], -28, -34])\nif N == 5: check('variant packet 5', solve(*[[1, 15, 8, 7, 1, 15, 8, 7, 1, 15, 8, 7, 1, 15, 8, 7, 1, 15, 8, 7, 1, 15, 8, 7], 3, 1, [3, -1], 2, 2]), [[6, 5, -12, -7, -3, -3, -19, -13, -8, -8, -24, -18, -13, -13, -29, -23, -18, -18, -34, -28, -23, -23, -39, -33], -33, -39])\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":"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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"s3-pcm-pcm-two-tap-predictor-residual-sign","generated_at":"2026-09-29T14:45:03.457660+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Offline PCM interchange uses these exact bounded packet and sample representation decisions.","root_cause":"Adaptive PCM residual nibble is interpreted as sign magnitude.","sha256":"7699eb482c6bec9d98ccf91ce41565b702049c5a27f4b5aea3c2c45e5326ff93","title":"Pcm two tap predictor: residual sign · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"elapsed_ms":41.804,"exit_code":1,"observations":[{"actual":[[6,37,68,97],97,68],"check":"oracle 1","expected":[[6,5,-12,-7],-7,-12],"passed":false},{"actual":[[0,2,3],3,2],"check":"oracle 2","expected":[[0,2,3],3,2],"passed":true},{"actual":[[0,-2],-2,0],"check":"oracle 3","expected":[[0,-2],-2,0],"passed":true},{"actual":[[],5,2],"check":"oracle 4","expected":[[],5,2],"passed":true},{"actual":[[24,24,45],45,24],"check":"oracle 5","expected":[[-24,-24,-3],-3,-24],"passed":false},{"actual":[[32,60,46],46,60],"check":"oracle 6","expected":[[0,-4,-2],-2,-4],"passed":false},{"actual":[[-1,-2,12],12,-2],"check":"oracle 7","expected":[[-1,-2,-4],-4,-2],"passed":false},{"actual":[[6,37,68,97,113,151,186,217],217,186],"check":"variant packet 1","expected":[[6,5,-12,-7,-3,-3,-19,-13],-13,-19],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 1\", \"actual\": [[6, 37, 68, 97], 97, 68], \"expected\": [[6, 5, -12, -7], -7, -12], \"passed\": false}, {\"check\": \"oracle 2\", \"actual\": [[0, 2, 3], 3, 2], \"expected\": [[0, 2, 3], 3, 2], \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": [[0, -2], -2, 0], \"expected\": [[0, -2], -2, 0], \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": [[], 5, 2], \"expected\": [[], 5, 2], \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": [[24, 24, 45], 45, 24], \"expected\": [[-24, -24, -3], -3, -24], \"passed\": false}, {\"check\": \"oracle 6\", \"actual\": [[32, 60, 46], 46, 60], \"expected\": [[0, -4, -2], -2, -4], \"passed\": false}, {\"check\": \"oracle 7\", \"actual\": [[-1, -2, 12], 12, -2], \"expected\": [[-1, -2, -4], -4, -2], \"passed\": false}, {\"check\": \"variant packet 1\", \"actual\": [[6, 37, 68, 97, 113, 151, 186, 217], 217, 186], \"expected\": [[6, 5, -12, -7, -3, -3, -19, -13], -13, -19], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.871,"exit_code":1,"observations":[{"actual":[[6,-7,-14,-4],-4,-14],"check":"oracle 1","expected":[[6,5,-12,-7],-7,-12],"passed":false},{"actual":[[0,2,3],3,2],"check":"oracle 2","expected":[[0,2,3],3,2],"passed":true},{"actual":[[0,-2],-2,0],"check":"oracle 3","expected":[[0,-2],-2,0],"passed":true},{"actual":[[],5,2],"check":"oracle 4","expected":[[],5,2],"passed":true},{"actual":[[0,0,21],21,0],"check":"oracle 5","expected":[[-24,-24,-3],-3,-24],"passed":false},{"actual":[[-12,-28,-20],-20,-28],"check":"oracle 6","expected":[[0,-4,-2],-2,-4],"passed":false},{"actual":[[-1,-2,-8],-8,-2],"check":"oracle 7","expected":[[-1,-2,-4],-4,-2],"passed":false},{"actual":[[6,-7,-14,-4,3,-8,-14,-3],-3,-14],"check":"variant packet 1","expected":[[6,5,-12,-7,-3,-3,-19,-13],-13,-19],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 1\", \"actual\": [[6, -7, -14, -4], -4, -14], \"expected\": [[6, 5, -12, -7], -7, -12], \"passed\": false}, {\"check\": \"oracle 2\", \"actual\": [[0, 2, 3], 3, 2], \"expected\": [[0, 2, 3], 3, 2], \"passed\": true}, {\"check\": \"oracle 3\", \"actual\": [[0, -2], -2, 0], \"expected\": [[0, -2], -2, 0], \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": [[], 5, 2], \"expected\": [[], 5, 2], \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": [[0, 0, 21], 21, 0], \"expected\": [[-24, -24, -3], -3, -24], \"passed\": false}, {\"check\": \"oracle 6\", \"actual\": [[-12, -28, -20], -20, -28], \"expected\": [[0, -4, -2], -2, -4], \"passed\": false}, {\"check\": \"oracle 7\", \"actual\": [[-1, -2, -8], -8, -2], \"expected\": [[-1, -2, -4], -4, -2], \"passed\": false}, {\"check\": \"variant packet 1\", \"actual\": [[6, -7, -14, -4, 3, -8, -14, -3], -3, -14], \"expected\": [[6, 5, -12, -7, -3, -3, -19, -13], -13, -19], \"passed\": false}], \"passed\": false}\n"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}