{"abstract":"Successful nested requests retain retry scopes","category":"HTTP retries","checks":7,"contract":"enter(layer, allowance) pushes a retry scope. A child with any ancestor delegates retry to the oldest scope and never spends its local cap. fail returns retry/exhausted charged to oldest scope. leave pops the current scope; success clears every scope. Return decision pairs and remaining scope budgets.","evaluation_group":"s3-http_retries-nested-ownership","failed_approach":"The attempted repair changes the faulty site to stack[:]=stack[:-1] but still violates a regression oracle.","family":"s3-http_retries-nested-ownership-success","id":"FA-29491","implementations":{"attempt":{"sha256":"d22903f2a0ec9533f0c293059d74eb14aae41b01ba476e5c8cb9ec76ce66627e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events):\n    stack=[]; out=[]\n    for e in events:\n        if e[0]=='enter':\n            stack.append([e[1],e[2],0])\n        elif e[0]=='leave':\n            if stack: stack.pop()\n        elif e[0]=='success':\n            stack[:]=stack[:-1]\n        elif e[0]=='fail':\n            if not stack:\n                out.append(['unowned',None]); continue\n            owner=stack[0]\n            if owner[2]>=owner[1]:\n                out.append(['exhausted',owner[0]])\n            else:\n                owner[2]+=1\n                out.append(['retry',owner[0]])\n    return [out,stack]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('0', solve([]), [[],[]])\ncheck('1', solve([('fail',)]), [[['unowned',None]],[]])\ncheck('2', solve([('enter','outer',2),('enter','inner',9),('fail',),('fail',),('fail',)]), [[['retry','outer'],['retry','outer'],['exhausted','outer']],[['outer',2,2],['inner',9,0]]])\ncheck('3', solve([('enter','only',N),('fail',)]), [[['retry','only']],[['only',N,1]]])\ncheck('4', solve([('enter','outer',1),('enter','inner',1),('leave',),('fail',)]), [[['retry','outer']],[['outer',1,1]]])\ncheck('5', solve([('enter','a',0),('enter','b',N),('success',),('fail',)]), [[['unowned',None]],[]])\ncheck('6', solve([('enter','a',0),('fail',),('leave',),('leave',)]), [[['exhausted','a']],[]])\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":"b400435433780235456e0318e0fbfe84d1d91e2811384be625f5a02b6cdc6c24","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events):\n    stack=[]; out=[]\n    for e in events:\n        if e[0]=='enter':\n            stack.append([e[1],e[2],0])\n        elif e[0]=='leave':\n            if stack: stack.pop()\n        elif e[0]=='success':\n            stack[:]=stack[:1]\n        elif e[0]=='fail':\n            if not stack:\n                out.append(['unowned',None]); continue\n            owner=stack[0]\n            if owner[2]>=owner[1]:\n                out.append(['exhausted',owner[0]])\n            else:\n                owner[2]+=1\n                out.append(['retry',owner[0]])\n    return [out,stack]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('0', solve([]), [[],[]])\ncheck('1', solve([('fail',)]), [[['unowned',None]],[]])\ncheck('2', solve([('enter','outer',2),('enter','inner',9),('fail',),('fail',),('fail',)]), [[['retry','outer'],['retry','outer'],['exhausted','outer']],[['outer',2,2],['inner',9,0]]])\ncheck('3', solve([('enter','only',N),('fail',)]), [[['retry','only']],[['only',N,1]]])\ncheck('4', solve([('enter','outer',1),('enter','inner',1),('leave',),('fail',)]), [[['retry','outer']],[['outer',1,1]]])\ncheck('5', solve([('enter','a',0),('enter','b',N),('success',),('fail',)]), [[['unowned',None]],[]])\ncheck('6', solve([('enter','a',0),('fail',),('leave',),('leave',)]), [[['exhausted','a']],[]])\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"},"fixed":{"sha256":"048e1a057db3094c6f347897dd4e56eb50b6e8fc629d0b04d5de6513b1857145","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(events):\n    stack=[]; out=[]\n    for e in events:\n        if e[0]=='enter':\n            stack.append([e[1],e[2],0])\n        elif e[0]=='leave':\n            if stack: stack.pop()\n        elif e[0]=='success':\n            stack.clear()\n        elif e[0]=='fail':\n            if not stack:\n                out.append(['unowned',None]); continue\n            owner=stack[0]\n            if owner[2]>=owner[1]:\n                out.append(['exhausted',owner[0]])\n            else:\n                owner[2]+=1\n                out.append(['retry',owner[0]])\n    return [out,stack]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('0', solve([]), [[],[]])\ncheck('1', solve([('fail',)]), [[['unowned',None]],[]])\ncheck('2', solve([('enter','outer',2),('enter','inner',9),('fail',),('fail',),('fail',)]), [[['retry','outer'],['retry','outer'],['exhausted','outer']],[['outer',2,2],['inner',9,0]]])\ncheck('3', solve([('enter','only',N),('fail',)]), [[['retry','only']],[['only',N,1]]])\ncheck('4', solve([('enter','outer',1),('enter','inner',1),('leave',),('fail',)]), [[['retry','outer']],[['outer',1,1]]])\ncheck('5', solve([('enter','a',0),('enter','b',N),('success',),('fail',)]), [[['unowned',None]],[]])\ncheck('6', solve([('enter','a',0),('fail',),('leave',),('leave',)]), [[['exhausted','a']],[]])\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-nested-ownership-success","generated_at":"2026-09-29T14:41:43.747115+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"Offline deterministic model of HTTP request retries.","repair":"Restore the specified transition stack.clear().","root_cause":"Successful nested requests retain retry scopes","sha256":"f7587df7531a688bd14ca78464d66b309f4f739f999adb40270bff75cf09520e","title":"Nested client retry ownership: Successful nested requests retain retry scopes · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":40.111,"exit_code":1,"observations":[{"actual":[[],[]],"check":"0","expected":[[],[]],"passed":true},{"actual":[[["unowned",null]],[]],"check":"1","expected":[[["unowned",null]],[]],"passed":true},{"actual":[[["retry","outer"],["retry","outer"],["exhausted","outer"]],[["outer",2,2],["inner",9,0]]],"check":"2","expected":[[["retry","outer"],["retry","outer"],["exhausted","outer"]],[["outer",2,2],["inner",9,0]]],"passed":true},{"actual":[[["retry","only"]],[["only",1,1]]],"check":"3","expected":[[["retry","only"]],[["only",1,1]]],"passed":true},{"actual":[[["retry","outer"]],[["outer",1,1]]],"check":"4","expected":[[["retry","outer"]],[["outer",1,1]]],"passed":true},{"actual":[[["exhausted","a"]],[["a",0,0]]],"check":"5","expected":[[["unowned",null]],[]],"passed":false},{"actual":[[["exhausted","a"]],[]],"check":"6","expected":[[["exhausted","a"]],[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"0\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}, {\"check\": \"1\", \"actual\": [[[\"unowned\", null]], []], \"expected\": [[[\"unowned\", null]], []], \"passed\": true}, {\"check\": \"2\", \"actual\": [[[\"retry\", \"outer\"], [\"retry\", \"outer\"], [\"exhausted\", \"outer\"]], [[\"outer\", 2, 2], [\"inner\", 9, 0]]], \"expected\": [[[\"retry\", \"outer\"], [\"retry\", \"outer\"], [\"exhausted\", \"outer\"]], [[\"outer\", 2, 2], [\"inner\", 9, 0]]], \"passed\": true}, {\"check\": \"3\", \"actual\": [[[\"retry\", \"only\"]], [[\"only\", 1, 1]]], \"expected\": [[[\"retry\", \"only\"]], [[\"only\", 1, 1]]], \"passed\": true}, {\"check\": \"4\", \"actual\": [[[\"retry\", \"outer\"]], [[\"outer\", 1, 1]]], \"expected\": [[[\"retry\", \"outer\"]], [[\"outer\", 1, 1]]], \"passed\": true}, {\"check\": \"5\", \"actual\": [[[\"exhausted\", \"a\"]], [[\"a\", 0, 0]]], \"expected\": [[[\"unowned\", null]], []], \"passed\": false}, {\"check\": \"6\", \"actual\": [[[\"exhausted\", \"a\"]], []], \"expected\": [[[\"exhausted\", \"a\"]], []], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.534,"exit_code":1,"observations":[{"actual":[[],[]],"check":"0","expected":[[],[]],"passed":true},{"actual":[[["unowned",null]],[]],"check":"1","expected":[[["unowned",null]],[]],"passed":true},{"actual":[[["retry","outer"],["retry","outer"],["exhausted","outer"]],[["outer",2,2],["inner",9,0]]],"check":"2","expected":[[["retry","outer"],["retry","outer"],["exhausted","outer"]],[["outer",2,2],["inner",9,0]]],"passed":true},{"actual":[[["retry","only"]],[["only",1,1]]],"check":"3","expected":[[["retry","only"]],[["only",1,1]]],"passed":true},{"actual":[[["retry","outer"]],[["outer",1,1]]],"check":"4","expected":[[["retry","outer"]],[["outer",1,1]]],"passed":true},{"actual":[[["exhausted","a"]],[["a",0,0]]],"check":"5","expected":[[["unowned",null]],[]],"passed":false},{"actual":[[["exhausted","a"]],[]],"check":"6","expected":[[["exhausted","a"]],[]],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"0\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}, {\"check\": \"1\", \"actual\": [[[\"unowned\", null]], []], \"expected\": [[[\"unowned\", null]], []], \"passed\": true}, {\"check\": \"2\", \"actual\": [[[\"retry\", \"outer\"], [\"retry\", \"outer\"], [\"exhausted\", \"outer\"]], [[\"outer\", 2, 2], [\"inner\", 9, 0]]], \"expected\": [[[\"retry\", \"outer\"], [\"retry\", \"outer\"], [\"exhausted\", \"outer\"]], [[\"outer\", 2, 2], [\"inner\", 9, 0]]], \"passed\": true}, {\"check\": \"3\", \"actual\": [[[\"retry\", \"only\"]], [[\"only\", 1, 1]]], \"expected\": [[[\"retry\", \"only\"]], [[\"only\", 1, 1]]], \"passed\": true}, {\"check\": \"4\", \"actual\": [[[\"retry\", \"outer\"]], [[\"outer\", 1, 1]]], \"expected\": [[[\"retry\", \"outer\"]], [[\"outer\", 1, 1]]], \"passed\": true}, {\"check\": \"5\", \"actual\": [[[\"exhausted\", \"a\"]], [[\"a\", 0, 0]]], \"expected\": [[[\"unowned\", null]], []], \"passed\": false}, {\"check\": \"6\", \"actual\": [[[\"exhausted\", \"a\"]], []], \"expected\": [[[\"exhausted\", \"a\"]], []], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.966,"exit_code":0,"observations":[{"actual":[[],[]],"check":"0","expected":[[],[]],"passed":true},{"actual":[[["unowned",null]],[]],"check":"1","expected":[[["unowned",null]],[]],"passed":true},{"actual":[[["retry","outer"],["retry","outer"],["exhausted","outer"]],[["outer",2,2],["inner",9,0]]],"check":"2","expected":[[["retry","outer"],["retry","outer"],["exhausted","outer"]],[["outer",2,2],["inner",9,0]]],"passed":true},{"actual":[[["retry","only"]],[["only",1,1]]],"check":"3","expected":[[["retry","only"]],[["only",1,1]]],"passed":true},{"actual":[[["retry","outer"]],[["outer",1,1]]],"check":"4","expected":[[["retry","outer"]],[["outer",1,1]]],"passed":true},{"actual":[[["unowned",null]],[]],"check":"5","expected":[[["unowned",null]],[]],"passed":true},{"actual":[[["exhausted","a"]],[]],"check":"6","expected":[[["exhausted","a"]],[]],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"0\", \"actual\": [[], []], \"expected\": [[], []], \"passed\": true}, {\"check\": \"1\", \"actual\": [[[\"unowned\", null]], []], \"expected\": [[[\"unowned\", null]], []], \"passed\": true}, {\"check\": \"2\", \"actual\": [[[\"retry\", \"outer\"], [\"retry\", \"outer\"], [\"exhausted\", \"outer\"]], [[\"outer\", 2, 2], [\"inner\", 9, 0]]], \"expected\": [[[\"retry\", \"outer\"], [\"retry\", \"outer\"], [\"exhausted\", \"outer\"]], [[\"outer\", 2, 2], [\"inner\", 9, 0]]], \"passed\": true}, {\"check\": \"3\", \"actual\": [[[\"retry\", \"only\"]], [[\"only\", 1, 1]]], \"expected\": [[[\"retry\", \"only\"]], [[\"only\", 1, 1]]], \"passed\": true}, {\"check\": \"4\", \"actual\": [[[\"retry\", \"outer\"]], [[\"outer\", 1, 1]]], \"expected\": [[[\"retry\", \"outer\"]], [[\"outer\", 1, 1]]], \"passed\": true}, {\"check\": \"5\", \"actual\": [[[\"unowned\", null]], []], \"expected\": [[[\"unowned\", null]], []], \"passed\": true}, {\"check\": \"6\", \"actual\": [[[\"exhausted\", \"a\"]], []], \"expected\": [[[\"exhausted\", \"a\"]], []], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}