{"abstract":"Retry builds the body from mutable current configuration","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 body=list(snapshot[:1]) but still violates a regression oracle.","family":"s3-http_retries-factory-body-fresh","id":"FA-29461","implementations":{"attempt":{"sha256":"df9280b911cf539c574c632a8e6bf06b83828bb29c15dc2c00a2f8afb96840ab","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[:1])\n            cursor=0\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":"4220a28b9dba0f370ab8435b10282bcdc4b3034d0619a1d0329654afbed45a33","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(recipe)\n            cursor=0\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-fresh","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":"Retry builds the body from mutable current configuration","sha256":"ed1a513df455a50bb6d5ddf8d0e789980531866317ada7f814698a9f60dcc5f5","title":"Fresh body factories on retries: Retry builds the body from mutable current configuration · 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":43.226,"exit_code":1,"observations":[{"actual":[],"check":"0","expected":[],"passed":true},{"actual":["factory",[1],[],[],"factory",[1],"exhausted"],"check":"1","expected":["factory",[1,2],[3],[],"factory",[1,2,3],"exhausted"],"passed":false},{"actual":["factory",[1]],"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",[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], [], [], \"factory\", [1], \"exhausted\"], \"expected\": [\"factory\", [1, 2], [3], [], \"factory\", [1, 2, 3], \"exhausted\"], \"passed\": false}, {\"check\": \"2\", \"actual\": [\"factory\", [1]], \"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\", [2]], \"expected\": [\"factory\", \"inactive\", \"factory\", [2]], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":43.419,"exit_code":1,"observations":[{"actual":[],"check":"0","expected":[],"passed":true},{"actual":["factory",[1,2],[3],[],"factory",[1,2,3],"exhausted"],"check":"1","expected":["factory",[1,2],[3],[],"factory",[1,2,3],"exhausted"],"passed":true},{"actual":["factory",[9]],"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",[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\", [1, 2, 3], \"exhausted\"], \"expected\": [\"factory\", [1, 2], [3], [], \"factory\", [1, 2, 3], \"exhausted\"], \"passed\": true}, {\"check\": \"2\", \"actual\": [\"factory\", [9]], \"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\", [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."}}