{"abstract":"A fresh retry body inherits a consumed cursor","category":"HTTP retries","checks":6,"contract":"open sets a body factory recipe; attempt calls it to make a fresh cursor, read consumes the current body, change changes the recipe for future logical requests only, new snapshots the changed recipe. Return emitted chunks; attempts beyond allowance return exhausted. Recipe is snapshotted on open/new.","contract_signature":"events","evaluation_group":"s3-http_retries-factory-body","failed_approach":"The attempted repair changes the faulty site to cursor=1\n        calls but still violates a regression oracle.","family":"s3-http_retries-factory-body-reset-cursor","id":"FA-29466","implementations":{"attempt":{"sha256":"bc8b773a48d0facfffdd7be57bc0267a72fe2b159c1f2062b778c4b587034204","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events):\n    recipe=[]; snapshot=(); body=[]; cursor=0; calls=0; limit=0; out=[]; active=False\n    for e in events:\n        if e[0] in ('open','new'):\n            recipe=list(e[1]); limit=e[2]\n            snapshot=tuple(recipe)\n            calls=0\n            active=False\n        elif e[0]=='change': recipe[:]=e[1]\n        elif e[0]=='attempt':\n            if calls>=limit:\n                out.append('exhausted'); active=False; continue\n            body=list(snapshot)\n            cursor=1\n            calls+=1\n            active=True\n            out.append('factory')\n        elif e[0]=='read':\n            if not active: out.append('inactive'); continue\n            chunk=body[cursor:cursor+e[1]]\n            cursor+=len(chunk)\n            out.append(chunk)\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([('open',[N,N+1,N+2],2),('attempt',),('read',2),('read',1),('read',1),('attempt',),('read',3),('attempt',)]), ['factory',[N,N+1],[N+2],[],'factory',[N,N+1,N+2],'exhausted'])\ncheck('2', solve([('open',[N,N+1],1),('change',[9]),('attempt',),('read',2)]), ['factory',[N,N+1]])\ncheck('3', solve([('open',[],1),('attempt',),('read',1)]), ['factory',[]])\ncheck('4', solve([('open',[N],0),('attempt',),('read',1)]), ['exhausted','inactive'])\ncheck('5', solve([('open',[N],1),('attempt',),('new',[N+1],1),('read',1),('attempt',),('read',1)]), ['factory','inactive','factory',[N+1]])\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":"3d4c11059ec2e2f3e7eeae5d1d616636721432c1b3831c65ea57e1dc0af6b7bb","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events):\n    recipe=[]; snapshot=(); body=[]; cursor=0; calls=0; limit=0; out=[]; active=False\n    for e in events:\n        if e[0] in ('open','new'):\n            recipe=list(e[1]); limit=e[2]\n            snapshot=tuple(recipe)\n            calls=0\n            active=False\n        elif e[0]=='change': recipe[:]=e[1]\n        elif e[0]=='attempt':\n            if calls>=limit:\n                out.append('exhausted'); active=False; continue\n            body=list(snapshot)\n            cursor=cursor\n            calls+=1\n            active=True\n            out.append('factory')\n        elif e[0]=='read':\n            if not active: out.append('inactive'); continue\n            chunk=body[cursor:cursor+e[1]]\n            cursor+=len(chunk)\n            out.append(chunk)\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([('open',[N,N+1,N+2],2),('attempt',),('read',2),('read',1),('read',1),('attempt',),('read',3),('attempt',)]), ['factory',[N,N+1],[N+2],[],'factory',[N,N+1,N+2],'exhausted'])\ncheck('2', solve([('open',[N,N+1],1),('change',[9]),('attempt',),('read',2)]), ['factory',[N,N+1]])\ncheck('3', solve([('open',[],1),('attempt',),('read',1)]), ['factory',[]])\ncheck('4', solve([('open',[N],0),('attempt',),('read',1)]), ['exhausted','inactive'])\ncheck('5', solve([('open',[N],1),('attempt',),('new',[N+1],1),('read',1),('attempt',),('read',1)]), ['factory','inactive','factory',[N+1]])\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-factory-body-reset-cursor","generated_at":"2026-09-29T14:41:43.554272+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 fresh retry body inherits a consumed cursor","sha256":"789902f02e1633671b9fe6e3b560e00b4a43114ffc303b8e4aabd64de7c2ac23","title":"Fresh body factories on retries: A fresh retry body inherits a consumed cursor · 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.799,"exit_code":1,"observations":[{"actual":[],"check":"0","expected":[],"passed":true},{"actual":["factory",[2,3],[],[],"factory",[2,3],"exhausted"],"check":"1","expected":["factory",[1,2],[3],[],"factory",[1,2,3],"exhausted"],"passed":false},{"actual":["factory",[2]],"check":"2","expected":["factory",[1,2]],"passed":false},{"actual":["factory",[]],"check":"3","expected":["factory",[]],"passed":true},{"actual":["exhausted","inactive"],"check":"4","expected":["exhausted","inactive"],"passed":true},{"actual":["factory","inactive","factory",[]],"check":"5","expected":["factory","inactive","factory",[2]],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"0\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"1\", \"actual\": [\"factory\", [2, 3], [], [], \"factory\", [2, 3], \"exhausted\"], \"expected\": [\"factory\", [1, 2], [3], [], \"factory\", [1, 2, 3], \"exhausted\"], \"passed\": false}, {\"check\": \"2\", \"actual\": [\"factory\", [2]], \"expected\": [\"factory\", [1, 2]], \"passed\": false}, {\"check\": \"3\", \"actual\": [\"factory\", []], \"expected\": [\"factory\", []], \"passed\": true}, {\"check\": \"4\", \"actual\": [\"exhausted\", \"inactive\"], \"expected\": [\"exhausted\", \"inactive\"], \"passed\": true}, {\"check\": \"5\", \"actual\": [\"factory\", \"inactive\", \"factory\", []], \"expected\": [\"factory\", \"inactive\", \"factory\", [2]], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":39.267,"exit_code":1,"observations":[{"actual":[],"check":"0","expected":[],"passed":true},{"actual":["factory",[1,2],[3],[],"factory",[],"exhausted"],"check":"1","expected":["factory",[1,2],[3],[],"factory",[1,2,3],"exhausted"],"passed":false},{"actual":["factory",[1,2]],"check":"2","expected":["factory",[1,2]],"passed":true},{"actual":["factory",[]],"check":"3","expected":["factory",[]],"passed":true},{"actual":["exhausted","inactive"],"check":"4","expected":["exhausted","inactive"],"passed":true},{"actual":["factory","inactive","factory",[2]],"check":"5","expected":["factory","inactive","factory",[2]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"0\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"1\", \"actual\": [\"factory\", [1, 2], [3], [], \"factory\", [], \"exhausted\"], \"expected\": [\"factory\", [1, 2], [3], [], \"factory\", [1, 2, 3], \"exhausted\"], \"passed\": false}, {\"check\": \"2\", \"actual\": [\"factory\", [1, 2]], \"expected\": [\"factory\", [1, 2]], \"passed\": true}, {\"check\": \"3\", \"actual\": [\"factory\", []], \"expected\": [\"factory\", []], \"passed\": true}, {\"check\": \"4\", \"actual\": [\"exhausted\", \"inactive\"], \"expected\": [\"exhausted\", \"inactive\"], \"passed\": true}, {\"check\": \"5\", \"actual\": [\"factory\", \"inactive\", \"factory\", [2]], \"expected\": [\"factory\", \"inactive\", \"factory\", [2]], \"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."}}