{"abstract":"Duplicate completion of the winning attempt is published twice","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 active=e[2]!=0\nreturn but still violates a regression oracle.","family":"s3-http_retries-attempt-fences-consume-completion","id":"FA-29566","implementations":{"attempt":{"sha256":"912cc7a90b6b48e1eb31002e1b1103f2ce6cb82a00bb974c6a5d05a06c8f8aea","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('cancelled'); continue\n            if e[1]!=generation or not active:\n                out.append('stale'); continue\n            out.append(['accepted',e[2]])\n            active=e[2]!=0\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":"012c3c89358dd9273242658a1bac6e9bb8d99acbd241c5cba5cd237408c9ed9b","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('cancelled'); continue\n            if e[1]!=generation or not active:\n                out.append('stale'); continue\n            out.append(['accepted',e[2]])\n            active=True\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-consume-completion","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":"Duplicate completion of the winning attempt is published twice","sha256":"a4e0d05266939438c4f759fa56a9394a593cf6e28cbdfc391e627e9fbb57e958","title":"Late response fencing between retry attempts: Duplicate completion of the winning attempt is published twice · 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.65,"exit_code":1,"observations":[{"actual":[[],0,false],"check":"0","expected":[[],0,false],"passed":true},{"actual":[[["started",1],["accepted",1],["accepted",2]],1,false],"check":"1","expected":[[["started",1],["accepted",1],"stale"],1,false],"passed":false},{"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],"cancelled","cancelled"],1,true],"check":"4","expected":[[["started",1],"cancelled","cancelled"],1,true],"passed":true},{"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], [\"accepted\", 2]], 1, false], \"expected\": [[[\"started\", 1], [\"accepted\", 1], \"stale\"], 1, false], \"passed\": false}, {\"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], \"cancelled\", \"cancelled\"], 1, true], \"expected\": [[[\"started\", 1], \"cancelled\", \"cancelled\"], 1, true], \"passed\": true}, {\"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.626,"exit_code":1,"observations":[{"actual":[[],0,false],"check":"0","expected":[[],0,false],"passed":true},{"actual":[[["started",1],["accepted",1],["accepted",2]],1,false],"check":"1","expected":[[["started",1],["accepted",1],"stale"],1,false],"passed":false},{"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],"cancelled","cancelled"],1,true],"check":"4","expected":[[["started",1],"cancelled","cancelled"],1,true],"passed":true},{"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], [\"accepted\", 2]], 1, false], \"expected\": [[[\"started\", 1], [\"accepted\", 1], \"stale\"], 1, false], \"passed\": false}, {\"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], \"cancelled\", \"cancelled\"], 1, true], \"expected\": [[[\"started\", 1], \"cancelled\", \"cancelled\"], 1, true], \"passed\": true}, {\"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."}}