{"abstract":"Unknown failure 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.","evaluation_group":"s3-http_retries-policy-capture","failed_approach":"The attempted repair changes the faulty site to out.append(['stop',current[0]]); continue but still violates a regression oracle.","family":"s3-http_retries-policy-capture-unknown-failure","id":"FA-30201","implementations":{"attempt":{"sha256":"bfaf038b339ce59ebf643af182d558e4ffeaaf2439d188fb01dfe087b9f022a9","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('duplicate'); 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(['stop',current[0]]); 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":"675bc237a79c20d57c89ec1b44e4e78c2e13dcd492a197823a23f99b683d773b","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('duplicate'); 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(['retry',current[0]]); 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"},"fixed":{"sha256":"ef0063d52199105b42db9c5816556244f148a133a7741b8fe8ee38704441b572","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('duplicate'); 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"}},"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-unknown-failure","generated_at":"2026-09-29T14:41:50.558015+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 out.append('unknown'); continue.","root_cause":"Unknown failure violates retry transition semantics","sha256":"7f3ab97d40de974e7bcca2a599fafcc941068d40bc4a96078099c0c99d5ebeee","title":"In-flight retry policy capture: Unknown failure 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":45.166,"exit_code":1,"observations":[{"actual":[],"check":"0","expected":[],"passed":true},{"actual":[["stop",0]],"check":"1","expected":["unknown"],"passed":false},{"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],"duplicate",["exhausted",1]],"check":"4","expected":[["retry",1],"duplicate",["exhausted",1]],"passed":true},{"actual":[["stop",1],["retry",1]],"check":"5","expected":["unknown",["retry",1]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"0\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"1\", \"actual\": [[\"stop\", 0]], \"expected\": [\"unknown\"], \"passed\": false}, {\"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], \"duplicate\", [\"exhausted\", 1]], \"expected\": [[\"retry\", 1], \"duplicate\", [\"exhausted\", 1]], \"passed\": true}, {\"check\": \"5\", \"actual\": [[\"stop\", 1], [\"retry\", 1]], \"expected\": [\"unknown\", [\"retry\", 1]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.809,"exit_code":1,"observations":[{"actual":[],"check":"0","expected":[],"passed":true},{"actual":[["retry",0]],"check":"1","expected":["unknown"],"passed":false},{"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],"duplicate",["exhausted",1]],"check":"4","expected":[["retry",1],"duplicate",["exhausted",1]],"passed":true},{"actual":[["retry",1],["retry",1]],"check":"5","expected":["unknown",["retry",1]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"0\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"1\", \"actual\": [[\"retry\", 0]], \"expected\": [\"unknown\"], \"passed\": false}, {\"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], \"duplicate\", [\"exhausted\", 1]], \"expected\": [[\"retry\", 1], \"duplicate\", [\"exhausted\", 1]], \"passed\": true}, {\"check\": \"5\", \"actual\": [[\"retry\", 1], [\"retry\", 1]], \"expected\": [\"unknown\", [\"retry\", 1]], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.174,"exit_code":0,"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],"duplicate",["exhausted",1]],"check":"4","expected":[["retry",1],"duplicate",["exhausted",1]],"passed":true},{"actual":["unknown",["retry",1]],"check":"5","expected":["unknown",["retry",1]],"passed":true}],"passed":true,"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], \"duplicate\", [\"exhausted\", 1]], \"expected\": [[\"retry\", 1], \"duplicate\", [\"exhausted\", 1]], \"passed\": true}, {\"check\": \"5\", \"actual\": [\"unknown\", [\"retry\", 1]], \"expected\": [\"unknown\", [\"retry\", 1]], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}