{"abstract":"A response arriving after cancellation has the wrong terminal disposition","category":"HTTP retries","checks":6,"contract":"start allocates a strictly increasing generation. complete(generation,value) publishes only the current active generation and terminates it; duplicate/stale results are rejected. timeout(generation) deactivates only that generation. cancel terminates the logical request permanently. Return accepted/rejected results plus current generation and cancellation flag.","contract_signature":"events","evaluation_group":"s3-http_retries-attempt-fences","failed_approach":"The attempted repair changes the faulty site to if cancelled: out.append('stale'); continue\n        if e[1] but still violates a regression oracle.","family":"s3-http_retries-attempt-fences-cancel-response","id":"FA-29571","implementations":{"attempt":{"sha256":"bf29e444d67b0a4526c6d171767d5b72c8880919ee007bf2bd71b8e3687f3089","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events):\n    generation=0; active=False; cancelled=False; out=[]\n    for e in events:\n        if e[0]=='start':\n            if cancelled: out.append('cancelled'); continue\n            generation+=1\n            active=True\n            out.append(['started',generation])\n        elif e[0]=='timeout':\n            if e[1]==generation: active=False\n        elif e[0]=='cancel':\n            cancelled=True\n            active=False\n        elif e[0]=='complete':\n            if cancelled: out.append('stale'); continue\n            if e[1]!=generation or not active:\n                out.append('stale'); continue\n            out.append(['accepted',e[2]])\n            active=False\n    return [out,generation,cancelled]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('0', solve([]), [[],0,False])\ncheck('1', solve([('start',),('complete',1,N),('complete',1,N+1)]), [[['started',1],['accepted',N],'stale'],1,False])\ncheck('2', solve([('start',),('start',),('timeout',1),('complete',1,0),('complete',2,N+5)]), [[['started',1],['started',2],'stale',['accepted',N+5]],2,False])\ncheck('3', solve([('start',),('timeout',1),('complete',1,N)]), [[['started',1],'stale'],1,False])\ncheck('4', solve([('start',),('cancel',),('complete',1,N),('start',)]), [[['started',1],'cancelled','cancelled'],1,True])\ncheck('5', solve([('start',),('complete',2,N),('complete',1,N+3)]), [[['started',1],'stale',['accepted',N+3]],1,False])\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":"dd33a21212c0a5a8c20df12bfb43cf2d43ed4cc53383d139081f383450124d5a","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events):\n    generation=0; active=False; cancelled=False; out=[]\n    for e in events:\n        if e[0]=='start':\n            if cancelled: out.append('cancelled'); continue\n            generation+=1\n            active=True\n            out.append(['started',generation])\n        elif e[0]=='timeout':\n            if e[1]==generation: active=False\n        elif e[0]=='cancel':\n            cancelled=True\n            active=False\n        elif e[0]=='complete':\n            if cancelled: out.append(['accepted',e[2]]); continue\n            if e[1]!=generation or not active:\n                out.append('stale'); continue\n            out.append(['accepted',e[2]])\n            active=False\n    return [out,generation,cancelled]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('0', solve([]), [[],0,False])\ncheck('1', solve([('start',),('complete',1,N),('complete',1,N+1)]), [[['started',1],['accepted',N],'stale'],1,False])\ncheck('2', solve([('start',),('start',),('timeout',1),('complete',1,0),('complete',2,N+5)]), [[['started',1],['started',2],'stale',['accepted',N+5]],2,False])\ncheck('3', solve([('start',),('timeout',1),('complete',1,N)]), [[['started',1],'stale'],1,False])\ncheck('4', solve([('start',),('cancel',),('complete',1,N),('start',)]), [[['started',1],'cancelled','cancelled'],1,True])\ncheck('5', solve([('start',),('complete',2,N),('complete',1,N+3)]), [[['started',1],'stale',['accepted',N+3]],1,False])\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-attempt-fences-cancel-response","generated_at":"2026-09-29T14:41:44.452679+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":"A response arriving after cancellation has the wrong terminal disposition","sha256":"e6c8a309c68365c617956d109c8333f6e0ae6c1f155002ca22b0841604e39603","title":"Late response fencing between retry attempts: A response arriving after cancellation has the wrong terminal disposition · 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":42.275,"exit_code":1,"observations":[{"actual":[[],0,false],"check":"0","expected":[[],0,false],"passed":true},{"actual":[[["started",1],["accepted",1],"stale"],1,false],"check":"1","expected":[[["started",1],["accepted",1],"stale"],1,false],"passed":true},{"actual":[[["started",1],["started",2],"stale",["accepted",6]],2,false],"check":"2","expected":[[["started",1],["started",2],"stale",["accepted",6]],2,false],"passed":true},{"actual":[[["started",1],"stale"],1,false],"check":"3","expected":[[["started",1],"stale"],1,false],"passed":true},{"actual":[[["started",1],"stale","cancelled"],1,true],"check":"4","expected":[[["started",1],"cancelled","cancelled"],1,true],"passed":false},{"actual":[[["started",1],"stale",["accepted",4]],1,false],"check":"5","expected":[[["started",1],"stale",["accepted",4]],1,false],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"0\", \"actual\": [[], 0, false], \"expected\": [[], 0, false], \"passed\": true}, {\"check\": \"1\", \"actual\": [[[\"started\", 1], [\"accepted\", 1], \"stale\"], 1, false], \"expected\": [[[\"started\", 1], [\"accepted\", 1], \"stale\"], 1, false], \"passed\": true}, {\"check\": \"2\", \"actual\": [[[\"started\", 1], [\"started\", 2], \"stale\", [\"accepted\", 6]], 2, false], \"expected\": [[[\"started\", 1], [\"started\", 2], \"stale\", [\"accepted\", 6]], 2, false], \"passed\": true}, {\"check\": \"3\", \"actual\": [[[\"started\", 1], \"stale\"], 1, false], \"expected\": [[[\"started\", 1], \"stale\"], 1, false], \"passed\": true}, {\"check\": \"4\", \"actual\": [[[\"started\", 1], \"stale\", \"cancelled\"], 1, true], \"expected\": [[[\"started\", 1], \"cancelled\", \"cancelled\"], 1, true], \"passed\": false}, {\"check\": \"5\", \"actual\": [[[\"started\", 1], \"stale\", [\"accepted\", 4]], 1, false], \"expected\": [[[\"started\", 1], \"stale\", [\"accepted\", 4]], 1, false], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.767,"exit_code":1,"observations":[{"actual":[[],0,false],"check":"0","expected":[[],0,false],"passed":true},{"actual":[[["started",1],["accepted",1],"stale"],1,false],"check":"1","expected":[[["started",1],["accepted",1],"stale"],1,false],"passed":true},{"actual":[[["started",1],["started",2],"stale",["accepted",6]],2,false],"check":"2","expected":[[["started",1],["started",2],"stale",["accepted",6]],2,false],"passed":true},{"actual":[[["started",1],"stale"],1,false],"check":"3","expected":[[["started",1],"stale"],1,false],"passed":true},{"actual":[[["started",1],["accepted",1],"cancelled"],1,true],"check":"4","expected":[[["started",1],"cancelled","cancelled"],1,true],"passed":false},{"actual":[[["started",1],"stale",["accepted",4]],1,false],"check":"5","expected":[[["started",1],"stale",["accepted",4]],1,false],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"0\", \"actual\": [[], 0, false], \"expected\": [[], 0, false], \"passed\": true}, {\"check\": \"1\", \"actual\": [[[\"started\", 1], [\"accepted\", 1], \"stale\"], 1, false], \"expected\": [[[\"started\", 1], [\"accepted\", 1], \"stale\"], 1, false], \"passed\": true}, {\"check\": \"2\", \"actual\": [[[\"started\", 1], [\"started\", 2], \"stale\", [\"accepted\", 6]], 2, false], \"expected\": [[[\"started\", 1], [\"started\", 2], \"stale\", [\"accepted\", 6]], 2, false], \"passed\": true}, {\"check\": \"3\", \"actual\": [[[\"started\", 1], \"stale\"], 1, false], \"expected\": [[[\"started\", 1], \"stale\"], 1, false], \"passed\": true}, {\"check\": \"4\", \"actual\": [[[\"started\", 1], [\"accepted\", 1], \"cancelled\"], 1, true], \"expected\": [[[\"started\", 1], \"cancelled\", \"cancelled\"], 1, true], \"passed\": false}, {\"check\": \"5\", \"actual\": [[[\"started\", 1], \"stale\", [\"accepted\", 4]], 1, false], \"expected\": [[[\"started\", 1], \"stale\", [\"accepted\", 4]], 1, false], \"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."}}