{"abstract":"Duplicate begin violates retry transition semantics","category":"HTTP retries","checks":6,"contract":"configure(version,cap,statuses) sets current policy. begin(request) snapshots it with zero retries used; failure(request,status) uses that request snapshot and admits retry only for configured statuses below cap. update configuration affects later requests only. finish removes request; unknown failures report unknown. Return retry decisions with pinned policy version.","contract_signature":"events","evaluation_group":"s3-http_retries-policy-capture","failed_approach":"The attempted repair changes the faulty site to if e[1] in requests: out.append('unknown'); continue but still violates a regression oracle.","family":"s3-http_retries-policy-capture-duplicate-begin","id":"FA-30181","implementations":{"attempt":{"sha256":"648a376b030ec3741435ca436e9dbfa523618a85c83845de6fbc65063f71358c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events):\n    current=(0,0,()); requests={}; out=[]\n    for e in events:\n        if e[0]=='configure':\n            current=(e[1],e[2],tuple(e[3]))\n        elif e[0]=='begin':\n            if e[1] in requests: out.append('unknown'); continue\n            requests[e[1]]=[current,0]\n        elif e[0]=='finish': requests.pop(e[1],None)\n        elif e[0]=='failure':\n            if e[1] not in requests: out.append('unknown'); continue\n            policy,used=requests[e[1]]\n            version,cap,statuses=policy\n            if e[2] not in statuses: out.append(['stop',version]); continue\n            if used>=cap: out.append(['exhausted',version]); continue\n            requests[e[1]][1]+=1\n            out.append(['retry',version])\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([('failure','x',503)]), ['unknown'])\ncheck('2', solve([('configure',N,2,[503,429]),('begin','a'),('failure','a',503),('failure','a',429),('failure','a',503)]), [['retry',N],['retry',N],['exhausted',N]])\ncheck('3', solve([('configure',N,1,[503]),('begin','a'),('configure',N+1,0,[429]),('failure','a',429),('failure','a',503),('failure','a',503),('begin','b'),('failure','b',429)]), [['stop',N],['retry',N],['exhausted',N],['exhausted',N+1]])\ncheck('4', solve([('configure',N,1,[503]),('begin','a'),('failure','a',503),('begin','a'),('failure','a',503)]), [['retry',N],'duplicate',['exhausted',N]])\ncheck('5', solve([('configure',N,1,[503]),('begin','a'),('begin','b'),('finish','a'),('failure','a',503),('failure','b',503)]), ['unknown',['retry',N]])\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":"cf769d2751cee1058cbeb8a2383341483494ac6d37ebf7eb87920c169bd633f7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events):\n    current=(0,0,()); requests={}; out=[]\n    for e in events:\n        if e[0]=='configure':\n            current=(e[1],e[2],tuple(e[3]))\n        elif e[0]=='begin':\n            if e[1] in requests: requests.pop(e[1])\n            requests[e[1]]=[current,0]\n        elif e[0]=='finish': requests.pop(e[1],None)\n        elif e[0]=='failure':\n            if e[1] not in requests: out.append('unknown'); continue\n            policy,used=requests[e[1]]\n            version,cap,statuses=policy\n            if e[2] not in statuses: out.append(['stop',version]); continue\n            if used>=cap: out.append(['exhausted',version]); continue\n            requests[e[1]][1]+=1\n            out.append(['retry',version])\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([('failure','x',503)]), ['unknown'])\ncheck('2', solve([('configure',N,2,[503,429]),('begin','a'),('failure','a',503),('failure','a',429),('failure','a',503)]), [['retry',N],['retry',N],['exhausted',N]])\ncheck('3', solve([('configure',N,1,[503]),('begin','a'),('configure',N+1,0,[429]),('failure','a',429),('failure','a',503),('failure','a',503),('begin','b'),('failure','b',429)]), [['stop',N],['retry',N],['exhausted',N],['exhausted',N+1]])\ncheck('4', solve([('configure',N,1,[503]),('begin','a'),('failure','a',503),('begin','a'),('failure','a',503)]), [['retry',N],'duplicate',['exhausted',N]])\ncheck('5', solve([('configure',N,1,[503]),('begin','a'),('begin','b'),('finish','a'),('failure','a',503),('failure','b',503)]), ['unknown',['retry',N]])\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-policy-capture-duplicate-begin","generated_at":"2026-09-29T14:41:50.831104+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Offline deterministic model of HTTP request retries.","root_cause":"Duplicate begin violates retry transition semantics","sha256":"4a16077bf96005af255890c46ccad5bd9f44e94dc37e00d7a313559fd24f6548","title":"In-flight retry policy capture: Duplicate begin violates retry transition semantics · 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":41.779,"exit_code":1,"observations":[{"actual":[],"check":"0","expected":[],"passed":true},{"actual":["unknown"],"check":"1","expected":["unknown"],"passed":true},{"actual":[["retry",1],["retry",1],["exhausted",1]],"check":"2","expected":[["retry",1],["retry",1],["exhausted",1]],"passed":true},{"actual":[["stop",1],["retry",1],["exhausted",1],["exhausted",2]],"check":"3","expected":[["stop",1],["retry",1],["exhausted",1],["exhausted",2]],"passed":true},{"actual":[["retry",1],"unknown",["exhausted",1]],"check":"4","expected":[["retry",1],"duplicate",["exhausted",1]],"passed":false},{"actual":["unknown",["retry",1]],"check":"5","expected":["unknown",["retry",1]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"0\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"1\", \"actual\": [\"unknown\"], \"expected\": [\"unknown\"], \"passed\": true}, {\"check\": \"2\", \"actual\": [[\"retry\", 1], [\"retry\", 1], [\"exhausted\", 1]], \"expected\": [[\"retry\", 1], [\"retry\", 1], [\"exhausted\", 1]], \"passed\": true}, {\"check\": \"3\", \"actual\": [[\"stop\", 1], [\"retry\", 1], [\"exhausted\", 1], [\"exhausted\", 2]], \"expected\": [[\"stop\", 1], [\"retry\", 1], [\"exhausted\", 1], [\"exhausted\", 2]], \"passed\": true}, {\"check\": \"4\", \"actual\": [[\"retry\", 1], \"unknown\", [\"exhausted\", 1]], \"expected\": [[\"retry\", 1], \"duplicate\", [\"exhausted\", 1]], \"passed\": false}, {\"check\": \"5\", \"actual\": [\"unknown\", [\"retry\", 1]], \"expected\": [\"unknown\", [\"retry\", 1]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":46.385,"exit_code":1,"observations":[{"actual":[],"check":"0","expected":[],"passed":true},{"actual":["unknown"],"check":"1","expected":["unknown"],"passed":true},{"actual":[["retry",1],["retry",1],["exhausted",1]],"check":"2","expected":[["retry",1],["retry",1],["exhausted",1]],"passed":true},{"actual":[["stop",1],["retry",1],["exhausted",1],["exhausted",2]],"check":"3","expected":[["stop",1],["retry",1],["exhausted",1],["exhausted",2]],"passed":true},{"actual":[["retry",1],["retry",1]],"check":"4","expected":[["retry",1],"duplicate",["exhausted",1]],"passed":false},{"actual":["unknown",["retry",1]],"check":"5","expected":["unknown",["retry",1]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"0\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"1\", \"actual\": [\"unknown\"], \"expected\": [\"unknown\"], \"passed\": true}, {\"check\": \"2\", \"actual\": [[\"retry\", 1], [\"retry\", 1], [\"exhausted\", 1]], \"expected\": [[\"retry\", 1], [\"retry\", 1], [\"exhausted\", 1]], \"passed\": true}, {\"check\": \"3\", \"actual\": [[\"stop\", 1], [\"retry\", 1], [\"exhausted\", 1], [\"exhausted\", 2]], \"expected\": [[\"stop\", 1], [\"retry\", 1], [\"exhausted\", 1], [\"exhausted\", 2]], \"passed\": true}, {\"check\": \"4\", \"actual\": [[\"retry\", 1], [\"retry\", 1]], \"expected\": [[\"retry\", 1], \"duplicate\", [\"exhausted\", 1]], \"passed\": false}, {\"check\": \"5\", \"actual\": [\"unknown\", [\"retry\", 1]], \"expected\": [\"unknown\", [\"retry\", 1]], \"passed\": true}], \"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."}}