{"abstract":"Body ambiguity violates retry transition semantics","category":"HTTP retries","checks":7,"contract":"start(body size) starts awaiting permission. interim100 permits sending; other interim messages do not. tick permits optimistic sending after wait expiry. send(bytes) emits at most remaining body only in permitted phase. final(status) stops body transmission and records response. fail permits retry with the same full body only if zero body bytes were sent; otherwise ambiguous. retry resets the handshaking phase after retry permission. Return transmissions and decisions.","evaluation_group":"s3-http_retries-continue-handshake","failed_approach":"The attempted repair changes the faulty site to 'retry' if sent<=1 else 'ambiguous' but still violates a regression oracle.","family":"s3-http_retries-continue-handshake-body-ambiguity","id":"FA-29856","implementations":{"attempt":{"sha256":"a9960ce97eeca975c0661da0c5ade65ede80c93e08c605027f3d97cb9bfccce5","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events):\n    size=0; sent=0; phase='idle'; out=[]\n    for e in events:\n        if e[0]=='start':\n            size=e[1]; sent=0; phase='waiting'\n        elif e[0]=='interim':\n            if e[1]==100 and phase=='waiting': phase='allowed'\n        elif e[0]=='tick':\n            if phase=='waiting': phase='allowed'\n        elif e[0]=='send':\n            if phase!='allowed': out.append('blocked'); continue\n            count=min(e[1],size-sent)\n            sent+=count\n            out.append(count)\n        elif e[0]=='final':\n            phase='done'; out.append(['response',e[1]])\n        elif e[0]=='fail':\n            if phase=='done': out.append('terminal'); continue\n            phase='retry' if sent<=1 else 'ambiguous'\n            out.append(phase)\n        elif e[0]=='retry':\n            if phase!='retry': out.append('denied'); continue\n            sent=0; phase='waiting'; out.append('restarted')\n    return [out,sent]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('0', solve([]), [[],0])\ncheck('1', solve([('start',N+3),('send',1),('interim',103),('send',1),('interim',100),('send',2),('send',N+3)]), [['blocked','blocked',2,N+1],N+3])\ncheck('2', solve([('start',N),('fail',),('retry',),('send',1),('tick',),('send',N)]), [['retry','restarted','blocked',N],N])\ncheck('3', solve([('start',2),('tick',),('send',1),('fail',),('retry',)]), [[1,'ambiguous','denied'],1])\ncheck('4', solve([('start',N),('final',417),('interim',100),('tick',),('send',1),('fail',),('retry',)]), [[['response',417],'blocked','terminal','denied'],0])\ncheck('5', solve([('start',2),('tick',),('send',2),('start',N),('fail',)]), [[2,'retry'],0])\ncheck('6', solve([('start',0),('interim',100),('send',3),('send',0)]), [[0,0],0])\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":"065310d5715bcf790d476796c4d7b4b5d4114cd7831c135aeb24e700a060600c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events):\n    size=0; sent=0; phase='idle'; out=[]\n    for e in events:\n        if e[0]=='start':\n            size=e[1]; sent=0; phase='waiting'\n        elif e[0]=='interim':\n            if e[1]==100 and phase=='waiting': phase='allowed'\n        elif e[0]=='tick':\n            if phase=='waiting': phase='allowed'\n        elif e[0]=='send':\n            if phase!='allowed': out.append('blocked'); continue\n            count=min(e[1],size-sent)\n            sent+=count\n            out.append(count)\n        elif e[0]=='final':\n            phase='done'; out.append(['response',e[1]])\n        elif e[0]=='fail':\n            if phase=='done': out.append('terminal'); continue\n            phase='retry'\n            out.append(phase)\n        elif e[0]=='retry':\n            if phase!='retry': out.append('denied'); continue\n            sent=0; phase='waiting'; out.append('restarted')\n    return [out,sent]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('0', solve([]), [[],0])\ncheck('1', solve([('start',N+3),('send',1),('interim',103),('send',1),('interim',100),('send',2),('send',N+3)]), [['blocked','blocked',2,N+1],N+3])\ncheck('2', solve([('start',N),('fail',),('retry',),('send',1),('tick',),('send',N)]), [['retry','restarted','blocked',N],N])\ncheck('3', solve([('start',2),('tick',),('send',1),('fail',),('retry',)]), [[1,'ambiguous','denied'],1])\ncheck('4', solve([('start',N),('final',417),('interim',100),('tick',),('send',1),('fail',),('retry',)]), [[['response',417],'blocked','terminal','denied'],0])\ncheck('5', solve([('start',2),('tick',),('send',2),('start',N),('fail',)]), [[2,'retry'],0])\ncheck('6', solve([('start',0),('interim',100),('send',3),('send',0)]), [[0,0],0])\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":"d2c68d02cac79d5eb2dc982d5748b4af117a473da79c899f2ce3c5898a4b510a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events):\n    size=0; sent=0; phase='idle'; out=[]\n    for e in events:\n        if e[0]=='start':\n            size=e[1]; sent=0; phase='waiting'\n        elif e[0]=='interim':\n            if e[1]==100 and phase=='waiting': phase='allowed'\n        elif e[0]=='tick':\n            if phase=='waiting': phase='allowed'\n        elif e[0]=='send':\n            if phase!='allowed': out.append('blocked'); continue\n            count=min(e[1],size-sent)\n            sent+=count\n            out.append(count)\n        elif e[0]=='final':\n            phase='done'; out.append(['response',e[1]])\n        elif e[0]=='fail':\n            if phase=='done': out.append('terminal'); continue\n            phase='retry' if sent==0 else 'ambiguous'\n            out.append(phase)\n        elif e[0]=='retry':\n            if phase!='retry': out.append('denied'); continue\n            sent=0; phase='waiting'; out.append('restarted')\n    return [out,sent]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('0', solve([]), [[],0])\ncheck('1', solve([('start',N+3),('send',1),('interim',103),('send',1),('interim',100),('send',2),('send',N+3)]), [['blocked','blocked',2,N+1],N+3])\ncheck('2', solve([('start',N),('fail',),('retry',),('send',1),('tick',),('send',N)]), [['retry','restarted','blocked',N],N])\ncheck('3', solve([('start',2),('tick',),('send',1),('fail',),('retry',)]), [[1,'ambiguous','denied'],1])\ncheck('4', solve([('start',N),('final',417),('interim',100),('tick',),('send',1),('fail',),('retry',)]), [[['response',417],'blocked','terminal','denied'],0])\ncheck('5', solve([('start',2),('tick',),('send',2),('start',N),('fail',)]), [[2,'retry'],0])\ncheck('6', solve([('start',0),('interim',100),('send',3),('send',0)]), [[0,0],0])\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-continue-handshake-body-ambiguity","generated_at":"2026-09-29T14:41:47.188870+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Offline deterministic model of HTTP request retries.","repair":"Restore the specified transition 'retry' if sent==0 else 'ambiguous'.","root_cause":"Body ambiguity violates retry transition semantics","sha256":"3614c1e5b9ba3878fc1c44cea0aab827e9322d17e7e14c1b800a1e524b82443f","title":"Expect-Continue request retry phases: Body ambiguity violates retry transition semantics · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":54.402,"exit_code":1,"observations":[{"actual":[[],0],"check":"0","expected":[[],0],"passed":true},{"actual":[["blocked","blocked",2,2],4],"check":"1","expected":[["blocked","blocked",2,2],4],"passed":true},{"actual":[["retry","restarted","blocked",1],1],"check":"2","expected":[["retry","restarted","blocked",1],1],"passed":true},{"actual":[[1,"retry","restarted"],0],"check":"3","expected":[[1,"ambiguous","denied"],1],"passed":false},{"actual":[[["response",417],"blocked","terminal","denied"],0],"check":"4","expected":[[["response",417],"blocked","terminal","denied"],0],"passed":true},{"actual":[[2,"retry"],0],"check":"5","expected":[[2,"retry"],0],"passed":true},{"actual":[[0,0],0],"check":"6","expected":[[0,0],0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"0\", \"actual\": [[], 0], \"expected\": [[], 0], \"passed\": true}, {\"check\": \"1\", \"actual\": [[\"blocked\", \"blocked\", 2, 2], 4], \"expected\": [[\"blocked\", \"blocked\", 2, 2], 4], \"passed\": true}, {\"check\": \"2\", \"actual\": [[\"retry\", \"restarted\", \"blocked\", 1], 1], \"expected\": [[\"retry\", \"restarted\", \"blocked\", 1], 1], \"passed\": true}, {\"check\": \"3\", \"actual\": [[1, \"retry\", \"restarted\"], 0], \"expected\": [[1, \"ambiguous\", \"denied\"], 1], \"passed\": false}, {\"check\": \"4\", \"actual\": [[[\"response\", 417], \"blocked\", \"terminal\", \"denied\"], 0], \"expected\": [[[\"response\", 417], \"blocked\", \"terminal\", \"denied\"], 0], \"passed\": true}, {\"check\": \"5\", \"actual\": [[2, \"retry\"], 0], \"expected\": [[2, \"retry\"], 0], \"passed\": true}, {\"check\": \"6\", \"actual\": [[0, 0], 0], \"expected\": [[0, 0], 0], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":45.47,"exit_code":1,"observations":[{"actual":[[],0],"check":"0","expected":[[],0],"passed":true},{"actual":[["blocked","blocked",2,2],4],"check":"1","expected":[["blocked","blocked",2,2],4],"passed":true},{"actual":[["retry","restarted","blocked",1],1],"check":"2","expected":[["retry","restarted","blocked",1],1],"passed":true},{"actual":[[1,"retry","restarted"],0],"check":"3","expected":[[1,"ambiguous","denied"],1],"passed":false},{"actual":[[["response",417],"blocked","terminal","denied"],0],"check":"4","expected":[[["response",417],"blocked","terminal","denied"],0],"passed":true},{"actual":[[2,"retry"],0],"check":"5","expected":[[2,"retry"],0],"passed":true},{"actual":[[0,0],0],"check":"6","expected":[[0,0],0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"0\", \"actual\": [[], 0], \"expected\": [[], 0], \"passed\": true}, {\"check\": \"1\", \"actual\": [[\"blocked\", \"blocked\", 2, 2], 4], \"expected\": [[\"blocked\", \"blocked\", 2, 2], 4], \"passed\": true}, {\"check\": \"2\", \"actual\": [[\"retry\", \"restarted\", \"blocked\", 1], 1], \"expected\": [[\"retry\", \"restarted\", \"blocked\", 1], 1], \"passed\": true}, {\"check\": \"3\", \"actual\": [[1, \"retry\", \"restarted\"], 0], \"expected\": [[1, \"ambiguous\", \"denied\"], 1], \"passed\": false}, {\"check\": \"4\", \"actual\": [[[\"response\", 417], \"blocked\", \"terminal\", \"denied\"], 0], \"expected\": [[[\"response\", 417], \"blocked\", \"terminal\", \"denied\"], 0], \"passed\": true}, {\"check\": \"5\", \"actual\": [[2, \"retry\"], 0], \"expected\": [[2, \"retry\"], 0], \"passed\": true}, {\"check\": \"6\", \"actual\": [[0, 0], 0], \"expected\": [[0, 0], 0], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":46.833,"exit_code":0,"observations":[{"actual":[[],0],"check":"0","expected":[[],0],"passed":true},{"actual":[["blocked","blocked",2,2],4],"check":"1","expected":[["blocked","blocked",2,2],4],"passed":true},{"actual":[["retry","restarted","blocked",1],1],"check":"2","expected":[["retry","restarted","blocked",1],1],"passed":true},{"actual":[[1,"ambiguous","denied"],1],"check":"3","expected":[[1,"ambiguous","denied"],1],"passed":true},{"actual":[[["response",417],"blocked","terminal","denied"],0],"check":"4","expected":[[["response",417],"blocked","terminal","denied"],0],"passed":true},{"actual":[[2,"retry"],0],"check":"5","expected":[[2,"retry"],0],"passed":true},{"actual":[[0,0],0],"check":"6","expected":[[0,0],0],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"0\", \"actual\": [[], 0], \"expected\": [[], 0], \"passed\": true}, {\"check\": \"1\", \"actual\": [[\"blocked\", \"blocked\", 2, 2], 4], \"expected\": [[\"blocked\", \"blocked\", 2, 2], 4], \"passed\": true}, {\"check\": \"2\", \"actual\": [[\"retry\", \"restarted\", \"blocked\", 1], 1], \"expected\": [[\"retry\", \"restarted\", \"blocked\", 1], 1], \"passed\": true}, {\"check\": \"3\", \"actual\": [[1, \"ambiguous\", \"denied\"], 1], \"expected\": [[1, \"ambiguous\", \"denied\"], 1], \"passed\": true}, {\"check\": \"4\", \"actual\": [[[\"response\", 417], \"blocked\", \"terminal\", \"denied\"], 0], \"expected\": [[[\"response\", 417], \"blocked\", \"terminal\", \"denied\"], 0], \"passed\": true}, {\"check\": \"5\", \"actual\": [[2, \"retry\"], 0], \"expected\": [[2, \"retry\"], 0], \"passed\": true}, {\"check\": \"6\", \"actual\": [[0, 0], 0], \"expected\": [[0, 0], 0], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}