{"abstract":"Leaving a child discards the parent retry owner","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 if stack: stack.clear() but still violates a regression oracle.","family":"s3-http_retries-nested-ownership-pop","id":"FA-29486","implementations":{"attempt":{"sha256":"cf2bcfeaa30028597530700c6a2f21858e9b36daede7820e752b0e9a893eb0e2","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.clear()\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"},"broken":{"sha256":"2a81f9102187ca740ae134f5b9ac6c91f7e398384222f6073b2d08b070df6ff5","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(0)\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"},"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-pop","generated_at":"2026-09-29T14:41:43.640680+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 if stack: stack.pop().","root_cause":"Leaving a child discards the parent retry owner","sha256":"2796951fc5569345e81997b04f49c0376ef9ccba076e54df3d15466859ec3d9a","title":"Nested client retry ownership: Leaving a child discards the parent retry owner · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.706,"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":[[["unowned",null]],[]],"check":"4","expected":[[["retry","outer"]],[["outer",1,1]]],"passed":false},{"actual":[[["unowned",null]],[]],"check":"5","expected":[[["unowned",null]],[]],"passed":true},{"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\": [[[\"unowned\", null]], []], \"expected\": [[[\"retry\", \"outer\"]], [[\"outer\", 1, 1]]], \"passed\": false}, {\"check\": \"5\", \"actual\": [[[\"unowned\", null]], []], \"expected\": [[[\"unowned\", null]], []], \"passed\": true}, {\"check\": \"6\", \"actual\": [[[\"exhausted\", \"a\"]], []], \"expected\": [[[\"exhausted\", \"a\"]], []], \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":41.78,"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","inner"]],[["inner",1,1]]],"check":"4","expected":[[["retry","outer"]],[["outer",1,1]]],"passed":false},{"actual":[[["unowned",null]],[]],"check":"5","expected":[[["unowned",null]],[]],"passed":true},{"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\", \"inner\"]], [[\"inner\", 1, 1]]], \"expected\": [[[\"retry\", \"outer\"]], [[\"outer\", 1, 1]]], \"passed\": false}, {\"check\": \"5\", \"actual\": [[[\"unowned\", null]], []], \"expected\": [[[\"unowned\", null]], []], \"passed\": true}, {\"check\": \"6\", \"actual\": [[[\"exhausted\", \"a\"]], []], \"expected\": [[[\"exhausted\", \"a\"]], []], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":41.117,"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"}