{"abstract":"Carry starts at output-count rather than consumed bit count.","category":"PCM sample encoding","checks":8,"contract":"Bounded one-bit-density to PCM adapter using nonoverlapping box windows; zero/one map to -1/+1 and incomplete input bits carry across packets.","contract_signature":"bits, factor, carry","evaluation_group":"s3-pcm-pcm-pdm-box-decimation","failed_approach":"Dropping the first trailing bit permanently changes sample phase.","family":"s3-pcm-pcm-pdm-box-decimation-trailing-bits","id":"FA-50031","implementations":{"attempt":{"sha256":"1edf1fb8c2f9db3f0f5bec1cd1543e8a82937fda6ad4759d56a0cbeda72ab36e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(bits, factor, carry):\n    combined=list(carry)+list(bits)\n    complete=len(combined)//factor\n    samples=[]\n    for group in range(complete):\n        window=combined[group*factor:(group+1)*factor]\n        amplitude=2*sum(window)-factor\n        samples.append(amplitude)\n    return [samples,combined[complete*factor+1:]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('oracle 1', solve(*([1, 0, 1, 1, 0, 0], 3, [])), [[1, -1], []])\ncheck('oracle 2', solve(*([1, 0, 0], 4, [1, 1])), [[2], [0]])\ncheck('oracle 3', solve(*([1, 1, 1, 1], 2, [])), [[2, 2], []])\ncheck('oracle 4', solve(*([], 4, [1])), [[], [1]])\ncheck('oracle 5', solve(*([0, 0, 0, 0], 4, [])), [[-4], []])\ncheck('oracle 6', solve(*([1], 1, [])), [[1], []])\ncheck('oracle 7', solve(*([0, 1, 0, 1, 1], 3, [0])), [[-1, 1], []])\nif N == 1: check('variant packet 1', solve(*[[1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0], 3, []]), [[1, -1, 1, -1], []])\nif N == 2: check('variant packet 2', solve(*[[1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0], 3, []]), [[1, -1, 1, -1, 1, -1], []])\nif N == 3: check('variant packet 3', solve(*[[1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0], 3, []]), [[1, -1, 1, -1, 1, -1, 1, -1], []])\nif N == 4: check('variant packet 4', solve(*[[1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0], 3, []]), [[1, -1, 1, -1, 1, -1, 1, -1, 1, -1], []])\nif N == 5: check('variant packet 5', solve(*[[1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0], 3, []]), [[1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1], []])\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":"4e2a78b5c47fc851bb4cdc390da154d28b36e0bffb856b465b62208927586507","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(bits, factor, carry):\n    combined=list(carry)+list(bits)\n    complete=len(combined)//factor\n    samples=[]\n    for group in range(complete):\n        window=combined[group*factor:(group+1)*factor]\n        amplitude=2*sum(window)-factor\n        samples.append(amplitude)\n    return [samples,combined[complete:]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('oracle 1', solve(*([1, 0, 1, 1, 0, 0], 3, [])), [[1, -1], []])\ncheck('oracle 2', solve(*([1, 0, 0], 4, [1, 1])), [[2], [0]])\ncheck('oracle 3', solve(*([1, 1, 1, 1], 2, [])), [[2, 2], []])\ncheck('oracle 4', solve(*([], 4, [1])), [[], [1]])\ncheck('oracle 5', solve(*([0, 0, 0, 0], 4, [])), [[-4], []])\ncheck('oracle 6', solve(*([1], 1, [])), [[1], []])\ncheck('oracle 7', solve(*([0, 1, 0, 1, 1], 3, [0])), [[-1, 1], []])\nif N == 1: check('variant packet 1', solve(*[[1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0], 3, []]), [[1, -1, 1, -1], []])\nif N == 2: check('variant packet 2', solve(*[[1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0], 3, []]), [[1, -1, 1, -1, 1, -1], []])\nif N == 3: check('variant packet 3', solve(*[[1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0], 3, []]), [[1, -1, 1, -1, 1, -1, 1, -1], []])\nif N == 4: check('variant packet 4', solve(*[[1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0], 3, []]), [[1, -1, 1, -1, 1, -1, 1, -1, 1, -1], []])\nif N == 5: check('variant packet 5', solve(*[[1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0, 0], 3, []]), [[1, -1, 1, -1, 1, -1, 1, -1, 1, -1, 1, -1], []])\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-pdm-box-decimation-trailing-bits","generated_at":"2026-09-29T14:45:05.461064+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":"Carry starts at output-count rather than consumed bit count.","sha256":"f58adacdb6d95f6fe995dcb3df74b620db8e25c454095be3b687a50c7af2be85","title":"Pcm pdm box decimation: trailing bits · 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":40.329,"exit_code":1,"observations":[{"actual":[[1,-1],[]],"check":"oracle 1","expected":[[1,-1],[]],"passed":true},{"actual":[[2],[]],"check":"oracle 2","expected":[[2],[0]],"passed":false},{"actual":[[2,2],[]],"check":"oracle 3","expected":[[2,2],[]],"passed":true},{"actual":[[],[]],"check":"oracle 4","expected":[[],[1]],"passed":false},{"actual":[[-4],[]],"check":"oracle 5","expected":[[-4],[]],"passed":true},{"actual":[[1],[]],"check":"oracle 6","expected":[[1],[]],"passed":true},{"actual":[[-1,1],[]],"check":"oracle 7","expected":[[-1,1],[]],"passed":true},{"actual":[[1,-1,1,-1],[]],"check":"variant packet 1","expected":[[1,-1,1,-1],[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 1\", \"actual\": [[1, -1], []], \"expected\": [[1, -1], []], \"passed\": true}, {\"check\": \"oracle 2\", \"actual\": [[2], []], \"expected\": [[2], [0]], \"passed\": false}, {\"check\": \"oracle 3\", \"actual\": [[2, 2], []], \"expected\": [[2, 2], []], \"passed\": true}, {\"check\": \"oracle 4\", \"actual\": [[], []], \"expected\": [[], [1]], \"passed\": false}, {\"check\": \"oracle 5\", \"actual\": [[-4], []], \"expected\": [[-4], []], \"passed\": true}, {\"check\": \"oracle 6\", \"actual\": [[1], []], \"expected\": [[1], []], \"passed\": true}, {\"check\": \"oracle 7\", \"actual\": [[-1, 1], []], \"expected\": [[-1, 1], []], \"passed\": true}, {\"check\": \"variant packet 1\", \"actual\": [[1, -1, 1, -1], []], \"expected\": [[1, -1, 1, -1], []], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":36.944,"exit_code":1,"observations":[{"actual":[[1,-1],[1,1,0,0]],"check":"oracle 1","expected":[[1,-1],[]],"passed":false},{"actual":[[2],[1,1,0,0]],"check":"oracle 2","expected":[[2],[0]],"passed":false},{"actual":[[2,2],[1,1]],"check":"oracle 3","expected":[[2,2],[]],"passed":false},{"actual":[[],[1]],"check":"oracle 4","expected":[[],[1]],"passed":true},{"actual":[[-4],[0,0,0]],"check":"oracle 5","expected":[[-4],[]],"passed":false},{"actual":[[1],[]],"check":"oracle 6","expected":[[1],[]],"passed":true},{"actual":[[-1,1],[1,0,1,1]],"check":"oracle 7","expected":[[-1,1],[]],"passed":false},{"actual":[[1,-1,1,-1],[0,0,1,0,1,1,0,0]],"check":"variant packet 1","expected":[[1,-1,1,-1],[]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"oracle 1\", \"actual\": [[1, -1], [1, 1, 0, 0]], \"expected\": [[1, -1], []], \"passed\": false}, {\"check\": \"oracle 2\", \"actual\": [[2], [1, 1, 0, 0]], \"expected\": [[2], [0]], \"passed\": false}, {\"check\": \"oracle 3\", \"actual\": [[2, 2], [1, 1]], \"expected\": [[2, 2], []], \"passed\": false}, {\"check\": \"oracle 4\", \"actual\": [[], [1]], \"expected\": [[], [1]], \"passed\": true}, {\"check\": \"oracle 5\", \"actual\": [[-4], [0, 0, 0]], \"expected\": [[-4], []], \"passed\": false}, {\"check\": \"oracle 6\", \"actual\": [[1], []], \"expected\": [[1], []], \"passed\": true}, {\"check\": \"oracle 7\", \"actual\": [[-1, 1], [1, 0, 1, 1]], \"expected\": [[-1, 1], []], \"passed\": false}, {\"check\": \"variant packet 1\", \"actual\": [[1, -1, 1, -1], [0, 0, 1, 0, 1, 1, 0, 0]], \"expected\": [[1, -1, 1, -1], []], \"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."}}