{"abstract":"A contiguous write discards the portion crossing the ring end.","category":"Audio playback scheduling","checks":4,"contract":"Write at most capacity incoming samples into a nonempty ring buffer at valid position, wrapping once and preserving unwritten slots.","evaluation_group":"xaud-write-ring-wraparound","failed_approach":"Writing from buffer zero ignores the ring write cursor.","family":"xaud-write-ring-wraparound","id":"FA-10986","implementations":{"attempt":{"sha256":"fbc48f68c2d570816d86b18b3002aa126ac29fa319520f0356f94543832fb114","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(buffer, position, incoming):\n    return [incoming[i] if i<len(incoming) else x for i,x in enumerate(buffer)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1',solve(*([0, 0, 0, 0], 3, [7, 8])),[8, 0, 0, 7])\ncheck('fixture 2',solve(*([1, 2, 3], 1, [9])),[1, 9, 3])\ncheck('fixture 3',solve(*([1, 2], 0, [])),[1, 2])\ncheck('fixture 4',solve(*([0, 0], 0, [5, 6])),[5, 6])\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":"0c241b6c23ae6af3213a2e3e4ff5efbf8586c63217b98bf899ae9538d330a157","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(buffer, position, incoming):\n    return [incoming[i-position] if position<=i<position+len(incoming) else x for i,x in enumerate(buffer)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1',solve(*([0, 0, 0, 0], 3, [7, 8])),[8, 0, 0, 7])\ncheck('fixture 2',solve(*([1, 2, 3], 1, [9])),[1, 9, 3])\ncheck('fixture 3',solve(*([1, 2], 0, [])),[1, 2])\ncheck('fixture 4',solve(*([0, 0], 0, [5, 6])),[5, 6])\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":"597084a256363b1f0f8c407012a06d787b8d77d0b60d434a1a322c4bbcbee6c3","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\nimport math\nN = 1\nobservations = []\ndef solve(buffer, position, incoming):\n    return [(incoming[(i-position)%len(buffer)] if (i-position)%len(buffer)<len(incoming) else x) for i,x in enumerate(buffer)]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1',solve(*([0, 0, 0, 0], 3, [7, 8])),[8, 0, 0, 7])\ncheck('fixture 2',solve(*([1, 2, 3], 1, [9])),[1, 9, 3])\ncheck('fixture 3',solve(*([1, 2], 0, [])),[1, 2])\ncheck('fixture 4',solve(*([0, 0], 0, [5, 6])),[5, 6])\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-write-ring-wraparound","generated_at":"2026-09-29T14:38:43.971123+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: Write at most capacity incoming samples into a nonempty ring buffer at valid position, wrapping once and preserving unwritten slots.","root_cause":"A contiguous write discards the portion crossing the ring end.","sha256":"2f0f11b54fa46e4c004724d40e5d0d6ed15397befb828eb9c40986f63eed0ec2","title":"Write ring wraparound · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":37.03,"exit_code":1,"observations":[{"actual":[7,8,0,0],"check":"fixture 1","expected":[8,0,0,7],"passed":false},{"actual":[9,2,3],"check":"fixture 2","expected":[1,9,3],"passed":false},{"actual":[1,2],"check":"fixture 3","expected":[1,2],"passed":true},{"actual":[5,6],"check":"fixture 4","expected":[5,6],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [7, 8, 0, 0], \"expected\": [8, 0, 0, 7], \"passed\": false}, {\"check\": \"fixture 2\", \"actual\": [9, 2, 3], \"expected\": [1, 9, 3], \"passed\": false}, {\"check\": \"fixture 3\", \"actual\": [1, 2], \"expected\": [1, 2], \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": [5, 6], \"expected\": [5, 6], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.009,"exit_code":1,"observations":[{"actual":[0,0,0,7],"check":"fixture 1","expected":[8,0,0,7],"passed":false},{"actual":[1,9,3],"check":"fixture 2","expected":[1,9,3],"passed":true},{"actual":[1,2],"check":"fixture 3","expected":[1,2],"passed":true},{"actual":[5,6],"check":"fixture 4","expected":[5,6],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [0, 0, 0, 7], \"expected\": [8, 0, 0, 7], \"passed\": false}, {\"check\": \"fixture 2\", \"actual\": [1, 9, 3], \"expected\": [1, 9, 3], \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": [1, 2], \"expected\": [1, 2], \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": [5, 6], \"expected\": [5, 6], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":39.893,"exit_code":0,"observations":[{"actual":[8,0,0,7],"check":"fixture 1","expected":[8,0,0,7],"passed":true},{"actual":[1,9,3],"check":"fixture 2","expected":[1,9,3],"passed":true},{"actual":[1,2],"check":"fixture 3","expected":[1,2],"passed":true},{"actual":[5,6],"check":"fixture 4","expected":[5,6],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [8, 0, 0, 7], \"expected\": [8, 0, 0, 7], \"passed\": true}, {\"check\": \"fixture 2\", \"actual\": [1, 9, 3], \"expected\": [1, 9, 3], \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": [1, 2], \"expected\": [1, 2], \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": [5, 6], \"expected\": [5, 6], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}