{"abstract":"Replacing a dirty value with a read result silently loses pending writes.","category":"Caching","checks":4,"contract":"Entry is [value,dirty]. A fetched value replaces only clean state; a dirty local write remains authoritative until flushed.","evaluation_group":"xc-dirty-replacement-stays-dirty","failed_approach":"Refusing every refresh also prevents clean entries from receiving remote updates.","family":"xc-dirty-replacement-stays-dirty","id":"FA-10451","implementations":{"attempt":{"sha256":"babef84de440a1f78682137495def41fb4c3e6c5c6fb32afcd82e0c935babf1c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(entry, fetched):\n    return [entry[0],entry[1]]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1', solve(*(['local', True], 'remote')), ['local', True])\ncheck('fixture 2', solve(*(['old', False], 'remote')), ['remote', False])\ncheck('fixture 3', solve(*([None, True], 'remote')), [None, True])\ncheck('fixture 4', solve(*([None, False], 0)), [0, False])\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":"506a56fd4de4e58db4486306787bbc3c249ae86c91fdc5cbdb345fca105f2b1c","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(entry, fetched):\n    return [fetched,False]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1', solve(*(['local', True], 'remote')), ['local', True])\ncheck('fixture 2', solve(*(['old', False], 'remote')), ['remote', False])\ncheck('fixture 3', solve(*([None, True], 'remote')), [None, True])\ncheck('fixture 4', solve(*([None, False], 0)), [0, False])\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":"d781f38ccc0a070cd97d828331b1b3c0e090f0c493978ef2a46d88f9eaca47c6","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(entry, fetched):\n    return list(entry) if entry[1] else [fetched,False]\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\ncheck('fixture 1', solve(*(['local', True], 'remote')), ['local', True])\ncheck('fixture 2', solve(*(['old', False], 'remote')), ['remote', False])\ncheck('fixture 3', solve(*([None, True], 'remote')), [None, True])\ncheck('fixture 4', solve(*([None, False], 0)), [0, False])\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-dirty-replacement-stays-dirty","generated_at":"2026-09-29T14:38:39.150617+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: Entry is [value,dirty]. A fetched value replaces only clean state; a dirty local write remains authoritative until flushed.","root_cause":"Read-through refresh overwrites locally modified cache state.","sha256":"b04fd6dac6fb43687f5cde62d606fb8950acbf55b504ceeb99176a6f4c623422","title":"Replacing a dirty value with a read result silently loses pending writes · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":43.704,"exit_code":1,"observations":[{"actual":["local",true],"check":"fixture 1","expected":["local",true],"passed":true},{"actual":["old",false],"check":"fixture 2","expected":["remote",false],"passed":false},{"actual":[null,true],"check":"fixture 3","expected":[null,true],"passed":true},{"actual":[null,false],"check":"fixture 4","expected":[0,false],"passed":false}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [\"local\", true], \"expected\": [\"local\", true], \"passed\": true}, {\"check\": \"fixture 2\", \"actual\": [\"old\", false], \"expected\": [\"remote\", false], \"passed\": false}, {\"check\": \"fixture 3\", \"actual\": [null, true], \"expected\": [null, true], \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": [null, false], \"expected\": [0, false], \"passed\": false}], \"passed\": false}\n"},"broken":{"elapsed_ms":44.61,"exit_code":1,"observations":[{"actual":["remote",false],"check":"fixture 1","expected":["local",true],"passed":false},{"actual":["remote",false],"check":"fixture 2","expected":["remote",false],"passed":true},{"actual":["remote",false],"check":"fixture 3","expected":[null,true],"passed":false},{"actual":[0,false],"check":"fixture 4","expected":[0,false],"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [\"remote\", false], \"expected\": [\"local\", true], \"passed\": false}, {\"check\": \"fixture 2\", \"actual\": [\"remote\", false], \"expected\": [\"remote\", false], \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": [\"remote\", false], \"expected\": [null, true], \"passed\": false}, {\"check\": \"fixture 4\", \"actual\": [0, false], \"expected\": [0, false], \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":47.898,"exit_code":0,"observations":[{"actual":["local",true],"check":"fixture 1","expected":["local",true],"passed":true},{"actual":["remote",false],"check":"fixture 2","expected":["remote",false],"passed":true},{"actual":[null,true],"check":"fixture 3","expected":[null,true],"passed":true},{"actual":[0,false],"check":"fixture 4","expected":[0,false],"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"fixture 1\", \"actual\": [\"local\", true], \"expected\": [\"local\", true], \"passed\": true}, {\"check\": \"fixture 2\", \"actual\": [\"remote\", false], \"expected\": [\"remote\", false], \"passed\": true}, {\"check\": \"fixture 3\", \"actual\": [null, true], \"expected\": [null, true], \"passed\": true}, {\"check\": \"fixture 4\", \"actual\": [0, false], \"expected\": [0, false], \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}