FA-23966 / Client state / Open access
Render-consistent external-store snapshots: Subscription install read · case 01
Subscription install read.
ROOT CAUSE
The subscription-install-read client decision evaluates `'read-then-subscribe'` instead of `'subscribe-then-read' if subscribing else 'read-only'`.
VERIFIED REPAIR
Apply the modeled subscription-install-read rule: `'subscribe-then-read' if subscribing else 'read-only'`.
Unsuccessful approach: The partial repair `'subscribe-then-read'` still violates the explicit fixture contract.
Case contract
A render snapshot is rechecked at commit to detect intervening store writes. Selectors compare both scalar type and value. Server/client snapshots are separate and null differs from false, zero, or empty containers. Operation subscription-install-read has the six explicit input/output oracles below.
Why this case matters
An offline client lifecycle model that isolates a state-management defect without DOM rendering or network services.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(operation, s):
render_version, commit_version, selected, previous, server, browser, subscribing = s
if operation == 'commit-tearing-recheck':
return render_version!=commit_version
if operation == 'selector-type-equality':
return type(selected)==type(previous) and selected==previous
if operation == 'server-snapshot-selection':
return server
if operation == 'browser-snapshot-selection':
return browser
if operation == 'snapshot-version-pair':
return (commit_version,selected)
if operation == 'subscription-install-read':
return 'read-then-subscribe'
if operation == 'stale-render-retry':
return 'retry' if render_version!=commit_version else 'commit'
if operation == 'selector-empty-value-retention':
return selected if selected is not None else previous
if operation == 'notify-selected-change':
return type(selected)!=type(previous) or selected!=previous
if operation == 'snapshot-null-initialization':
return selected is None
raise ValueError('unknown modeled operation')
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('commit-tearing-recheck scenario 1', solve('commit-tearing-recheck', (N,N+1,{'x':1},{'x':1},'ssr','client',True)), True)
check('commit-tearing-recheck scenario 2', solve('commit-tearing-recheck', (1,1,0,False,None,'client',True)), False)
check('commit-tearing-recheck scenario 3', solve('commit-tearing-recheck', (2,2,[],[],0,1,False)), False)
check('commit-tearing-recheck scenario 4', solve('commit-tearing-recheck', (1,3,None,'old','server',None,True)), True)
check('commit-tearing-recheck scenario 5', solve('commit-tearing-recheck', (0,0,'a','b','','client',False)), False)
check('commit-tearing-recheck scenario 6', solve('commit-tearing-recheck', (4,4,{'x':2},{'x':1},False,True,True)), False)
check('selector-type-equality scenario 1', solve('selector-type-equality', (N,N+1,{'x':1},{'x':1},'ssr','client',True)), True)
check('selector-type-equality scenario 2', solve('selector-type-equality', (1,1,0,False,None,'client',True)), False)
check('selector-type-equality scenario 3', solve('selector-type-equality', (2,2,[],[],0,1,False)), True)
check('selector-type-equality scenario 4', solve('selector-type-equality', (1,3,None,'old','server',None,True)), False)
check('selector-type-equality scenario 5', solve('selector-type-equality', (0,0,'a','b','','client',False)), False)
check('selector-type-equality scenario 6', solve('selector-type-equality', (4,4,{'x':2},{'x':1},False,True,True)), False)
check('server-snapshot-selection scenario 1', solve('server-snapshot-selection', (N,N+1,{'x':1},{'x':1},'ssr','client',True)), 'ssr')
check('server-snapshot-selection scenario 2', solve('server-snapshot-selection', (1,1,0,False,None,'client',True)), None)
check('server-snapshot-selection scenario 3', solve('server-snapshot-selection', (2,2,[],[],0,1,False)), 0)
check('server-snapshot-selection scenario 4', solve('server-snapshot-selection', (1,3,None,'old','server',None,True)), 'server')
check('server-snapshot-selection scenario 5', solve('server-snapshot-selection', (0,0,'a','b','','client',False)), '')
check('server-snapshot-selection scenario 6', solve('server-snapshot-selection', (4,4,{'x':2},{'x':1},False,True,True)), False)
check('browser-snapshot-selection scenario 1', solve('browser-snapshot-selection', (N,N+1,{'x':1},{'x':1},'ssr','client',True)), 'client')
check('browser-snapshot-selection scenario 2', solve('browser-snapshot-selection', (1,1,0,False,None,'client',True)), 'client')
check('browser-snapshot-selection scenario 3', solve('browser-snapshot-selection', (2,2,[],[],0,1,False)), 1)
check('browser-snapshot-selection scenario 4', solve('browser-snapshot-selection', (1,3,None,'old','server',None,True)), None)
check('browser-snapshot-selection scenario 5', solve('browser-snapshot-selection', (0,0,'a','b','','client',False)), 'client')
check('browser-snapshot-selection scenario 6', solve('browser-snapshot-selection', (4,4,{'x':2},{'x':1},False,True,True)), True)
check('snapshot-version-pair scenario 1', solve('snapshot-version-pair', (N,N+1,{'x':1},{'x':1},'ssr','client',True)), (N+1,{'x':1}))
check('snapshot-version-pair scenario 2', solve('snapshot-version-pair', (1,1,0,False,None,'client',True)), (1,0))
check('snapshot-version-pair scenario 3', solve('snapshot-version-pair', (2,2,[],[],0,1,False)), (2,[]))
check('snapshot-version-pair scenario 4', solve('snapshot-version-pair', (1,3,None,'old','server',None,True)), (3,None))
check('snapshot-version-pair scenario 5', solve('snapshot-version-pair', (0,0,'a','b','','client',False)), (0,'a'))
check('snapshot-version-pair scenario 6', solve('snapshot-version-pair', (4,4,{'x':2},{'x':1},False,True,True)), (4,{'x':2}))
check('subscription-install-read scenario 1', solve('subscription-install-read', (N,N+1,{'x':1},{'x':1},'ssr','client',True)), 'subscribe-then-read')
check('subscription-install-read scenario 2', solve('subscription-install-read', (1,1,0,False,None,'client',True)), 'subscribe-then-read')
check('subscription-install-read scenario 3', solve('subscription-install-read', (2,2,[],[],0,1,False)), 'read-only')
check('subscription-install-read scenario 4', solve('subscription-install-read', (1,3,None,'old','server',None,True)), 'subscribe-then-read')
check('subscription-install-read scenario 5', solve('subscription-install-read', (0,0,'a','b','','client',False)), 'read-only')
check('subscription-install-read scenario 6', solve('subscription-install-read', (4,4,{'x':2},{'x':1},False,True,True)), 'subscribe-then-read')
check('stale-render-retry scenario 1', solve('stale-render-retry', (N,N+1,{'x':1},{'x':1},'ssr','client',True)), 'retry')
check('stale-render-retry scenario 2', solve('stale-render-retry', (1,1,0,False,None,'client',True)), 'commit')
check('stale-render-retry scenario 3', solve('stale-render-retry', (2,2,[],[],0,1,False)), 'commit')
check('stale-render-retry scenario 4', solve('stale-render-retry', (1,3,None,'old','server',None,True)), 'retry')
check('stale-render-retry scenario 5', solve('stale-render-retry', (0,0,'a','b','','client',False)), 'commit')
check('stale-render-retry scenario 6', solve('stale-render-retry', (4,4,{'x':2},{'x':1},False,True,True)), 'commit')
check('selector-empty-value-retention scenario 1', solve('selector-empty-value-retention', (N,N+1,{'x':1},{'x':1},'ssr','client',True)), {'x':1})
check('selector-empty-value-retention scenario 2', solve('selector-empty-value-retention', (1,1,0,False,None,'client',True)), 0)
check('selector-empty-value-retention scenario 3', solve('selector-empty-value-retention', (2,2,[],[],0,1,False)), [])
check('selector-empty-value-retention scenario 4', solve('selector-empty-value-retention', (1,3,None,'old','server',None,True)), 'old')
check('selector-empty-value-retention scenario 5', solve('selector-empty-value-retention', (0,0,'a','b','','client',False)), 'a')
check('selector-empty-value-retention scenario 6', solve('selector-empty-value-retention', (4,4,{'x':2},{'x':1},False,True,True)), {'x':2})
check('notify-selected-change scenario 1', solve('notify-selected-change', (N,N+1,{'x':1},{'x':1},'ssr','client',True)), False)
check('notify-selected-change scenario 2', solve('notify-selected-change', (1,1,0,False,None,'client',True)), True)
check('notify-selected-change scenario 3', solve('notify-selected-change', (2,2,[],[],0,1,False)), False)
check('notify-selected-change scenario 4', solve('notify-selected-change', (1,3,None,'old','server',None,True)), True)
check('notify-selected-change scenario 5', solve('notify-selected-change', (0,0,'a','b','','client',False)), True)
check('notify-selected-change scenario 6', solve('notify-selected-change', (4,4,{'x':2},{'x':1},False,True,True)), True)
check('snapshot-null-initialization scenario 1', solve('snapshot-null-initialization', (N,N+1,{'x':1},{'x':1},'ssr','client',True)), False)
check('snapshot-null-initialization scenario 2', solve('snapshot-null-initialization', (1,1,0,False,None,'client',True)), False)
check('snapshot-null-initialization scenario 3', solve('snapshot-null-initialization', (2,2,[],[],0,1,False)), False)
check('snapshot-null-initialization scenario 4', solve('snapshot-null-initialization', (1,3,None,'old','server',None,True)), True)
check('snapshot-null-initialization scenario 5', solve('snapshot-null-initialization', (0,0,'a','b','','client',False)), False)
check('snapshot-null-initialization scenario 6', solve('snapshot-null-initialization', (4,4,{'x':2},{'x':1},False,True,True)), 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| commit-tearing-recheck scenario 1 | True | True | Passed |
| commit-tearing-recheck scenario 2 | False | False | Passed |
| commit-tearing-recheck scenario 3 | False | False | Passed |
| commit-tearing-recheck scenario 4 | True | True | Passed |
| commit-tearing-recheck scenario 5 | False | False | Passed |
| commit-tearing-recheck scenario 6 | False | False | Passed |
| selector-type-equality scenario 1 | True | True | Passed |
| selector-type-equality scenario 2 | False | False | Passed |
| selector-type-equality scenario 3 | True | True | Passed |
| selector-type-equality scenario 4 | False | False | Passed |
| selector-type-equality scenario 5 | False | False | Passed |
| selector-type-equality scenario 6 | False | False | Passed |
| server-snapshot-selection scenario 1 | ssr | ssr | Passed |
| server-snapshot-selection scenario 2 | None | None | Passed |
| server-snapshot-selection scenario 3 | 0 | 0 | Passed |
| server-snapshot-selection scenario 4 | server | server | Passed |
| server-snapshot-selection scenario 5 | | | Passed |
| server-snapshot-selection scenario 6 | False | False | Passed |
| browser-snapshot-selection scenario 1 | client | client | Passed |
| browser-snapshot-selection scenario 2 | client | client | Passed |
| browser-snapshot-selection scenario 3 | 1 | 1 | Passed |
| browser-snapshot-selection scenario 4 | None | None | Passed |
| browser-snapshot-selection scenario 5 | client | client | Passed |
| browser-snapshot-selection scenario 6 | True | True | Passed |
| snapshot-version-pair scenario 1 | [2, {'x': 1}] | [2, {'x': 1}] | Passed |
| snapshot-version-pair scenario 2 | [1, 0] | [1, 0] | Passed |
| snapshot-version-pair scenario 3 | [2, []] | [2, []] | Passed |
| snapshot-version-pair scenario 4 | [3, None] | [3, None] | Passed |
| snapshot-version-pair scenario 5 | [0, 'a'] | [0, 'a'] | Passed |
| snapshot-version-pair scenario 6 | [4, {'x': 2}] | [4, {'x': 2}] | Passed |
| subscription-install-read scenario 1 | read-then-subscribe | subscribe-then-read | Failed |
| subscription-install-read scenario 2 | read-then-subscribe | subscribe-then-read | Failed |
| subscription-install-read scenario 3 | read-then-subscribe | read-only | Failed |
| subscription-install-read scenario 4 | read-then-subscribe | subscribe-then-read | Failed |
| subscription-install-read scenario 5 | read-then-subscribe | read-only | Failed |
| subscription-install-read scenario 6 | read-then-subscribe | subscribe-then-read | Failed |
| stale-render-retry scenario 1 | retry | retry | Passed |
| stale-render-retry scenario 2 | commit | commit | Passed |
| stale-render-retry scenario 3 | commit | commit | Passed |
| stale-render-retry scenario 4 | retry | retry | Passed |
| stale-render-retry scenario 5 | commit | commit | Passed |
| stale-render-retry scenario 6 | commit | commit | Passed |
| selector-empty-value-retention scenario 1 | {'x': 1} | {'x': 1} | Passed |
| selector-empty-value-retention scenario 2 | 0 | 0 | Passed |
| selector-empty-value-retention scenario 3 | [] | [] | Passed |
| selector-empty-value-retention scenario 4 | old | old | Passed |
| selector-empty-value-retention scenario 5 | a | a | Passed |
| selector-empty-value-retention scenario 6 | {'x': 2} | {'x': 2} | Passed |
| notify-selected-change scenario 1 | False | False | Passed |
| notify-selected-change scenario 2 | True | True | Passed |
| notify-selected-change scenario 3 | False | False | Passed |
| notify-selected-change scenario 4 | True | True | Passed |
| notify-selected-change scenario 5 | True | True | Passed |
| notify-selected-change scenario 6 | True | True | Passed |
| snapshot-null-initialization scenario 1 | False | False | Passed |
| snapshot-null-initialization scenario 2 | False | False | Passed |
| snapshot-null-initialization scenario 3 | False | False | Passed |
| snapshot-null-initialization scenario 4 | True | True | Passed |
| snapshot-null-initialization scenario 5 | False | False | Passed |
| snapshot-null-initialization scenario 6 | False | False | Passed |
SHA-256 / 8014bfddce220b1d2e5f6927855bff6e60db4f0a4e5a9e0b3314b61e28a0fc14
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(operation, s):
render_version, commit_version, selected, previous, server, browser, subscribing = s
if operation == 'commit-tearing-recheck':
return render_version!=commit_version
if operation == 'selector-type-equality':
return type(selected)==type(previous) and selected==previous
if operation == 'server-snapshot-selection':
return server
if operation == 'browser-snapshot-selection':
return browser
if operation == 'snapshot-version-pair':
return (commit_version,selected)
if operation == 'subscription-install-read':
return 'subscribe-then-read'
if operation == 'stale-render-retry':
return 'retry' if render_version!=commit_version else 'commit'
if operation == 'selector-empty-value-retention':
return selected if selected is not None else previous
if operation == 'notify-selected-change':
return type(selected)!=type(previous) or selected!=previous
if operation == 'snapshot-null-initialization':
return selected is None
raise ValueError('unknown modeled operation')
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('commit-tearing-recheck scenario 1', solve('commit-tearing-recheck', (N,N+1,{'x':1},{'x':1},'ssr','client',True)), True)
check('commit-tearing-recheck scenario 2', solve('commit-tearing-recheck', (1,1,0,False,None,'client',True)), False)
check('commit-tearing-recheck scenario 3', solve('commit-tearing-recheck', (2,2,[],[],0,1,False)), False)
check('commit-tearing-recheck scenario 4', solve('commit-tearing-recheck', (1,3,None,'old','server',None,True)), True)
check('commit-tearing-recheck scenario 5', solve('commit-tearing-recheck', (0,0,'a','b','','client',False)), False)
check('commit-tearing-recheck scenario 6', solve('commit-tearing-recheck', (4,4,{'x':2},{'x':1},False,True,True)), False)
check('selector-type-equality scenario 1', solve('selector-type-equality', (N,N+1,{'x':1},{'x':1},'ssr','client',True)), True)
check('selector-type-equality scenario 2', solve('selector-type-equality', (1,1,0,False,None,'client',True)), False)
check('selector-type-equality scenario 3', solve('selector-type-equality', (2,2,[],[],0,1,False)), True)
check('selector-type-equality scenario 4', solve('selector-type-equality', (1,3,None,'old','server',None,True)), False)
check('selector-type-equality scenario 5', solve('selector-type-equality', (0,0,'a','b','','client',False)), False)
check('selector-type-equality scenario 6', solve('selector-type-equality', (4,4,{'x':2},{'x':1},False,True,True)), False)
check('server-snapshot-selection scenario 1', solve('server-snapshot-selection', (N,N+1,{'x':1},{'x':1},'ssr','client',True)), 'ssr')
check('server-snapshot-selection scenario 2', solve('server-snapshot-selection', (1,1,0,False,None,'client',True)), None)
check('server-snapshot-selection scenario 3', solve('server-snapshot-selection', (2,2,[],[],0,1,False)), 0)
check('server-snapshot-selection scenario 4', solve('server-snapshot-selection', (1,3,None,'old','server',None,True)), 'server')
check('server-snapshot-selection scenario 5', solve('server-snapshot-selection', (0,0,'a','b','','client',False)), '')
check('server-snapshot-selection scenario 6', solve('server-snapshot-selection', (4,4,{'x':2},{'x':1},False,True,True)), False)
check('browser-snapshot-selection scenario 1', solve('browser-snapshot-selection', (N,N+1,{'x':1},{'x':1},'ssr','client',True)), 'client')
check('browser-snapshot-selection scenario 2', solve('browser-snapshot-selection', (1,1,0,False,None,'client',True)), 'client')
check('browser-snapshot-selection scenario 3', solve('browser-snapshot-selection', (2,2,[],[],0,1,False)), 1)
check('browser-snapshot-selection scenario 4', solve('browser-snapshot-selection', (1,3,None,'old','server',None,True)), None)
check('browser-snapshot-selection scenario 5', solve('browser-snapshot-selection', (0,0,'a','b','','client',False)), 'client')
check('browser-snapshot-selection scenario 6', solve('browser-snapshot-selection', (4,4,{'x':2},{'x':1},False,True,True)), True)
check('snapshot-version-pair scenario 1', solve('snapshot-version-pair', (N,N+1,{'x':1},{'x':1},'ssr','client',True)), (N+1,{'x':1}))
check('snapshot-version-pair scenario 2', solve('snapshot-version-pair', (1,1,0,False,None,'client',True)), (1,0))
check('snapshot-version-pair scenario 3', solve('snapshot-version-pair', (2,2,[],[],0,1,False)), (2,[]))
check('snapshot-version-pair scenario 4', solve('snapshot-version-pair', (1,3,None,'old','server',None,True)), (3,None))
check('snapshot-version-pair scenario 5', solve('snapshot-version-pair', (0,0,'a','b','','client',False)), (0,'a'))
check('snapshot-version-pair scenario 6', solve('snapshot-version-pair', (4,4,{'x':2},{'x':1},False,True,True)), (4,{'x':2}))
check('subscription-install-read scenario 1', solve('subscription-install-read', (N,N+1,{'x':1},{'x':1},'ssr','client',True)), 'subscribe-then-read')
check('subscription-install-read scenario 2', solve('subscription-install-read', (1,1,0,False,None,'client',True)), 'subscribe-then-read')
check('subscription-install-read scenario 3', solve('subscription-install-read', (2,2,[],[],0,1,False)), 'read-only')
check('subscription-install-read scenario 4', solve('subscription-install-read', (1,3,None,'old','server',None,True)), 'subscribe-then-read')
check('subscription-install-read scenario 5', solve('subscription-install-read', (0,0,'a','b','','client',False)), 'read-only')
check('subscription-install-read scenario 6', solve('subscription-install-read', (4,4,{'x':2},{'x':1},False,True,True)), 'subscribe-then-read')
check('stale-render-retry scenario 1', solve('stale-render-retry', (N,N+1,{'x':1},{'x':1},'ssr','client',True)), 'retry')
check('stale-render-retry scenario 2', solve('stale-render-retry', (1,1,0,False,None,'client',True)), 'commit')
check('stale-render-retry scenario 3', solve('stale-render-retry', (2,2,[],[],0,1,False)), 'commit')
check('stale-render-retry scenario 4', solve('stale-render-retry', (1,3,None,'old','server',None,True)), 'retry')
check('stale-render-retry scenario 5', solve('stale-render-retry', (0,0,'a','b','','client',False)), 'commit')
check('stale-render-retry scenario 6', solve('stale-render-retry', (4,4,{'x':2},{'x':1},False,True,True)), 'commit')
check('selector-empty-value-retention scenario 1', solve('selector-empty-value-retention', (N,N+1,{'x':1},{'x':1},'ssr','client',True)), {'x':1})
check('selector-empty-value-retention scenario 2', solve('selector-empty-value-retention', (1,1,0,False,None,'client',True)), 0)
check('selector-empty-value-retention scenario 3', solve('selector-empty-value-retention', (2,2,[],[],0,1,False)), [])
check('selector-empty-value-retention scenario 4', solve('selector-empty-value-retention', (1,3,None,'old','server',None,True)), 'old')
check('selector-empty-value-retention scenario 5', solve('selector-empty-value-retention', (0,0,'a','b','','client',False)), 'a')
check('selector-empty-value-retention scenario 6', solve('selector-empty-value-retention', (4,4,{'x':2},{'x':1},False,True,True)), {'x':2})
check('notify-selected-change scenario 1', solve('notify-selected-change', (N,N+1,{'x':1},{'x':1},'ssr','client',True)), False)
check('notify-selected-change scenario 2', solve('notify-selected-change', (1,1,0,False,None,'client',True)), True)
check('notify-selected-change scenario 3', solve('notify-selected-change', (2,2,[],[],0,1,False)), False)
check('notify-selected-change scenario 4', solve('notify-selected-change', (1,3,None,'old','server',None,True)), True)
check('notify-selected-change scenario 5', solve('notify-selected-change', (0,0,'a','b','','client',False)), True)
check('notify-selected-change scenario 6', solve('notify-selected-change', (4,4,{'x':2},{'x':1},False,True,True)), True)
check('snapshot-null-initialization scenario 1', solve('snapshot-null-initialization', (N,N+1,{'x':1},{'x':1},'ssr','client',True)), False)
check('snapshot-null-initialization scenario 2', solve('snapshot-null-initialization', (1,1,0,False,None,'client',True)), False)
check('snapshot-null-initialization scenario 3', solve('snapshot-null-initialization', (2,2,[],[],0,1,False)), False)
check('snapshot-null-initialization scenario 4', solve('snapshot-null-initialization', (1,3,None,'old','server',None,True)), True)
check('snapshot-null-initialization scenario 5', solve('snapshot-null-initialization', (0,0,'a','b','','client',False)), False)
check('snapshot-null-initialization scenario 6', solve('snapshot-null-initialization', (4,4,{'x':2},{'x':1},False,True,True)), 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| commit-tearing-recheck scenario 1 | True | True | Passed |
| commit-tearing-recheck scenario 2 | False | False | Passed |
| commit-tearing-recheck scenario 3 | False | False | Passed |
| commit-tearing-recheck scenario 4 | True | True | Passed |
| commit-tearing-recheck scenario 5 | False | False | Passed |
| commit-tearing-recheck scenario 6 | False | False | Passed |
| selector-type-equality scenario 1 | True | True | Passed |
| selector-type-equality scenario 2 | False | False | Passed |
| selector-type-equality scenario 3 | True | True | Passed |
| selector-type-equality scenario 4 | False | False | Passed |
| selector-type-equality scenario 5 | False | False | Passed |
| selector-type-equality scenario 6 | False | False | Passed |
| server-snapshot-selection scenario 1 | ssr | ssr | Passed |
| server-snapshot-selection scenario 2 | None | None | Passed |
| server-snapshot-selection scenario 3 | 0 | 0 | Passed |
| server-snapshot-selection scenario 4 | server | server | Passed |
| server-snapshot-selection scenario 5 | | | Passed |
| server-snapshot-selection scenario 6 | False | False | Passed |
| browser-snapshot-selection scenario 1 | client | client | Passed |
| browser-snapshot-selection scenario 2 | client | client | Passed |
| browser-snapshot-selection scenario 3 | 1 | 1 | Passed |
| browser-snapshot-selection scenario 4 | None | None | Passed |
| browser-snapshot-selection scenario 5 | client | client | Passed |
| browser-snapshot-selection scenario 6 | True | True | Passed |
| snapshot-version-pair scenario 1 | [2, {'x': 1}] | [2, {'x': 1}] | Passed |
| snapshot-version-pair scenario 2 | [1, 0] | [1, 0] | Passed |
| snapshot-version-pair scenario 3 | [2, []] | [2, []] | Passed |
| snapshot-version-pair scenario 4 | [3, None] | [3, None] | Passed |
| snapshot-version-pair scenario 5 | [0, 'a'] | [0, 'a'] | Passed |
| snapshot-version-pair scenario 6 | [4, {'x': 2}] | [4, {'x': 2}] | Passed |
| subscription-install-read scenario 1 | subscribe-then-read | subscribe-then-read | Passed |
| subscription-install-read scenario 2 | subscribe-then-read | subscribe-then-read | Passed |
| subscription-install-read scenario 3 | subscribe-then-read | read-only | Failed |
| subscription-install-read scenario 4 | subscribe-then-read | subscribe-then-read | Passed |
| subscription-install-read scenario 5 | subscribe-then-read | read-only | Failed |
| subscription-install-read scenario 6 | subscribe-then-read | subscribe-then-read | Passed |
| stale-render-retry scenario 1 | retry | retry | Passed |
| stale-render-retry scenario 2 | commit | commit | Passed |
| stale-render-retry scenario 3 | commit | commit | Passed |
| stale-render-retry scenario 4 | retry | retry | Passed |
| stale-render-retry scenario 5 | commit | commit | Passed |
| stale-render-retry scenario 6 | commit | commit | Passed |
| selector-empty-value-retention scenario 1 | {'x': 1} | {'x': 1} | Passed |
| selector-empty-value-retention scenario 2 | 0 | 0 | Passed |
| selector-empty-value-retention scenario 3 | [] | [] | Passed |
| selector-empty-value-retention scenario 4 | old | old | Passed |
| selector-empty-value-retention scenario 5 | a | a | Passed |
| selector-empty-value-retention scenario 6 | {'x': 2} | {'x': 2} | Passed |
| notify-selected-change scenario 1 | False | False | Passed |
| notify-selected-change scenario 2 | True | True | Passed |
| notify-selected-change scenario 3 | False | False | Passed |
| notify-selected-change scenario 4 | True | True | Passed |
| notify-selected-change scenario 5 | True | True | Passed |
| notify-selected-change scenario 6 | True | True | Passed |
| snapshot-null-initialization scenario 1 | False | False | Passed |
| snapshot-null-initialization scenario 2 | False | False | Passed |
| snapshot-null-initialization scenario 3 | False | False | Passed |
| snapshot-null-initialization scenario 4 | True | True | Passed |
| snapshot-null-initialization scenario 5 | False | False | Passed |
| snapshot-null-initialization scenario 6 | False | False | Passed |
SHA-256 / f2c16a3abcd3e9c7f006e5b71b8c27f1c8986f22011af7fa9a7af85c6ca7af00
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(operation, s):
render_version, commit_version, selected, previous, server, browser, subscribing = s
if operation == 'commit-tearing-recheck':
return render_version!=commit_version
if operation == 'selector-type-equality':
return type(selected)==type(previous) and selected==previous
if operation == 'server-snapshot-selection':
return server
if operation == 'browser-snapshot-selection':
return browser
if operation == 'snapshot-version-pair':
return (commit_version,selected)
if operation == 'subscription-install-read':
return 'subscribe-then-read' if subscribing else 'read-only'
if operation == 'stale-render-retry':
return 'retry' if render_version!=commit_version else 'commit'
if operation == 'selector-empty-value-retention':
return selected if selected is not None else previous
if operation == 'notify-selected-change':
return type(selected)!=type(previous) or selected!=previous
if operation == 'snapshot-null-initialization':
return selected is None
raise ValueError('unknown modeled operation')
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('commit-tearing-recheck scenario 1', solve('commit-tearing-recheck', (N,N+1,{'x':1},{'x':1},'ssr','client',True)), True)
check('commit-tearing-recheck scenario 2', solve('commit-tearing-recheck', (1,1,0,False,None,'client',True)), False)
check('commit-tearing-recheck scenario 3', solve('commit-tearing-recheck', (2,2,[],[],0,1,False)), False)
check('commit-tearing-recheck scenario 4', solve('commit-tearing-recheck', (1,3,None,'old','server',None,True)), True)
check('commit-tearing-recheck scenario 5', solve('commit-tearing-recheck', (0,0,'a','b','','client',False)), False)
check('commit-tearing-recheck scenario 6', solve('commit-tearing-recheck', (4,4,{'x':2},{'x':1},False,True,True)), False)
check('selector-type-equality scenario 1', solve('selector-type-equality', (N,N+1,{'x':1},{'x':1},'ssr','client',True)), True)
check('selector-type-equality scenario 2', solve('selector-type-equality', (1,1,0,False,None,'client',True)), False)
check('selector-type-equality scenario 3', solve('selector-type-equality', (2,2,[],[],0,1,False)), True)
check('selector-type-equality scenario 4', solve('selector-type-equality', (1,3,None,'old','server',None,True)), False)
check('selector-type-equality scenario 5', solve('selector-type-equality', (0,0,'a','b','','client',False)), False)
check('selector-type-equality scenario 6', solve('selector-type-equality', (4,4,{'x':2},{'x':1},False,True,True)), False)
check('server-snapshot-selection scenario 1', solve('server-snapshot-selection', (N,N+1,{'x':1},{'x':1},'ssr','client',True)), 'ssr')
check('server-snapshot-selection scenario 2', solve('server-snapshot-selection', (1,1,0,False,None,'client',True)), None)
check('server-snapshot-selection scenario 3', solve('server-snapshot-selection', (2,2,[],[],0,1,False)), 0)
check('server-snapshot-selection scenario 4', solve('server-snapshot-selection', (1,3,None,'old','server',None,True)), 'server')
check('server-snapshot-selection scenario 5', solve('server-snapshot-selection', (0,0,'a','b','','client',False)), '')
check('server-snapshot-selection scenario 6', solve('server-snapshot-selection', (4,4,{'x':2},{'x':1},False,True,True)), False)
check('browser-snapshot-selection scenario 1', solve('browser-snapshot-selection', (N,N+1,{'x':1},{'x':1},'ssr','client',True)), 'client')
check('browser-snapshot-selection scenario 2', solve('browser-snapshot-selection', (1,1,0,False,None,'client',True)), 'client')
check('browser-snapshot-selection scenario 3', solve('browser-snapshot-selection', (2,2,[],[],0,1,False)), 1)
check('browser-snapshot-selection scenario 4', solve('browser-snapshot-selection', (1,3,None,'old','server',None,True)), None)
check('browser-snapshot-selection scenario 5', solve('browser-snapshot-selection', (0,0,'a','b','','client',False)), 'client')
check('browser-snapshot-selection scenario 6', solve('browser-snapshot-selection', (4,4,{'x':2},{'x':1},False,True,True)), True)
check('snapshot-version-pair scenario 1', solve('snapshot-version-pair', (N,N+1,{'x':1},{'x':1},'ssr','client',True)), (N+1,{'x':1}))
check('snapshot-version-pair scenario 2', solve('snapshot-version-pair', (1,1,0,False,None,'client',True)), (1,0))
check('snapshot-version-pair scenario 3', solve('snapshot-version-pair', (2,2,[],[],0,1,False)), (2,[]))
check('snapshot-version-pair scenario 4', solve('snapshot-version-pair', (1,3,None,'old','server',None,True)), (3,None))
check('snapshot-version-pair scenario 5', solve('snapshot-version-pair', (0,0,'a','b','','client',False)), (0,'a'))
check('snapshot-version-pair scenario 6', solve('snapshot-version-pair', (4,4,{'x':2},{'x':1},False,True,True)), (4,{'x':2}))
check('subscription-install-read scenario 1', solve('subscription-install-read', (N,N+1,{'x':1},{'x':1},'ssr','client',True)), 'subscribe-then-read')
check('subscription-install-read scenario 2', solve('subscription-install-read', (1,1,0,False,None,'client',True)), 'subscribe-then-read')
check('subscription-install-read scenario 3', solve('subscription-install-read', (2,2,[],[],0,1,False)), 'read-only')
check('subscription-install-read scenario 4', solve('subscription-install-read', (1,3,None,'old','server',None,True)), 'subscribe-then-read')
check('subscription-install-read scenario 5', solve('subscription-install-read', (0,0,'a','b','','client',False)), 'read-only')
check('subscription-install-read scenario 6', solve('subscription-install-read', (4,4,{'x':2},{'x':1},False,True,True)), 'subscribe-then-read')
check('stale-render-retry scenario 1', solve('stale-render-retry', (N,N+1,{'x':1},{'x':1},'ssr','client',True)), 'retry')
check('stale-render-retry scenario 2', solve('stale-render-retry', (1,1,0,False,None,'client',True)), 'commit')
check('stale-render-retry scenario 3', solve('stale-render-retry', (2,2,[],[],0,1,False)), 'commit')
check('stale-render-retry scenario 4', solve('stale-render-retry', (1,3,None,'old','server',None,True)), 'retry')
check('stale-render-retry scenario 5', solve('stale-render-retry', (0,0,'a','b','','client',False)), 'commit')
check('stale-render-retry scenario 6', solve('stale-render-retry', (4,4,{'x':2},{'x':1},False,True,True)), 'commit')
check('selector-empty-value-retention scenario 1', solve('selector-empty-value-retention', (N,N+1,{'x':1},{'x':1},'ssr','client',True)), {'x':1})
check('selector-empty-value-retention scenario 2', solve('selector-empty-value-retention', (1,1,0,False,None,'client',True)), 0)
check('selector-empty-value-retention scenario 3', solve('selector-empty-value-retention', (2,2,[],[],0,1,False)), [])
check('selector-empty-value-retention scenario 4', solve('selector-empty-value-retention', (1,3,None,'old','server',None,True)), 'old')
check('selector-empty-value-retention scenario 5', solve('selector-empty-value-retention', (0,0,'a','b','','client',False)), 'a')
check('selector-empty-value-retention scenario 6', solve('selector-empty-value-retention', (4,4,{'x':2},{'x':1},False,True,True)), {'x':2})
check('notify-selected-change scenario 1', solve('notify-selected-change', (N,N+1,{'x':1},{'x':1},'ssr','client',True)), False)
check('notify-selected-change scenario 2', solve('notify-selected-change', (1,1,0,False,None,'client',True)), True)
check('notify-selected-change scenario 3', solve('notify-selected-change', (2,2,[],[],0,1,False)), False)
check('notify-selected-change scenario 4', solve('notify-selected-change', (1,3,None,'old','server',None,True)), True)
check('notify-selected-change scenario 5', solve('notify-selected-change', (0,0,'a','b','','client',False)), True)
check('notify-selected-change scenario 6', solve('notify-selected-change', (4,4,{'x':2},{'x':1},False,True,True)), True)
check('snapshot-null-initialization scenario 1', solve('snapshot-null-initialization', (N,N+1,{'x':1},{'x':1},'ssr','client',True)), False)
check('snapshot-null-initialization scenario 2', solve('snapshot-null-initialization', (1,1,0,False,None,'client',True)), False)
check('snapshot-null-initialization scenario 3', solve('snapshot-null-initialization', (2,2,[],[],0,1,False)), False)
check('snapshot-null-initialization scenario 4', solve('snapshot-null-initialization', (1,3,None,'old','server',None,True)), True)
check('snapshot-null-initialization scenario 5', solve('snapshot-null-initialization', (0,0,'a','b','','client',False)), False)
check('snapshot-null-initialization scenario 6', solve('snapshot-null-initialization', (4,4,{'x':2},{'x':1},False,True,True)), 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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| commit-tearing-recheck scenario 1 | True | True | Passed |
| commit-tearing-recheck scenario 2 | False | False | Passed |
| commit-tearing-recheck scenario 3 | False | False | Passed |
| commit-tearing-recheck scenario 4 | True | True | Passed |
| commit-tearing-recheck scenario 5 | False | False | Passed |
| commit-tearing-recheck scenario 6 | False | False | Passed |
| selector-type-equality scenario 1 | True | True | Passed |
| selector-type-equality scenario 2 | False | False | Passed |
| selector-type-equality scenario 3 | True | True | Passed |
| selector-type-equality scenario 4 | False | False | Passed |
| selector-type-equality scenario 5 | False | False | Passed |
| selector-type-equality scenario 6 | False | False | Passed |
| server-snapshot-selection scenario 1 | ssr | ssr | Passed |
| server-snapshot-selection scenario 2 | None | None | Passed |
| server-snapshot-selection scenario 3 | 0 | 0 | Passed |
| server-snapshot-selection scenario 4 | server | server | Passed |
| server-snapshot-selection scenario 5 | | | Passed |
| server-snapshot-selection scenario 6 | False | False | Passed |
| browser-snapshot-selection scenario 1 | client | client | Passed |
| browser-snapshot-selection scenario 2 | client | client | Passed |
| browser-snapshot-selection scenario 3 | 1 | 1 | Passed |
| browser-snapshot-selection scenario 4 | None | None | Passed |
| browser-snapshot-selection scenario 5 | client | client | Passed |
| browser-snapshot-selection scenario 6 | True | True | Passed |
| snapshot-version-pair scenario 1 | [2, {'x': 1}] | [2, {'x': 1}] | Passed |
| snapshot-version-pair scenario 2 | [1, 0] | [1, 0] | Passed |
| snapshot-version-pair scenario 3 | [2, []] | [2, []] | Passed |
| snapshot-version-pair scenario 4 | [3, None] | [3, None] | Passed |
| snapshot-version-pair scenario 5 | [0, 'a'] | [0, 'a'] | Passed |
| snapshot-version-pair scenario 6 | [4, {'x': 2}] | [4, {'x': 2}] | Passed |
| subscription-install-read scenario 1 | subscribe-then-read | subscribe-then-read | Passed |
| subscription-install-read scenario 2 | subscribe-then-read | subscribe-then-read | Passed |
| subscription-install-read scenario 3 | read-only | read-only | Passed |
| subscription-install-read scenario 4 | subscribe-then-read | subscribe-then-read | Passed |
| subscription-install-read scenario 5 | read-only | read-only | Passed |
| subscription-install-read scenario 6 | subscribe-then-read | subscribe-then-read | Passed |
| stale-render-retry scenario 1 | retry | retry | Passed |
| stale-render-retry scenario 2 | commit | commit | Passed |
| stale-render-retry scenario 3 | commit | commit | Passed |
| stale-render-retry scenario 4 | retry | retry | Passed |
| stale-render-retry scenario 5 | commit | commit | Passed |
| stale-render-retry scenario 6 | commit | commit | Passed |
| selector-empty-value-retention scenario 1 | {'x': 1} | {'x': 1} | Passed |
| selector-empty-value-retention scenario 2 | 0 | 0 | Passed |
| selector-empty-value-retention scenario 3 | [] | [] | Passed |
| selector-empty-value-retention scenario 4 | old | old | Passed |
| selector-empty-value-retention scenario 5 | a | a | Passed |
| selector-empty-value-retention scenario 6 | {'x': 2} | {'x': 2} | Passed |
| notify-selected-change scenario 1 | False | False | Passed |
| notify-selected-change scenario 2 | True | True | Passed |
| notify-selected-change scenario 3 | False | False | Passed |
| notify-selected-change scenario 4 | True | True | Passed |
| notify-selected-change scenario 5 | True | True | Passed |
| notify-selected-change scenario 6 | True | True | Passed |
| snapshot-null-initialization scenario 1 | False | False | Passed |
| snapshot-null-initialization scenario 2 | False | False | Passed |
| snapshot-null-initialization scenario 3 | False | False | Passed |
| snapshot-null-initialization scenario 4 | True | True | Passed |
| snapshot-null-initialization scenario 5 | False | False | Passed |
| snapshot-null-initialization scenario 6 | False | False | Passed |
SHA-256 / 28200e4faa940dd113203cc1eadec63626de5696dfa0e18b0cbca35286b29643
Verification & scope
Only the explicitly specified operations and finite deterministic records are modeled; 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:40:52.781037+00:00.
Case digest / d68f345730fbde35eb96493833eb03f1c9c9dc745d1675601786f5382166162a