{"abstract":"A successful background refresh leaves the preceding error attempt visible.","category":"Client state","checks":6,"contract":"Failure appends an error to a bounded history, success clears it, other events retain it, and capacity zero retains no errors.","evaluation_group":"s3-client-state-cache-error-history","failed_approach":"The partial repair still violates at least one explicit regression oracle.","family":"s3-client-state-cache-error-history","id":"FA-24731","implementations":{"attempt":{"sha256":"40f8f39b794f7cdc61cad7c87b98d72e0588c397d343c9070058a6e63402dc81","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(history, event, payload, capacity):\n    return [] if event=='success' else (history+[payload])[-capacity:]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('success clears', solve(['old'],'success',None,N), [])\ncheck('failure bound', solve(list(range(N+1)),'failure',99,N), (list(range(N+1))+[99])[-N:])\ncheck('zero history budget', solve(['old'],'failure','new',0), [])\ncheck('start does not add error', solve(['old'],'start',None,2), ['old'])\ncheck('empty text retained', solve([],'failure','',2), [''])\ncheck('idle truncates existing', solve(['a','b'],'idle',None,1), ['b'])\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":"b70fca9fb8790ac6896c1171f58743b7a7801edcb2f40ac8050604f55774f581","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(history, event, payload, capacity):\n    return (history+[payload])[-capacity:] if event=='failure' else history\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('success clears', solve(['old'],'success',None,N), [])\ncheck('failure bound', solve(list(range(N+1)),'failure',99,N), (list(range(N+1))+[99])[-N:])\ncheck('zero history budget', solve(['old'],'failure','new',0), [])\ncheck('start does not add error', solve(['old'],'start',None,2), ['old'])\ncheck('empty text retained', solve([],'failure','',2), [''])\ncheck('idle truncates existing', solve(['a','b'],'idle',None,1), ['b'])\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":"f7c299e1091a4b3835e9e5e37ea394385cc2b295ae6dfe6335be56881fb6a4e3","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(history, event, payload, capacity):\n    updated=history+[payload] if event=='failure' else ([] if event=='success' else list(history))\n    return updated[-capacity:] if capacity>0 else []\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('success clears', solve(['old'],'success',None,N), [])\ncheck('failure bound', solve(list(range(N+1)),'failure',99,N), (list(range(N+1))+[99])[-N:])\ncheck('zero history budget', solve(['old'],'failure','new',0), [])\ncheck('start does not add error', solve(['old'],'start',None,2), ['old'])\ncheck('empty text retained', solve([],'failure','',2), [''])\ncheck('idle truncates existing', solve(['a','b'],'idle',None,1), ['b'])\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":"This models the stated application policy only; no browser or framework conformance is claimed. 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-client-state-cache-error-history","generated_at":"2026-09-29T14:41:00.161012+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A bounded offline client-state transition with explicit lifecycle inputs.","repair":"Failure appends an error to a bounded history, success clears it, other events retain it, and capacity zero retains no errors.","root_cause":"The faulty implementation violates Failure appends an error to a bounded history, success clears it, other events retain it, and capacity zero retains no errors.","sha256":"820c20930d832055f1620a5d93d31db668f766ed2086dc6ca8f53c5532ff628a","title":"A successful background refresh leaves the preceding error attempt visible · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":42.911,"exit_code":1,"observations":[{"actual":[],"check":"success clears","expected":[],"passed":true},{"actual":[99],"check":"failure bound","expected":[99],"passed":true},{"actual":["old","new"],"check":"zero history budget","expected":[],"passed":false},{"actual":["old",null],"check":"start does not add error","expected":["old"],"passed":false},{"actual":[""],"check":"empty text retained","expected":[""],"passed":true},{"actual":[null],"check":"idle truncates existing","expected":["b"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"success clears\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"failure bound\", \"actual\": [99], \"expected\": [99], \"passed\": true}, {\"check\": \"zero history budget\", \"actual\": [\"old\", \"new\"], \"expected\": [], \"passed\": false}, {\"check\": \"start does not add error\", \"actual\": [\"old\", null], \"expected\": [\"old\"], \"passed\": false}, {\"check\": \"empty text retained\", \"actual\": [\"\"], \"expected\": [\"\"], \"passed\": true}, {\"check\": \"idle truncates existing\", \"actual\": [null], \"expected\": [\"b\"], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":40.148,"exit_code":1,"observations":[{"actual":["old"],"check":"success clears","expected":[],"passed":false},{"actual":[99],"check":"failure bound","expected":[99],"passed":true},{"actual":["old","new"],"check":"zero history budget","expected":[],"passed":false},{"actual":["old"],"check":"start does not add error","expected":["old"],"passed":true},{"actual":[""],"check":"empty text retained","expected":[""],"passed":true},{"actual":["a","b"],"check":"idle truncates existing","expected":["b"],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"success clears\", \"actual\": [\"old\"], \"expected\": [], \"passed\": false}, {\"check\": \"failure bound\", \"actual\": [99], \"expected\": [99], \"passed\": true}, {\"check\": \"zero history budget\", \"actual\": [\"old\", \"new\"], \"expected\": [], \"passed\": false}, {\"check\": \"start does not add error\", \"actual\": [\"old\"], \"expected\": [\"old\"], \"passed\": true}, {\"check\": \"empty text retained\", \"actual\": [\"\"], \"expected\": [\"\"], \"passed\": true}, {\"check\": \"idle truncates existing\", \"actual\": [\"a\", \"b\"], \"expected\": [\"b\"], \"passed\": false}], \"passed\": false}\n"},"fixed":{"elapsed_ms":40.192,"exit_code":0,"observations":[{"actual":[],"check":"success clears","expected":[],"passed":true},{"actual":[99],"check":"failure bound","expected":[99],"passed":true},{"actual":[],"check":"zero history budget","expected":[],"passed":true},{"actual":["old"],"check":"start does not add error","expected":["old"],"passed":true},{"actual":[""],"check":"empty text retained","expected":[""],"passed":true},{"actual":["b"],"check":"idle truncates existing","expected":["b"],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"success clears\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"failure bound\", \"actual\": [99], \"expected\": [99], \"passed\": true}, {\"check\": \"zero history budget\", \"actual\": [], \"expected\": [], \"passed\": true}, {\"check\": \"start does not add error\", \"actual\": [\"old\"], \"expected\": [\"old\"], \"passed\": true}, {\"check\": \"empty text retained\", \"actual\": [\"\"], \"expected\": [\"\"], \"passed\": true}, {\"check\": \"idle truncates existing\", \"actual\": [\"b\"], \"expected\": [\"b\"], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}