FA-10501 / Caching / Open access
Failed background refresh leaves a permanent in-flight marker · case 01
Failed background refresh leaves a permanent in-flight marker.
ROOT CAUSE
Only successful completion releases the refresh ownership marker.
VERIFIED REPAIR
Preserve the cache-state invariant: Completion, successful or failed, removes only its own refresh key from the in-flight registry; output is a sorted unique key list.
Unsuccessful approach: Clearing the whole registry lets unrelated active refreshes start duplicate work.
Case contract
Completion, successful or failed, removes only its own refresh key from the in-flight registry; output is a sorted unique key list.
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(active, key, outcome):
return sorted(set(active)-({key} if outcome=='success' else set()))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(['a', 'b'], 'a', 'error')), ['b'])
check('fixture 2', solve(*(['a', 'b'], 'a', 'success')), ['b'])
check('fixture 3', solve(*(['b'], 'a', 'error')), ['b'])
check('fixture 4', solve(*([], 'a', 'success')), [])
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', 'b'] | ['b'] | Failed |
| fixture 2 | ['b'] | ['b'] | Passed |
| fixture 3 | ['b'] | ['b'] | Passed |
| fixture 4 | [] | [] | Passed |
SHA-256 / 0729d4a28d80926e58a7397e4985cf6a33930943a76ce29dc1f0b4a0f960c262
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(active, key, outcome):
return []
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(['a', 'b'], 'a', 'error')), ['b'])
check('fixture 2', solve(*(['a', 'b'], 'a', 'success')), ['b'])
check('fixture 3', solve(*(['b'], 'a', 'error')), ['b'])
check('fixture 4', solve(*([], 'a', 'success')), [])
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 | [] | ['b'] | Failed |
| fixture 2 | [] | ['b'] | Failed |
| fixture 3 | [] | ['b'] | Failed |
| fixture 4 | [] | [] | Passed |
SHA-256 / 66621a6382100471a98bb42990c21a47f4e763406318012a1f806f95c601cd01
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(active, key, outcome):
return sorted(set(active)-{key})
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('fixture 1', solve(*(['a', 'b'], 'a', 'error')), ['b'])
check('fixture 2', solve(*(['a', 'b'], 'a', 'success')), ['b'])
check('fixture 3', solve(*(['b'], 'a', 'error')), ['b'])
check('fixture 4', solve(*([], 'a', 'success')), [])
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 | ['b'] | ['b'] | Passed |
| fixture 2 | ['b'] | ['b'] | Passed |
| fixture 3 | ['b'] | ['b'] | Passed |
| fixture 4 | [] | [] | Passed |
SHA-256 / 068ed48026726b5766a243955f007fefebe15b5c84cc003e8c057b9ba6d67471
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.610518+00:00.
Case digest / 0acb2e9a6b04d36f2950c7585d825b4337b79700340ce6b70b8f6c8efef69722