{"abstract":"A one-byte consumed body is admitted for replay","category":"HTTP retries","checks":7,"contract":"Events open, send(nonnegative bytes), fail(known_unprocessed bool), retry, succeed. State tracks whether any bytes were emitted by a one-shot stream. A failure known unprocessed does not restore consumed stream bytes. Only an open stream with zero consumed bytes may retry. Terminal success closes the logical request. Output one decision per retry and terminal success.","evaluation_group":"s3-http_retries-one-shot-body","failed_approach":"The attempted repair changes the faulty site to elif consumed < 0: but still violates a regression oracle.","family":"s3-http_retries-one-shot-body-zero-safe","id":"FA-29401","implementations":{"attempt":{"sha256":"c19f9f2d7348eebb6f0cfd702d7d667507462bc0e2a07e072f6e1fd6f8b2ecb3","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events):\n    opened = False; consumed = 0; failed = False; terminal = False; out = []\n    for e in events:\n        if e[0] == 'open':\n            opened = True\n            consumed = 0\n            failed = False\n            terminal = False\n        elif e[0] == 'send' and opened and not terminal:\n            consumed += e[1]\n        elif e[0] == 'fail' and opened and not terminal:\n            failed = True\n        elif e[0] == 'retry':\n            if terminal:\n                out.append('terminal')\n            elif not opened:\n                out.append('no-body')\n            elif not failed:\n                out.append('no-failure')\n            elif consumed < 0:\n                out.append('unreplayable')\n            else:\n                out.append('retry')\n                failed = False\n        elif e[0] == 'succeed' and opened and not terminal:\n            terminal = True\n            out.append('success')\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('0', solve([]), [])\ncheck('1', solve([('retry',)]), ['no-body'])\ncheck('2', solve([('open',),('retry',),('fail',True),('retry',),('retry',)]), ['no-failure','retry','no-failure'])\ncheck('3', solve([('open',),('send',1),('send',0),('fail',True),('retry',)]), ['unreplayable'])\ncheck('4', solve([('open',),('send',N),('fail',False),('retry',),('open',),('fail',False),('retry',)]), ['unreplayable','retry'])\ncheck('5', solve([('open',),('succeed',),('retry',),('open',),('fail',True),('retry',)]), ['success','terminal','retry'])\ncheck('6', solve([('open',),('send',0),('fail',False),('retry',),('succeed',),('retry',)]), ['retry','success','terminal'])\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":"399beb6d7265c9ad07caad1b47b743986c43e0b9f69e1581e74105f7b6741b9d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events):\n    opened = False; consumed = 0; failed = False; terminal = False; out = []\n    for e in events:\n        if e[0] == 'open':\n            opened = True\n            consumed = 0\n            failed = False\n            terminal = False\n        elif e[0] == 'send' and opened and not terminal:\n            consumed += e[1]\n        elif e[0] == 'fail' and opened and not terminal:\n            failed = True\n        elif e[0] == 'retry':\n            if terminal:\n                out.append('terminal')\n            elif not opened:\n                out.append('no-body')\n            elif not failed:\n                out.append('no-failure')\n            elif consumed > 1:\n                out.append('unreplayable')\n            else:\n                out.append('retry')\n                failed = False\n        elif e[0] == 'succeed' and opened and not terminal:\n            terminal = True\n            out.append('success')\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('0', solve([]), [])\ncheck('1', solve([('retry',)]), ['no-body'])\ncheck('2', solve([('open',),('retry',),('fail',True),('retry',),('retry',)]), ['no-failure','retry','no-failure'])\ncheck('3', solve([('open',),('send',1),('send',0),('fail',True),('retry',)]), ['unreplayable'])\ncheck('4', solve([('open',),('send',N),('fail',False),('retry',),('open',),('fail',False),('retry',)]), ['unreplayable','retry'])\ncheck('5', solve([('open',),('succeed',),('retry',),('open',),('fail',True),('retry',)]), ['success','terminal','retry'])\ncheck('6', solve([('open',),('send',0),('fail',False),('retry',),('succeed',),('retry',)]), ['retry','success','terminal'])\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":"c12e429efcab33f8b6acc89e00d7b6391bf9095add0ab1702fc47db2b6155519","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events):\n    opened = False; consumed = 0; failed = False; terminal = False; out = []\n    for e in events:\n        if e[0] == 'open':\n            opened = True\n            consumed = 0\n            failed = False\n            terminal = False\n        elif e[0] == 'send' and opened and not terminal:\n            consumed += e[1]\n        elif e[0] == 'fail' and opened and not terminal:\n            failed = True\n        elif e[0] == 'retry':\n            if terminal:\n                out.append('terminal')\n            elif not opened:\n                out.append('no-body')\n            elif not failed:\n                out.append('no-failure')\n            elif consumed != 0:\n                out.append('unreplayable')\n            else:\n                out.append('retry')\n                failed = False\n        elif e[0] == 'succeed' and opened and not terminal:\n            terminal = True\n            out.append('success')\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('0', solve([]), [])\ncheck('1', solve([('retry',)]), ['no-body'])\ncheck('2', solve([('open',),('retry',),('fail',True),('retry',),('retry',)]), ['no-failure','retry','no-failure'])\ncheck('3', solve([('open',),('send',1),('send',0),('fail',True),('retry',)]), ['unreplayable'])\ncheck('4', solve([('open',),('send',N),('fail',False),('retry',),('open',),('fail',False),('retry',)]), ['unreplayable','retry'])\ncheck('5', solve([('open',),('succeed',),('retry',),('open',),('fail',True),('retry',)]), ['success','terminal','retry'])\ncheck('6', solve([('open',),('send',0),('fail',False),('retry',),('succeed',),('retry',)]), ['retry','success','terminal'])\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 bounded simulator, not a complete HTTP implementation or a standards conformance claim. 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-http_retries-one-shot-body-zero-safe","generated_at":"2026-09-29T14:41:42.859525+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Offline deterministic model of HTTP request retries.","repair":"Reject every positive consumed prefix for a one-shot stream.","root_cause":"A one-byte consumed body is admitted for replay","sha256":"2d4f2ab200fe65d9f5602597c1aed6aefd14ea2a6a25c9564c5b083e260aceaf","title":"One-shot request body replay refusal: A one-byte consumed body is admitted for replay · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.778,"exit_code":1,"observations":[{"actual":[],"check":"0","expected":[],"passed":true},{"actual":["no-body"],"check":"1","expected":["no-body"],"passed":true},{"actual":["no-failure","retry","no-failure"],"check":"2","expected":["no-failure","retry","no-failure"],"passed":true},{"actual":["retry"],"check":"3","expected":["unreplayable"],"passed":false},{"actual":["retry","retry"],"check":"4","expected":["unreplayable","retry"],"passed":false},{"actual":["success","terminal","retry"],"check":"5","expected":["success","terminal","retry"],"passed":true},{"actual":["retry","success","terminal"],"check":"6","expected":["retry","success","terminal"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"0\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"1\", \"actual\": [\"no-body\"], \"expected\": [\"no-body\"], \"passed\": true}, {\"check\": \"2\", \"actual\": [\"no-failure\", \"retry\", \"no-failure\"], \"expected\": [\"no-failure\", \"retry\", \"no-failure\"], \"passed\": true}, {\"check\": \"3\", \"actual\": [\"retry\"], \"expected\": [\"unreplayable\"], \"passed\": false}, {\"check\": \"4\", \"actual\": [\"retry\", \"retry\"], \"expected\": [\"unreplayable\", \"retry\"], \"passed\": false}, {\"check\": \"5\", \"actual\": [\"success\", \"terminal\", \"retry\"], \"expected\": [\"success\", \"terminal\", \"retry\"], \"passed\": true}, {\"check\": \"6\", \"actual\": [\"retry\", \"success\", \"terminal\"], \"expected\": [\"retry\", \"success\", \"terminal\"], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":37.923,"exit_code":1,"observations":[{"actual":[],"check":"0","expected":[],"passed":true},{"actual":["no-body"],"check":"1","expected":["no-body"],"passed":true},{"actual":["no-failure","retry","no-failure"],"check":"2","expected":["no-failure","retry","no-failure"],"passed":true},{"actual":["retry"],"check":"3","expected":["unreplayable"],"passed":false},{"actual":["retry","retry"],"check":"4","expected":["unreplayable","retry"],"passed":false},{"actual":["success","terminal","retry"],"check":"5","expected":["success","terminal","retry"],"passed":true},{"actual":["retry","success","terminal"],"check":"6","expected":["retry","success","terminal"],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"0\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"1\", \"actual\": [\"no-body\"], \"expected\": [\"no-body\"], \"passed\": true}, {\"check\": \"2\", \"actual\": [\"no-failure\", \"retry\", \"no-failure\"], \"expected\": [\"no-failure\", \"retry\", \"no-failure\"], \"passed\": true}, {\"check\": \"3\", \"actual\": [\"retry\"], \"expected\": [\"unreplayable\"], \"passed\": false}, {\"check\": \"4\", \"actual\": [\"retry\", \"retry\"], \"expected\": [\"unreplayable\", \"retry\"], \"passed\": false}, {\"check\": \"5\", \"actual\": [\"success\", \"terminal\", \"retry\"], \"expected\": [\"success\", \"terminal\", \"retry\"], \"passed\": true}, {\"check\": \"6\", \"actual\": [\"retry\", \"success\", \"terminal\"], \"expected\": [\"retry\", \"success\", \"terminal\"], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":47.898,"exit_code":0,"observations":[{"actual":[],"check":"0","expected":[],"passed":true},{"actual":["no-body"],"check":"1","expected":["no-body"],"passed":true},{"actual":["no-failure","retry","no-failure"],"check":"2","expected":["no-failure","retry","no-failure"],"passed":true},{"actual":["unreplayable"],"check":"3","expected":["unreplayable"],"passed":true},{"actual":["unreplayable","retry"],"check":"4","expected":["unreplayable","retry"],"passed":true},{"actual":["success","terminal","retry"],"check":"5","expected":["success","terminal","retry"],"passed":true},{"actual":["retry","success","terminal"],"check":"6","expected":["retry","success","terminal"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"0\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"1\", \"actual\": [\"no-body\"], \"expected\": [\"no-body\"], \"passed\": true}, {\"check\": \"2\", \"actual\": [\"no-failure\", \"retry\", \"no-failure\"], \"expected\": [\"no-failure\", \"retry\", \"no-failure\"], \"passed\": true}, {\"check\": \"3\", \"actual\": [\"unreplayable\"], \"expected\": [\"unreplayable\"], \"passed\": true}, {\"check\": \"4\", \"actual\": [\"unreplayable\", \"retry\"], \"expected\": [\"unreplayable\", \"retry\"], \"passed\": true}, {\"check\": \"5\", \"actual\": [\"success\", \"terminal\", \"retry\"], \"expected\": [\"success\", \"terminal\", \"retry\"], \"passed\": true}, {\"check\": \"6\", \"actual\": [\"retry\", \"success\", \"terminal\"], \"expected\": [\"retry\", \"success\", \"terminal\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}