{"abstract":"An old fetch repopulates a cache after invalidation.","category":"Caching","checks":4,"contract":"Publish fetched value only when its captured generation equals the current generation; otherwise preserve the complete cache.","evaluation_group":"xc-generation-invalidation-race","failed_approach":"An ordered less-than check accepts precisely the stale generations that must be rejected.","family":"xc-generation-invalidation-race","id":"FA-10471","implementations":{"attempt":{"sha256":"81193ff4876aa8c6f02334b04dd3c20b291a751ce0c20b95188a03508d37174e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(cache, key, value, started, current):\n    out=dict(cache)\n    if started<=current: out[key]=value\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1', solve(*({}, 'a', 'stale', 2, 3)), {})\ncheck('fixture 2', solve(*({'a': 'new'}, 'a', 'old', 2, 3)), {'a': 'new'})\ncheck('fixture 3', solve(*({}, 'a', 'fresh', 3, 3)), {'a': 'fresh'})\ncheck('fixture 4', solve(*({'b': 0}, 'a', None, 0, 0)), {'b': 0, 'a': None})\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":"bb47341acbc6550fff7464f5eb0d5dc7fa5659a2554510926bd1be4713e0467e","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(cache, key, value, started, current):\n    out=dict(cache)\n    out[key]=value\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1', solve(*({}, 'a', 'stale', 2, 3)), {})\ncheck('fixture 2', solve(*({'a': 'new'}, 'a', 'old', 2, 3)), {'a': 'new'})\ncheck('fixture 3', solve(*({}, 'a', 'fresh', 3, 3)), {'a': 'fresh'})\ncheck('fixture 4', solve(*({'b': 0}, 'a', None, 0, 0)), {'b': 0, 'a': None})\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":"98352f0ae070b47f5435db815086f111632cdd3954e17c6cd37afd8eed6e46aa","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(cache, key, value, started, current):\n    out=dict(cache)\n    if started==current: out[key]=value\n    return out\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1', solve(*({}, 'a', 'stale', 2, 3)), {})\ncheck('fixture 2', solve(*({'a': 'new'}, 'a', 'old', 2, 3)), {'a': 'new'})\ncheck('fixture 3', solve(*({}, 'a', 'fresh', 3, 3)), {'a': 'fresh'})\ncheck('fixture 4', solve(*({'b': 0}, 'a', None, 0, 0)), {'b': 0, 'a': None})\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 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":"xc-generation-invalidation-race","generated_at":"2026-09-29T14:38:39.316428+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic cache state transformation. Inputs are copied or treated as immutable; no remote storage, real clock, or concurrent interleaving is simulated.","repair":"Preserve the cache-state invariant: Publish fetched value only when its captured generation equals the current generation; otherwise preserve the complete cache.","root_cause":"Fetch completion ignores the invalidation generation captured at fetch start.","sha256":"a0d38b031342a204faf74ee8be4bad85d6e42496dbad829fab2b36579a4f3397","title":"An old fetch repopulates a cache after invalidation · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.363,"exit_code":1,"observations":[{"actual":{"a":"stale"},"check":"fixture 1","expected":{},"passed":false},{"actual":{"a":"old"},"check":"fixture 2","expected":{"a":"new"},"passed":false},{"actual":{"a":"fresh"},"check":"fixture 3","expected":{"a":"fresh"},"passed":true},{"actual":{"a":null,"b":0},"check":"fixture 4","expected":{"a":null,"b":0},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": {\"a\": \"stale\"}, \"expected\": {}, \"passed\": false}, {\"check\": \"fixture 2\", \"actual\": {\"a\": \"old\"}, \"expected\": {\"a\": \"new\"}, \"passed\": false}, {\"check\": \"fixture 3\", \"actual\": {\"a\": \"fresh\"}, \"expected\": {\"a\": \"fresh\"}, \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": {\"b\": 0, \"a\": null}, \"expected\": {\"b\": 0, \"a\": null}, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":42.94,"exit_code":1,"observations":[{"actual":{"a":"stale"},"check":"fixture 1","expected":{},"passed":false},{"actual":{"a":"old"},"check":"fixture 2","expected":{"a":"new"},"passed":false},{"actual":{"a":"fresh"},"check":"fixture 3","expected":{"a":"fresh"},"passed":true},{"actual":{"a":null,"b":0},"check":"fixture 4","expected":{"a":null,"b":0},"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": {\"a\": \"stale\"}, \"expected\": {}, \"passed\": false}, {\"check\": \"fixture 2\", \"actual\": {\"a\": \"old\"}, \"expected\": {\"a\": \"new\"}, \"passed\": false}, {\"check\": \"fixture 3\", \"actual\": {\"a\": \"fresh\"}, \"expected\": {\"a\": \"fresh\"}, \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": {\"b\": 0, \"a\": null}, \"expected\": {\"b\": 0, \"a\": null}, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":43.807,"exit_code":0,"observations":[{"actual":{},"check":"fixture 1","expected":{},"passed":true},{"actual":{"a":"new"},"check":"fixture 2","expected":{"a":"new"},"passed":true},{"actual":{"a":"fresh"},"check":"fixture 3","expected":{"a":"fresh"},"passed":true},{"actual":{"a":null,"b":0},"check":"fixture 4","expected":{"a":null,"b":0},"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": {}, \"expected\": {}, \"passed\": true}, {\"check\": \"fixture 2\", \"actual\": {\"a\": \"new\"}, \"expected\": {\"a\": \"new\"}, \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": {\"a\": \"fresh\"}, \"expected\": {\"a\": \"fresh\"}, \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": {\"b\": 0, \"a\": null}, \"expected\": {\"b\": 0, \"a\": null}, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}