FAILURE MAP
← Case archive

FA-24811 / Client state / Open access

Batched store updates notify consumers before all writes become observable · case 01

Batched store updates notify consumers before all writes become observable.

Verified by executionVariant 1 · 6 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The faulty implementation violates A client-store commit applies the entire write batch then emits exactly one selector projection; empty batches emit nothing and selectors observe the final value of repeated writes.

VERIFIED REPAIR

A client-store commit applies the entire write batch then emits exactly one selector projection; empty batches emit nothing and selectors observe the final value of repeated writes.

Unsuccessful approach: The partial repair still violates at least one explicit regression oracle.

Case contract

A client-store commit applies the entire write batch then emits exactly one selector projection; empty batches emit nothing and selectors observe the final value of repeated writes.

Why this case matters

A bounded offline client-state transition with explicit lifecycle inputs.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(initial, writes, observed_keys):
    state=dict(initial); notices=[]
    for key,value in writes:
        state[key]=value; notices.append([state.get(key) for key in observed_keys])
    return notices
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('atomic multi-key change', solve({'a':1,'b':2},[('a',N),('b',N+1)],['a','b']), [[N,N+1]])
check('no writes no notify', solve({'a':1},[],['a']), [])
check('last write wins', solve({},[('a',1),('a',2)],['a']), [[2]])
check('missing observed field', solve({},[('a',1)],['b']), [[None]])
check('empty observer projection', solve({},[('a',1)],[]), [[]])
check('false value delivered', solve({},[('a',False)],['a']), [[False]])
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 fixtureActualExpectedOutcome
atomic multi-key change[[1, 2], [1, 2]][[1, 2]]Failed
no writes no notify[][]Passed
last write wins[[1], [2]][[2]]Failed
missing observed field[[None]][[None]]Passed
empty observer projection[[]][[]]Passed
false value delivered[[False]][[False]]Passed

SHA-256 / dd25efccef2c1b198cf8c88623f244a377eeddb0c7eec5ea971aa9bb3b858ebc

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(initial, writes, observed_keys):
    state=dict(initial)
    for key,value in writes: state[key]=value
    return [[state.get(key) for key in observed_keys]]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('atomic multi-key change', solve({'a':1,'b':2},[('a',N),('b',N+1)],['a','b']), [[N,N+1]])
check('no writes no notify', solve({'a':1},[],['a']), [])
check('last write wins', solve({},[('a',1),('a',2)],['a']), [[2]])
check('missing observed field', solve({},[('a',1)],['b']), [[None]])
check('empty observer projection', solve({},[('a',1)],[]), [[]])
check('false value delivered', solve({},[('a',False)],['a']), [[False]])
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 fixtureActualExpectedOutcome
atomic multi-key change[[1, 2]][[1, 2]]Passed
no writes no notify[[1]][]Failed
last write wins[[2]][[2]]Passed
missing observed field[[None]][[None]]Passed
empty observer projection[[]][[]]Passed
false value delivered[[False]][[False]]Passed

SHA-256 / 02f9d5fdacd856608fab3b4dd2adda5ac09ad1f29ff09e28b1c0f71352f1fb9c

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(initial, writes, observed_keys):
    state=dict(initial)
    for key,value in writes: state[key]=value
    return [[state.get(key) for key in observed_keys]] if writes else []
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('atomic multi-key change', solve({'a':1,'b':2},[('a',N),('b',N+1)],['a','b']), [[N,N+1]])
check('no writes no notify', solve({'a':1},[],['a']), [])
check('last write wins', solve({},[('a',1),('a',2)],['a']), [[2]])
check('missing observed field', solve({},[('a',1)],['b']), [[None]])
check('empty observer projection', solve({},[('a',1)],[]), [[]])
check('false value delivered', solve({},[('a',False)],['a']), [[False]])
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 fixtureActualExpectedOutcome
atomic multi-key change[[1, 2]][[1, 2]]Passed
no writes no notify[][]Passed
last write wins[[2]][[2]]Passed
missing observed field[[None]][[None]]Passed
empty observer projection[[]][[]]Passed
false value delivered[[False]][[False]]Passed

SHA-256 / 131a15220cc73fc062244e056f00959f446f9a29577aef5af3a7d61048456f88

Verification & scope

This models the stated application policy only; no browser or framework conformance is claimed. 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:41:00.994430+00:00.

Case digest / b64b860e22e4723d8ab5705419bedf1de76041cbd1c4ea9cdfa7f4f55d874d1e