FA-10466 / Caching / Open access
A cache namespace purge deletes similarly prefixed namespaces · case 01
A cache namespace purge deletes similarly prefixed namespaces.
ROOT CAUSE
A textual prefix is used where namespace identity is an exact field.
VERIFIED REPAIR
Preserve the cache-state invariant: Entries are [namespace,value]. Purge exact matching namespace identities only; namespaces are already separately parsed strings.
Unsuccessful approach: Substring matching widens the accidental deletion set.
Case contract
Entries are [namespace,value]. Purge exact matching namespace identities only; namespaces are already separately parsed strings.
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(entries, namespace):
return [x for x in entries if not x[0].startswith(namespace)]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*([['user', 1], ['users', 2], ['xuser', 3]], 'user')), [['users', 2], ['xuser', 3]])
check('fixture 2', solve(*([['a', 1]], 'z')), [['a', 1]])
check('fixture 3', solve(*([['', 1], ['x', 2]], '')), [['x', 2]])
check('fixture 4', solve(*([], 'a')), [])
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 | [['xuser', 3]] | [['users', 2], ['xuser', 3]] | Failed |
| fixture 2 | [['a', 1]] | [['a', 1]] | Passed |
| fixture 3 | [] | [['x', 2]] | Failed |
| fixture 4 | [] | [] | Passed |
SHA-256 / 19f0fac1c2f6a2fcc5c2c4de481c8f5fff048e1ddefc745f27671d5b02e37c90
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(entries, namespace):
return [x for x in entries if namespace not in x[0]]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*([['user', 1], ['users', 2], ['xuser', 3]], 'user')), [['users', 2], ['xuser', 3]])
check('fixture 2', solve(*([['a', 1]], 'z')), [['a', 1]])
check('fixture 3', solve(*([['', 1], ['x', 2]], '')), [['x', 2]])
check('fixture 4', solve(*([], 'a')), [])
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 | [] | [['users', 2], ['xuser', 3]] | Failed |
| fixture 2 | [['a', 1]] | [['a', 1]] | Passed |
| fixture 3 | [] | [['x', 2]] | Failed |
| fixture 4 | [] | [] | Passed |
SHA-256 / 58013aad57f03349acbacaaed8724ad32aa94644f668581868c84faff3ba8a5e
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(entries, namespace):
return [x for x in entries if x[0]!=namespace]
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*([['user', 1], ['users', 2], ['xuser', 3]], 'user')), [['users', 2], ['xuser', 3]])
check('fixture 2', solve(*([['a', 1]], 'z')), [['a', 1]])
check('fixture 3', solve(*([['', 1], ['x', 2]], '')), [['x', 2]])
check('fixture 4', solve(*([], 'a')), [])
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 | [['users', 2], ['xuser', 3]] | [['users', 2], ['xuser', 3]] | Passed |
| fixture 2 | [['a', 1]] | [['a', 1]] | Passed |
| fixture 3 | [['x', 2]] | [['x', 2]] | Passed |
| fixture 4 | [] | [] | Passed |
SHA-256 / bf58a1c6adac53904c20311406b9f9acf2122e35b77aa7fcf078dd417fcd64c4
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:39.270279+00:00.
Case digest / a5b7b811da1fd402ad15d6fd799676f1854712767e01f7297c75d328877fa13c