FA-10416 / Caching / Open access
Creating a record leaves its cached absence visible · case 01
Creating a record leaves its cached absence visible.
ROOT CAUSE
The write-through creation path does not replace prior negative cache state.
VERIFIED REPAIR
Preserve the cache-state invariant: Write-through creation stores the supplied value under key whether the cache held an old value, negative None, or no entry; unrelated entries are preserved.
Unsuccessful approach: Updating only a non-None hit skips both negative entries and newly created keys.
Case contract
Write-through creation stores the supplied value under key whether the cache held an old value, negative None, or no entry; unrelated entries are preserved.
Why this case matters
A deterministic cache state transformation. Inputs are copied or treated as immutable; no remote storage, real clock, or concurrent interleaving is simulated.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(cache, key, value):
return dict(cache)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*({'a': None}, 'a', 'new')), {'a': 'new'})
check('fixture 2', solve(*({}, 'a', 0)), {'a': 0})
check('fixture 3', solve(*({'a': 'old', 'b': None}, 'a', 'new')), {'a': 'new', 'b': None})
check('fixture 4', solve(*({'a': False}, 'a', True)), {'a': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | {'a': None} | {'a': 'new'} | Failed |
| fixture 2 | {} | {'a': 0} | Failed |
| fixture 3 | {'a': 'old', 'b': None} | {'a': 'new', 'b': None} | Failed |
| fixture 4 | {'a': False} | {'a': True} | Failed |
SHA-256 / 6cfa06eac5adcba92bc580c06b2e2f6b254aa1e439196815a90af2b82a1857a0
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(cache, key, value):
out=dict(cache)
if out.get(key) is not None:
out[key]=value
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*({'a': None}, 'a', 'new')), {'a': 'new'})
check('fixture 2', solve(*({}, 'a', 0)), {'a': 0})
check('fixture 3', solve(*({'a': 'old', 'b': None}, 'a', 'new')), {'a': 'new', 'b': None})
check('fixture 4', solve(*({'a': False}, 'a', True)), {'a': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | {'a': None} | {'a': 'new'} | Failed |
| fixture 2 | {} | {'a': 0} | Failed |
| fixture 3 | {'a': 'new', 'b': None} | {'a': 'new', 'b': None} | Passed |
| fixture 4 | {'a': True} | {'a': True} | Passed |
SHA-256 / 07b94a24d63766e809c335fc71a5761a28ea7b81109962cf35aecad99dd554fb
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(cache, key, value):
out=dict(cache)
out[key]=value
return out
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*({'a': None}, 'a', 'new')), {'a': 'new'})
check('fixture 2', solve(*({}, 'a', 0)), {'a': 0})
check('fixture 3', solve(*({'a': 'old', 'b': None}, 'a', 'new')), {'a': 'new', 'b': None})
check('fixture 4', solve(*({'a': False}, 'a', True)), {'a': True})
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
| Boundary fixture | Actual | Expected | Outcome |
|---|---|---|---|
| fixture 1 | {'a': 'new'} | {'a': 'new'} | Passed |
| fixture 2 | {'a': 0} | {'a': 0} | Passed |
| fixture 3 | {'a': 'new', 'b': None} | {'a': 'new', 'b': None} | Passed |
| fixture 4 | {'a': True} | {'a': True} | Passed |
SHA-256 / a2dbde1738d5a6e03c771c057b5fd184e1966e6614667f3afb94fcde2969f215
Verification & scope
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.
Observations recorded using Python 3.12.14 at 2026-09-29T14:38:38.758048+00:00.
Case digest / a1d9136dd99033200b73d2d73a8e045e3f3d7d7a98e9e3d96d071037eb4530d6