{"abstract":"A partially exposed response is not terminally sealed","category":"HTTP retries","checks":7,"contract":"begin starts an attempt only while nonterminal, headers records a status, deliver(bytes) records irreversible delivery, fail allows retry only before any delivered bytes. A zero-byte delivery is reversible. finish terminally succeeds. cancel terminally cancels. New attempts reset their local status but never erase already exposed data. Return retry decisions and exposed byte count.","contract_signature":"events","evaluation_group":"s3-http_retries-response-consumer","failed_approach":"The attempted repair changes the faulty site to terminal=delivered>1\n            out.append but still violates a regression oracle.","family":"s3-http_retries-response-consumer-partial-terminal","id":"FA-29721","implementations":{"attempt":{"sha256":"c0c04296f2c5cf0fc2dad866af838ca5508785f50aaddc68c285add79e79a3f5","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events):\n    active=False; delivered=0; status=None; terminal=False; out=[]\n    for e in events:\n        if e[0]=='begin':\n            if terminal: out.append('terminal'); continue\n            active=True\n            status=None\n        elif e[0]=='headers' and active:\n            status=e[1]\n        elif e[0]=='deliver' and active:\n            delivered+=e[1]\n        elif e[0]=='fail':\n            if terminal: out.append('terminal'); continue\n            if not active: out.append('inactive'); continue\n            active=False\n            if delivered>0:\n                terminal=delivered>1\n                out.append(['partial',status])\n            else: out.append(['retry',status])\n        elif e[0]=='finish' and active:\n            terminal=True; active=False; out.append('success')\n        elif e[0]=='cancel':\n            terminal=True; active=False; out.append('cancelled')\n    return [out,delivered]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('0', solve([]), [[],0])\ncheck('1', solve([('fail',)]), [['inactive'],0])\ncheck('2', solve([('begin',),('headers',503),('deliver',0),('fail',),('fail',),('begin',),('fail',)]), [[['retry',503],'inactive',['retry',None]],0])\ncheck('3', solve([('begin',),('headers',200),('deliver',1),('deliver',0),('fail',),('begin',)]), [[['partial',200],'terminal'],1])\ncheck('4', solve([('begin',),('headers',502),('deliver',N+2),('deliver',2),('fail',)]), [[['partial',502]],N+4])\ncheck('5', solve([('begin',),('finish',),('begin',),('fail',)]), [['success','terminal','terminal'],0])\ncheck('6', solve([('begin',),('cancel',),('begin',)]), [['cancelled','terminal'],0])\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":"b33593edb49d447a52aa06b6ca5ea542e0c410ff5fc7874fcd2c211c1fe15f05","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events):\n    active=False; delivered=0; status=None; terminal=False; out=[]\n    for e in events:\n        if e[0]=='begin':\n            if terminal: out.append('terminal'); continue\n            active=True\n            status=None\n        elif e[0]=='headers' and active:\n            status=e[1]\n        elif e[0]=='deliver' and active:\n            delivered+=e[1]\n        elif e[0]=='fail':\n            if terminal: out.append('terminal'); continue\n            if not active: out.append('inactive'); continue\n            active=False\n            if delivered>0:\n                terminal=False\n                out.append(['partial',status])\n            else: out.append(['retry',status])\n        elif e[0]=='finish' and active:\n            terminal=True; active=False; out.append('success')\n        elif e[0]=='cancel':\n            terminal=True; active=False; out.append('cancelled')\n    return [out,delivered]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('0', solve([]), [[],0])\ncheck('1', solve([('fail',)]), [['inactive'],0])\ncheck('2', solve([('begin',),('headers',503),('deliver',0),('fail',),('fail',),('begin',),('fail',)]), [[['retry',503],'inactive',['retry',None]],0])\ncheck('3', solve([('begin',),('headers',200),('deliver',1),('deliver',0),('fail',),('begin',)]), [[['partial',200],'terminal'],1])\ncheck('4', solve([('begin',),('headers',502),('deliver',N+2),('deliver',2),('fail',)]), [[['partial',502]],N+4])\ncheck('5', solve([('begin',),('finish',),('begin',),('fail',)]), [['success','terminal','terminal'],0])\ncheck('6', solve([('begin',),('cancel',),('begin',)]), [['cancelled','terminal'],0])\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-response-consumer-partial-terminal","generated_at":"2026-09-29T14:41:46.006053+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 partially exposed response is not terminally sealed","sha256":"a94d89720f7648ff40f2f54278499ee808cdde9ba3344765bcf4952b2d5dc988","title":"Retry after consumer-visible response delivery: A partially exposed response is not terminally sealed · 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.346,"exit_code":1,"observations":[{"actual":[[],0],"check":"0","expected":[[],0],"passed":true},{"actual":[["inactive"],0],"check":"1","expected":[["inactive"],0],"passed":true},{"actual":[[["retry",503],"inactive",["retry",null]],0],"check":"2","expected":[[["retry",503],"inactive",["retry",null]],0],"passed":true},{"actual":[[["partial",200]],1],"check":"3","expected":[[["partial",200],"terminal"],1],"passed":false},{"actual":[[["partial",502]],5],"check":"4","expected":[[["partial",502]],5],"passed":true},{"actual":[["success","terminal","terminal"],0],"check":"5","expected":[["success","terminal","terminal"],0],"passed":true},{"actual":[["cancelled","terminal"],0],"check":"6","expected":[["cancelled","terminal"],0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"0\", \"actual\": [[], 0], \"expected\": [[], 0], \"passed\": true}, {\"check\": \"1\", \"actual\": [[\"inactive\"], 0], \"expected\": [[\"inactive\"], 0], \"passed\": true}, {\"check\": \"2\", \"actual\": [[[\"retry\", 503], \"inactive\", [\"retry\", null]], 0], \"expected\": [[[\"retry\", 503], \"inactive\", [\"retry\", null]], 0], \"passed\": true}, {\"check\": \"3\", \"actual\": [[[\"partial\", 200]], 1], \"expected\": [[[\"partial\", 200], \"terminal\"], 1], \"passed\": false}, {\"check\": \"4\", \"actual\": [[[\"partial\", 502]], 5], \"expected\": [[[\"partial\", 502]], 5], \"passed\": true}, {\"check\": \"5\", \"actual\": [[\"success\", \"terminal\", \"terminal\"], 0], \"expected\": [[\"success\", \"terminal\", \"terminal\"], 0], \"passed\": true}, {\"check\": \"6\", \"actual\": [[\"cancelled\", \"terminal\"], 0], \"expected\": [[\"cancelled\", \"terminal\"], 0], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.573,"exit_code":1,"observations":[{"actual":[[],0],"check":"0","expected":[[],0],"passed":true},{"actual":[["inactive"],0],"check":"1","expected":[["inactive"],0],"passed":true},{"actual":[[["retry",503],"inactive",["retry",null]],0],"check":"2","expected":[[["retry",503],"inactive",["retry",null]],0],"passed":true},{"actual":[[["partial",200]],1],"check":"3","expected":[[["partial",200],"terminal"],1],"passed":false},{"actual":[[["partial",502]],5],"check":"4","expected":[[["partial",502]],5],"passed":true},{"actual":[["success","terminal","terminal"],0],"check":"5","expected":[["success","terminal","terminal"],0],"passed":true},{"actual":[["cancelled","terminal"],0],"check":"6","expected":[["cancelled","terminal"],0],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"0\", \"actual\": [[], 0], \"expected\": [[], 0], \"passed\": true}, {\"check\": \"1\", \"actual\": [[\"inactive\"], 0], \"expected\": [[\"inactive\"], 0], \"passed\": true}, {\"check\": \"2\", \"actual\": [[[\"retry\", 503], \"inactive\", [\"retry\", null]], 0], \"expected\": [[[\"retry\", 503], \"inactive\", [\"retry\", null]], 0], \"passed\": true}, {\"check\": \"3\", \"actual\": [[[\"partial\", 200]], 1], \"expected\": [[[\"partial\", 200], \"terminal\"], 1], \"passed\": false}, {\"check\": \"4\", \"actual\": [[[\"partial\", 502]], 5], \"expected\": [[[\"partial\", 502]], 5], \"passed\": true}, {\"check\": \"5\", \"actual\": [[\"success\", \"terminal\", \"terminal\"], 0], \"expected\": [[\"success\", \"terminal\", \"terminal\"], 0], \"passed\": true}, {\"check\": \"6\", \"actual\": [[\"cancelled\", \"terminal\"], 0], \"expected\": [[\"cancelled\", \"terminal\"], 0], \"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."}}