{"abstract":"Positive full scale quantizes to unrepresentable 32768 without final clamping.","category":"PCM sample encoding","checks":4,"contract":"Convert finite float amplitudes to signed16 using scale32768, nearest ties toward positive infinity, then saturate.","evaluation_group":"xaud-float-to-pcm16-endpoint-clamp","failed_approach":"Scaling by32767 changes negative full scale and midscale quantization.","family":"xaud-float-to-pcm16-endpoint-clamp","id":"FA-10806","implementations":{"attempt":{"sha256":"05968941dc87855c2eee94ebeaf1b200932f596bc35659843e0e030dc6acb5fe","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(samples):\n    return [math.floor(x*32767+.5) for x in samples]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1',solve(*([-1, 0, 1],)),[-32768, 0, 32767])\ncheck('fixture 2',solve(*([0.5, -0.5],)),[16384, -16384])\ncheck('fixture 3',solve(*([2, -2],)),[32767, -32768])\ncheck('fixture 4',solve(*([],)),[])\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":"241e1ad5aa7e55d82d53713d6815096181ee2544356935dabdecc2c7adcc971b","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(samples):\n    return [math.floor(x*32768+.5) for x in samples]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1',solve(*([-1, 0, 1],)),[-32768, 0, 32767])\ncheck('fixture 2',solve(*([0.5, -0.5],)),[16384, -16384])\ncheck('fixture 3',solve(*([2, -2],)),[32767, -32768])\ncheck('fixture 4',solve(*([],)),[])\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"},"fixed":{"sha256":"a40b9b6c2d46335cf7292c4831f9ca5ecef56bda461b1bedbc750aff13d8b0df","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(samples):\n    return [max(-32768,min(32767,math.floor(x*32768+.5))) for x in samples]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1',solve(*([-1, 0, 1],)),[-32768, 0, 32767])\ncheck('fixture 2',solve(*([0.5, -0.5],)),[16384, -16384])\ncheck('fixture 3',solve(*([2, -2],)),[32767, -32768])\ncheck('fixture 4',solve(*([],)),[])\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":" 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":"xaud-float-to-pcm16-endpoint-clamp","generated_at":"2026-09-29T14:38:42.447190+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A pure Python local audio pipeline stage with explicit sample formats and frame conventions; no real-time device or signal-spectrum claims.","repair":"Apply the explicit PCM/playback contract: Convert finite float amplitudes to signed16 using scale32768, nearest ties toward positive infinity, then saturate.","root_cause":"Positive full scale quantizes to unrepresentable 32768 without final clamping.","sha256":"e38e836401f6cc2397b692e2466ca0d64ed27b2ec51eb0bf27b7fb2d3928a013","title":"Float to pcm16 endpoint clamp · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.672,"exit_code":1,"observations":[{"actual":[-32767,0,32767],"check":"fixture 1","expected":[-32768,0,32767],"passed":false},{"actual":[16384,-16383],"check":"fixture 2","expected":[16384,-16384],"passed":false},{"actual":[65534,-65534],"check":"fixture 3","expected":[32767,-32768],"passed":false},{"actual":[],"check":"fixture 4","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [-32767, 0, 32767], \"expected\": [-32768, 0, 32767], \"passed\": false}, {\"check\": \"fixture 2\", \"actual\": [16384, -16383], \"expected\": [16384, -16384], \"passed\": false}, {\"check\": \"fixture 3\", \"actual\": [65534, -65534], \"expected\": [32767, -32768], \"passed\": false}, {\"check\": \"fixture 4\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.401,"exit_code":1,"observations":[{"actual":[-32768,0,32768],"check":"fixture 1","expected":[-32768,0,32767],"passed":false},{"actual":[16384,-16384],"check":"fixture 2","expected":[16384,-16384],"passed":true},{"actual":[65536,-65536],"check":"fixture 3","expected":[32767,-32768],"passed":false},{"actual":[],"check":"fixture 4","expected":[],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [-32768, 0, 32768], \"expected\": [-32768, 0, 32767], \"passed\": false}, {\"check\": \"fixture 2\", \"actual\": [16384, -16384], \"expected\": [16384, -16384], \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": [65536, -65536], \"expected\": [32767, -32768], \"passed\": false}, {\"check\": \"fixture 4\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":45.196,"exit_code":0,"observations":[{"actual":[-32768,0,32767],"check":"fixture 1","expected":[-32768,0,32767],"passed":true},{"actual":[16384,-16384],"check":"fixture 2","expected":[16384,-16384],"passed":true},{"actual":[32767,-32768],"check":"fixture 3","expected":[32767,-32768],"passed":true},{"actual":[],"check":"fixture 4","expected":[],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [-32768, 0, 32767], \"expected\": [-32768, 0, 32767], \"passed\": true}, {\"check\": \"fixture 2\", \"actual\": [16384, -16384], \"expected\": [16384, -16384], \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": [32767, -32768], \"expected\": [32767, -32768], \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": [], \"expected\": [], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}