FA-41901 / Listener lifecycle / Open access
Replay cursor gap detection compares against the newest record · case 01
Replay cursor gap detection compares against the newest record; the returned lifecycle plan violates the stated transition contract.
ROOT CAUSE
The gap decision in the replay-subscribe listener model is computed as bool(s['history']) and s['cursor']<s['history'][-1][0]-1, losing a required lifecycle condition.
THE FAILURE
The gap decision in the replay-subscribe listener model is computed as bool(s['history']) and s['cursor']<s['history'][-1][0]-1, losing a required lifecycle condition.
Unsuccessful approach: The partial repair uses bool(s['history']) and s['cursor']<s['history'][0][0]; a retained regression distinguishes it from the full transition.
Case contract
Plan a subscription to a bounded replay observer. History entries are [sequence,value]; deliver entries strictly after cursor, in stored order, capped by demand. Subscriber replay is suppressed after cancellation. A terminal marker follows replay only when requested. A gap exists if the cursor precedes the oldest retained predecessor. Live events stay deferred until replay completes. Inputs are finite state snapshots, including transitional and stale states; output fields are the exact independent actions/metadata defined by the corrected expression table. Numeric fixture capacities and counts vary with N. Field definitions, each independently computed from the input snapshot: eligible = [r for r in s['history'] if r[0]>s['cursor']]; values = [r[1] for r in s['history'] if r[0]>s['cursor']][:s['demand']] if not s['cancel'] else []; gap = bool(s['history']) and s['cursor']<s['history'][0][0]-1; terminal = s['terminal'] if s['want_terminal'] and not s['cancel'] and not s['replaying'] else None; live = list(s['live']) if not s['replaying'] and not s['cancel'] else []; deferred = list(s['live']) if s['replaying'] and not s['cancel'] else []; cursor = max([s['cursor']]+[r[0] for r in s['history'] if r[0]>s['cursor']][:s['demand']]); remaining = max(0,s['demand']-len([r for r in s['history'] if r[0]>s['cursor']])); attach_live = not s['subscribed'] and s['terminal'] is None and not s['cancel']; history_order = [r[0] for r in s['history']]
Why this case matters
Observer implementations need to preserve this state while subscriptions enter, execute, and leave their lifecycle.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(s):
return {
'eligible': [r for r in s['history'] if r[0]>s['cursor']],
'values': [r[1] for r in s['history'] if r[0]>s['cursor']][:s['demand']] if not s['cancel'] else [],
'gap': bool(s['history']) and s['cursor']<s['history'][-1][0]-1,
'terminal': s['terminal'] if s['want_terminal'] and not s['cancel'] and not s['replaying'] else None,
'live': list(s['live']) if not s['replaying'] and not s['cancel'] else [],
'deferred': list(s['live']) if s['replaying'] and not s['cancel'] else [],
'cursor': max([s['cursor']]+[r[0] for r in s['history'] if r[0]>s['cursor']][:s['demand']]),
'remaining': max(0,s['demand']-len([r for r in s['history'] if r[0]>s['cursor']])),
'attach_live': not s['subscribed'] and s['terminal'] is None and not s['cancel'],
'history_order': [r[0] for r in s['history']],
}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'history': [[1, 'a'], [3, 'b'], [4, 'c']], 'cursor': 0, 'demand': 1, 'cancel': False, 'terminal': 'complete', 'want_terminal': True, 'replaying': True, 'live': ['live'], 'last': 4, 'subscribed': False}, {'eligible': [[1, 'a'], [3, 'b'], [4, 'c']], 'values': ['a'], 'gap': False, 'terminal': None, 'live': [], 'deferred': ['live'], 'cursor': 1, 'remaining': 0, 'attach_live': False, 'history_order': [1, 3, 4]}), ({'history': [[1, 'a'], [3, 'b'], [4, 'c']], 'cursor': 1, 'demand': 4, 'cancel': True, 'terminal': 'complete', 'want_terminal': False, 'replaying': True, 'live': ['live'], 'last': 4, 'subscribed': False}, {'eligible': [[3, 'b'], [4, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 4, 'remaining': 2, 'attach_live': False, 'history_order': [1, 3, 4]}), ({'history': [[1, 'a'], [3, 'b'], [4, 'c']], 'cursor': 0, 'demand': 0, 'cancel': True, 'terminal': None, 'want_terminal': False, 'replaying': True, 'live': ['live'], 'last': 4, 'subscribed': True}, {'eligible': [[1, 'a'], [3, 'b'], [4, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 0, 'remaining': 0, 'attach_live': False, 'history_order': [1, 3, 4]}), ({'history': [], 'cursor': 0, 'demand': 1, 'cancel': True, 'terminal': 'complete', 'want_terminal': False, 'replaying': False, 'live': [], 'last': 4, 'subscribed': False}, {'eligible': [], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 0, 'remaining': 1, 'attach_live': False, 'history_order': []}), ({'history': [], 'cursor': 3, 'demand': 1, 'cancel': False, 'terminal': None, 'want_terminal': True, 'replaying': True, 'live': [], 'last': 0, 'subscribed': False}, {'eligible': [], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 3, 'remaining': 1, 'attach_live': True, 'history_order': []}), ({'history': [[1, 'a']], 'cursor': 3, 'demand': 0, 'cancel': True, 'terminal': 'complete', 'want_terminal': True, 'replaying': True, 'live': ['live'], 'last': 0, 'subscribed': True}, {'eligible': [], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 3, 'remaining': 0, 'attach_live': False, 'history_order': [1]}), ({'history': [], 'cursor': 0, 'demand': 0, 'cancel': False, 'terminal': None, 'want_terminal': False, 'replaying': False, 'live': [], 'last': 0, 'subscribed': False}, {'eligible': [], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 0, 'remaining': 0, 'attach_live': True, 'history_order': []}), ({'history': [[1, 'a'], [3, 'b'], [4, 'c']], 'cursor': 3, 'demand': 4, 'cancel': True, 'terminal': 'complete', 'want_terminal': True, 'replaying': True, 'live': ['live'], 'last': 4, 'subscribed': True}, {'eligible': [[4, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 4, 'remaining': 3, 'attach_live': False, 'history_order': [1, 3, 4]})], 2: [({'history': [[1, 'a'], [6, 'b'], [8, 'c']], 'cursor': 0, 'demand': 1, 'cancel': False, 'terminal': 'complete', 'want_terminal': True, 'replaying': True, 'live': ['live'], 'last': 8, 'subscribed': False}, {'eligible': [[1, 'a'], [6, 'b'], [8, 'c']], 'values': ['a'], 'gap': False, 'terminal': None, 'live': [], 'deferred': ['live'], 'cursor': 1, 'remaining': 0, 'attach_live': False, 'history_order': [1, 6, 8]}), ({'history': [[1, 'a'], [6, 'b'], [8, 'c']], 'cursor': 6, 'demand': 8, 'cancel': True, 'terminal': 'complete', 'want_terminal': True, 'replaying': True, 'live': ['live'], 'last': 8, 'subscribed': True}, {'eligible': [[8, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 8, 'remaining': 7, 'attach_live': False, 'history_order': [1, 6, 8]}), ({'history': [[1, 'a']], 'cursor': 1, 'demand': 1, 'cancel': False, 'terminal': None, 'want_terminal': False, 'replaying': True, 'live': [], 'last': 8, 'subscribed': True}, {'eligible': [], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 1, 'remaining': 1, 'attach_live': False, 'history_order': [1]}), ({'history': [[1, 'a'], [6, 'b'], [8, 'c']], 'cursor': 0, 'demand': 0, 'cancel': False, 'terminal': 'complete', 'want_terminal': False, 'replaying': False, 'live': ['live'], 'last': 8, 'subscribed': True}, {'eligible': [[1, 'a'], [6, 'b'], [8, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': ['live'], 'deferred': [], 'cursor': 0, 'remaining': 0, 'attach_live': False, 'history_order': [1, 6, 8]}), ({'history': [], 'cursor': 0, 'demand': 1, 'cancel': False, 'terminal': 'complete', 'want_terminal': False, 'replaying': True, 'live': [], 'last': 0, 'subscribed': True}, {'eligible': [], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 0, 'remaining': 1, 'attach_live': False, 'history_order': []}), ({'history': [], 'cursor': 6, 'demand': 0, 'cancel': True, 'terminal': 'complete', 'want_terminal': False, 'replaying': True, 'live': [], 'last': 0, 'subscribed': True}, {'eligible': [], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 6, 'remaining': 0, 'attach_live': False, 'history_order': []}), ({'history': [], 'cursor': 0, 'demand': 0, 'cancel': False, 'terminal': None, 'want_terminal': False, 'replaying': False, 'live': [], 'last': 0, 'subscribed': False}, {'eligible': [], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 0, 'remaining': 0, 'attach_live': True, 'history_order': []})], 3: [({'history': [[1, 'a'], [9, 'b'], [12, 'c']], 'cursor': 0, 'demand': 0, 'cancel': False, 'terminal': 'complete', 'want_terminal': True, 'replaying': True, 'live': ['live'], 'last': 0, 'subscribed': False}, {'eligible': [[1, 'a'], [9, 'b'], [12, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': ['live'], 'cursor': 0, 'remaining': 0, 'attach_live': False, 'history_order': [1, 9, 12]}), ({'history': [[1, 'a'], [9, 'b'], [12, 'c']], 'cursor': 9, 'demand': 12, 'cancel': True, 'terminal': None, 'want_terminal': True, 'replaying': True, 'live': ['live'], 'last': 12, 'subscribed': False}, {'eligible': [[12, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 12, 'remaining': 11, 'attach_live': False, 'history_order': [1, 9, 12]}), ({'history': [[1, 'a'], [9, 'b'], [12, 'c']], 'cursor': 0, 'demand': 1, 'cancel': True, 'terminal': None, 'want_terminal': True, 'replaying': True, 'live': ['live'], 'last': 0, 'subscribed': True}, {'eligible': [[1, 'a'], [9, 'b'], [12, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 1, 'remaining': 0, 'attach_live': False, 'history_order': [1, 9, 12]}), ({'history': [[1, 'a']], 'cursor': 0, 'demand': 1, 'cancel': True, 'terminal': 'complete', 'want_terminal': False, 'replaying': True, 'live': ['live'], 'last': 0, 'subscribed': True}, {'eligible': [[1, 'a']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 1, 'remaining': 0, 'attach_live': False, 'history_order': [1]}), ({'history': [[1, 'a'], [9, 'b'], [12, 'c']], 'cursor': 0, 'demand': 0, 'cancel': False, 'terminal': 'complete', 'want_terminal': True, 'replaying': False, 'live': ['live'], 'last': 0, 'subscribed': True}, {'eligible': [[1, 'a'], [9, 'b'], [12, 'c']], 'values': [], 'gap': False, 'terminal': 'complete', 'live': ['live'], 'deferred': [], 'cursor': 0, 'remaining': 0, 'attach_live': False, 'history_order': [1, 9, 12]}), ({'history': [[1, 'a'], [9, 'b'], [12, 'c']], 'cursor': 1, 'demand': 1, 'cancel': True, 'terminal': None, 'want_terminal': True, 'replaying': True, 'live': [], 'last': 0, 'subscribed': False}, {'eligible': [[9, 'b'], [12, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 9, 'remaining': 0, 'attach_live': False, 'history_order': [1, 9, 12]}), ({'history': [], 'cursor': 0, 'demand': 0, 'cancel': False, 'terminal': None, 'want_terminal': False, 'replaying': False, 'live': [], 'last': 0, 'subscribed': False}, {'eligible': [], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 0, 'remaining': 0, 'attach_live': True, 'history_order': []}), ({'history': [[1, 'a'], [9, 'b'], [12, 'c']], 'cursor': 9, 'demand': 12, 'cancel': True, 'terminal': 'complete', 'want_terminal': True, 'replaying': True, 'live': ['live'], 'last': 12, 'subscribed': True}, {'eligible': [[12, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 12, 'remaining': 11, 'attach_live': False, 'history_order': [1, 9, 12]})], 4: [({'history': [[1, 'a'], [12, 'b'], [16, 'c']], 'cursor': 0, 'demand': 0, 'cancel': False, 'terminal': 'complete', 'want_terminal': True, 'replaying': True, 'live': ['live'], 'last': 0, 'subscribed': False}, {'eligible': [[1, 'a'], [12, 'b'], [16, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': ['live'], 'cursor': 0, 'remaining': 0, 'attach_live': False, 'history_order': [1, 12, 16]}), ({'history': [[1, 'a'], [12, 'b'], [16, 'c']], 'cursor': 12, 'demand': 16, 'cancel': True, 'terminal': None, 'want_terminal': True, 'replaying': True, 'live': ['live'], 'last': 0, 'subscribed': True}, {'eligible': [[16, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 16, 'remaining': 15, 'attach_live': False, 'history_order': [1, 12, 16]}), ({'history': [[1, 'a'], [12, 'b'], [16, 'c']], 'cursor': 0, 'demand': 1, 'cancel': False, 'terminal': 'complete', 'want_terminal': True, 'replaying': True, 'live': [], 'last': 16, 'subscribed': True}, {'eligible': [[1, 'a'], [12, 'b'], [16, 'c']], 'values': ['a'], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 1, 'remaining': 0, 'attach_live': False, 'history_order': [1, 12, 16]}), ({'history': [[1, 'a'], [12, 'b'], [16, 'c']], 'cursor': 1, 'demand': 16, 'cancel': False, 'terminal': 'complete', 'want_terminal': True, 'replaying': False, 'live': ['live'], 'last': 0, 'subscribed': True}, {'eligible': [[12, 'b'], [16, 'c']], 'values': ['b', 'c'], 'gap': False, 'terminal': 'complete', 'live': ['live'], 'deferred': [], 'cursor': 16, 'remaining': 14, 'attach_live': False, 'history_order': [1, 12, 16]}), ({'history': [], 'cursor': 0, 'demand': 0, 'cancel': False, 'terminal': 'complete', 'want_terminal': False, 'replaying': False, 'live': ['live'], 'last': 0, 'subscribed': False}, {'eligible': [], 'values': [], 'gap': False, 'terminal': None, 'live': ['live'], 'deferred': [], 'cursor': 0, 'remaining': 0, 'attach_live': False, 'history_order': []}), ({'history': [[1, 'a'], [12, 'b'], [16, 'c']], 'cursor': 0, 'demand': 0, 'cancel': True, 'terminal': 'complete', 'want_terminal': False, 'replaying': False, 'live': ['live'], 'last': 0, 'subscribed': False}, {'eligible': [[1, 'a'], [12, 'b'], [16, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 0, 'remaining': 0, 'attach_live': False, 'history_order': [1, 12, 16]}), ({'history': [], 'cursor': 0, 'demand': 0, 'cancel': False, 'terminal': None, 'want_terminal': False, 'replaying': False, 'live': [], 'last': 0, 'subscribed': False}, {'eligible': [], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 0, 'remaining': 0, 'attach_live': True, 'history_order': []}), ({'history': [[1, 'a'], [12, 'b'], [16, 'c']], 'cursor': 12, 'demand': 16, 'cancel': True, 'terminal': 'complete', 'want_terminal': True, 'replaying': True, 'live': ['live'], 'last': 16, 'subscribed': True}, {'eligible': [[16, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 16, 'remaining': 15, 'attach_live': False, 'history_order': [1, 12, 16]})], 5: [({'history': [[1, 'a'], [15, 'b'], [20, 'c']], 'cursor': 1, 'demand': 1, 'cancel': False, 'terminal': 'complete', 'want_terminal': True, 'replaying': True, 'live': ['live'], 'last': 20, 'subscribed': False}, {'eligible': [[15, 'b'], [20, 'c']], 'values': ['b'], 'gap': False, 'terminal': None, 'live': [], 'deferred': ['live'], 'cursor': 15, 'remaining': 0, 'attach_live': False, 'history_order': [1, 15, 20]}), ({'history': [[1, 'a'], [15, 'b'], [20, 'c']], 'cursor': 0, 'demand': 20, 'cancel': True, 'terminal': None, 'want_terminal': False, 'replaying': True, 'live': ['live'], 'last': 0, 'subscribed': False}, {'eligible': [[1, 'a'], [15, 'b'], [20, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 20, 'remaining': 17, 'attach_live': False, 'history_order': [1, 15, 20]}), ({'history': [[1, 'a']], 'cursor': 1, 'demand': 1, 'cancel': False, 'terminal': 'complete', 'want_terminal': True, 'replaying': False, 'live': [], 'last': 20, 'subscribed': False}, {'eligible': [], 'values': [], 'gap': False, 'terminal': 'complete', 'live': [], 'deferred': [], 'cursor': 1, 'remaining': 1, 'attach_live': False, 'history_order': [1]}), ({'history': [[1, 'a'], [15, 'b'], [20, 'c']], 'cursor': 0, 'demand': 20, 'cancel': False, 'terminal': None, 'want_terminal': True, 'replaying': True, 'live': [], 'last': 20, 'subscribed': True}, {'eligible': [[1, 'a'], [15, 'b'], [20, 'c']], 'values': ['a', 'b', 'c'], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 20, 'remaining': 17, 'attach_live': False, 'history_order': [1, 15, 20]}), ({'history': [[1, 'a']], 'cursor': 15, 'demand': 0, 'cancel': True, 'terminal': 'complete', 'want_terminal': True, 'replaying': False, 'live': ['live'], 'last': 0, 'subscribed': True}, {'eligible': [], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 15, 'remaining': 0, 'attach_live': False, 'history_order': [1]}), ({'history': [], 'cursor': 15, 'demand': 0, 'cancel': True, 'terminal': None, 'want_terminal': True, 'replaying': False, 'live': ['live'], 'last': 20, 'subscribed': True}, {'eligible': [], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 15, 'remaining': 0, 'attach_live': False, 'history_order': []}), ({'history': [], 'cursor': 0, 'demand': 0, 'cancel': False, 'terminal': None, 'want_terminal': False, 'replaying': False, 'live': [], 'last': 0, 'subscribed': False}, {'eligible': [], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 0, 'remaining': 0, 'attach_live': True, 'history_order': []}), ({'history': [[1, 'a'], [15, 'b'], [20, 'c']], 'cursor': 15, 'demand': 20, 'cancel': True, 'terminal': 'complete', 'want_terminal': True, 'replaying': True, 'live': ['live'], 'last': 20, 'subscribed': True}, {'eligible': [[20, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 20, 'remaining': 19, 'attach_live': False, 'history_order': [1, 15, 20]})]}
for i,(state,expected) in enumerate(fixtures[N]):
check("transition "+str(i), solve(state), expected)
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 |
|---|---|---|---|
| transition 0 | {'attach_live': False, 'cursor': 1, 'deferred': ['live'], 'eligible': [[1, 'a'], [3, 'b'], [4, 'c']], 'gap': True, 'history_order': [1, 3, 4], 'live': [], 'remaining': 0, 'terminal': None, 'values': ['a']} | {'attach_live': False, 'cursor': 1, 'deferred': ['live'], 'eligible': [[1, 'a'], [3, 'b'], [4, 'c']], 'gap': False, 'history_order': [1, 3, 4], 'live': [], 'remaining': 0, 'terminal': None, 'values': ['a']} | Failed |
| transition 1 | {'attach_live': False, 'cursor': 4, 'deferred': [], 'eligible': [[3, 'b'], [4, 'c']], 'gap': True, 'history_order': [1, 3, 4], 'live': [], 'remaining': 2, 'terminal': None, 'values': []} | {'attach_live': False, 'cursor': 4, 'deferred': [], 'eligible': [[3, 'b'], [4, 'c']], 'gap': False, 'history_order': [1, 3, 4], 'live': [], 'remaining': 2, 'terminal': None, 'values': []} | Failed |
| transition 2 | {'attach_live': False, 'cursor': 0, 'deferred': [], 'eligible': [[1, 'a'], [3, 'b'], [4, 'c']], 'gap': True, 'history_order': [1, 3, 4], 'live': [], 'remaining': 0, 'terminal': None, 'values': []} | {'attach_live': False, 'cursor': 0, 'deferred': [], 'eligible': [[1, 'a'], [3, 'b'], [4, 'c']], 'gap': False, 'history_order': [1, 3, 4], 'live': [], 'remaining': 0, 'terminal': None, 'values': []} | Failed |
| transition 3 | {'attach_live': False, 'cursor': 0, 'deferred': [], 'eligible': [], 'gap': False, 'history_order': [], 'live': [], 'remaining': 1, 'terminal': None, 'values': []} | {'attach_live': False, 'cursor': 0, 'deferred': [], 'eligible': [], 'gap': False, 'history_order': [], 'live': [], 'remaining': 1, 'terminal': None, 'values': []} | Passed |
| transition 4 | {'attach_live': True, 'cursor': 3, 'deferred': [], 'eligible': [], 'gap': False, 'history_order': [], 'live': [], 'remaining': 1, 'terminal': None, 'values': []} | {'attach_live': True, 'cursor': 3, 'deferred': [], 'eligible': [], 'gap': False, 'history_order': [], 'live': [], 'remaining': 1, 'terminal': None, 'values': []} | Passed |
| transition 5 | {'attach_live': False, 'cursor': 3, 'deferred': [], 'eligible': [], 'gap': False, 'history_order': [1], 'live': [], 'remaining': 0, 'terminal': None, 'values': []} | {'attach_live': False, 'cursor': 3, 'deferred': [], 'eligible': [], 'gap': False, 'history_order': [1], 'live': [], 'remaining': 0, 'terminal': None, 'values': []} | Passed |
| transition 6 | {'attach_live': True, 'cursor': 0, 'deferred': [], 'eligible': [], 'gap': False, 'history_order': [], 'live': [], 'remaining': 0, 'terminal': None, 'values': []} | {'attach_live': True, 'cursor': 0, 'deferred': [], 'eligible': [], 'gap': False, 'history_order': [], 'live': [], 'remaining': 0, 'terminal': None, 'values': []} | Passed |
| transition 7 | {'attach_live': False, 'cursor': 4, 'deferred': [], 'eligible': [[4, 'c']], 'gap': False, 'history_order': [1, 3, 4], 'live': [], 'remaining': 3, 'terminal': None, 'values': []} | {'attach_live': False, 'cursor': 4, 'deferred': [], 'eligible': [[4, 'c']], 'gap': False, 'history_order': [1, 3, 4], 'live': [], 'remaining': 3, 'terminal': None, 'values': []} | Passed |
SHA-256 / 9e32f8ef9ac188a2ee6fea07e35d3a9f6744131c4ece2c3f29789b742e754b05
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(s):
return {
'eligible': [r for r in s['history'] if r[0]>s['cursor']],
'values': [r[1] for r in s['history'] if r[0]>s['cursor']][:s['demand']] if not s['cancel'] else [],
'gap': bool(s['history']) and s['cursor']<s['history'][0][0],
'terminal': s['terminal'] if s['want_terminal'] and not s['cancel'] and not s['replaying'] else None,
'live': list(s['live']) if not s['replaying'] and not s['cancel'] else [],
'deferred': list(s['live']) if s['replaying'] and not s['cancel'] else [],
'cursor': max([s['cursor']]+[r[0] for r in s['history'] if r[0]>s['cursor']][:s['demand']]),
'remaining': max(0,s['demand']-len([r for r in s['history'] if r[0]>s['cursor']])),
'attach_live': not s['subscribed'] and s['terminal'] is None and not s['cancel'],
'history_order': [r[0] for r in s['history']],
}
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'history': [[1, 'a'], [3, 'b'], [4, 'c']], 'cursor': 0, 'demand': 1, 'cancel': False, 'terminal': 'complete', 'want_terminal': True, 'replaying': True, 'live': ['live'], 'last': 4, 'subscribed': False}, {'eligible': [[1, 'a'], [3, 'b'], [4, 'c']], 'values': ['a'], 'gap': False, 'terminal': None, 'live': [], 'deferred': ['live'], 'cursor': 1, 'remaining': 0, 'attach_live': False, 'history_order': [1, 3, 4]}), ({'history': [[1, 'a'], [3, 'b'], [4, 'c']], 'cursor': 1, 'demand': 4, 'cancel': True, 'terminal': 'complete', 'want_terminal': False, 'replaying': True, 'live': ['live'], 'last': 4, 'subscribed': False}, {'eligible': [[3, 'b'], [4, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 4, 'remaining': 2, 'attach_live': False, 'history_order': [1, 3, 4]}), ({'history': [[1, 'a'], [3, 'b'], [4, 'c']], 'cursor': 0, 'demand': 0, 'cancel': True, 'terminal': None, 'want_terminal': False, 'replaying': True, 'live': ['live'], 'last': 4, 'subscribed': True}, {'eligible': [[1, 'a'], [3, 'b'], [4, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 0, 'remaining': 0, 'attach_live': False, 'history_order': [1, 3, 4]}), ({'history': [], 'cursor': 0, 'demand': 1, 'cancel': True, 'terminal': 'complete', 'want_terminal': False, 'replaying': False, 'live': [], 'last': 4, 'subscribed': False}, {'eligible': [], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 0, 'remaining': 1, 'attach_live': False, 'history_order': []}), ({'history': [], 'cursor': 3, 'demand': 1, 'cancel': False, 'terminal': None, 'want_terminal': True, 'replaying': True, 'live': [], 'last': 0, 'subscribed': False}, {'eligible': [], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 3, 'remaining': 1, 'attach_live': True, 'history_order': []}), ({'history': [[1, 'a']], 'cursor': 3, 'demand': 0, 'cancel': True, 'terminal': 'complete', 'want_terminal': True, 'replaying': True, 'live': ['live'], 'last': 0, 'subscribed': True}, {'eligible': [], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 3, 'remaining': 0, 'attach_live': False, 'history_order': [1]}), ({'history': [], 'cursor': 0, 'demand': 0, 'cancel': False, 'terminal': None, 'want_terminal': False, 'replaying': False, 'live': [], 'last': 0, 'subscribed': False}, {'eligible': [], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 0, 'remaining': 0, 'attach_live': True, 'history_order': []}), ({'history': [[1, 'a'], [3, 'b'], [4, 'c']], 'cursor': 3, 'demand': 4, 'cancel': True, 'terminal': 'complete', 'want_terminal': True, 'replaying': True, 'live': ['live'], 'last': 4, 'subscribed': True}, {'eligible': [[4, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 4, 'remaining': 3, 'attach_live': False, 'history_order': [1, 3, 4]})], 2: [({'history': [[1, 'a'], [6, 'b'], [8, 'c']], 'cursor': 0, 'demand': 1, 'cancel': False, 'terminal': 'complete', 'want_terminal': True, 'replaying': True, 'live': ['live'], 'last': 8, 'subscribed': False}, {'eligible': [[1, 'a'], [6, 'b'], [8, 'c']], 'values': ['a'], 'gap': False, 'terminal': None, 'live': [], 'deferred': ['live'], 'cursor': 1, 'remaining': 0, 'attach_live': False, 'history_order': [1, 6, 8]}), ({'history': [[1, 'a'], [6, 'b'], [8, 'c']], 'cursor': 6, 'demand': 8, 'cancel': True, 'terminal': 'complete', 'want_terminal': True, 'replaying': True, 'live': ['live'], 'last': 8, 'subscribed': True}, {'eligible': [[8, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 8, 'remaining': 7, 'attach_live': False, 'history_order': [1, 6, 8]}), ({'history': [[1, 'a']], 'cursor': 1, 'demand': 1, 'cancel': False, 'terminal': None, 'want_terminal': False, 'replaying': True, 'live': [], 'last': 8, 'subscribed': True}, {'eligible': [], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 1, 'remaining': 1, 'attach_live': False, 'history_order': [1]}), ({'history': [[1, 'a'], [6, 'b'], [8, 'c']], 'cursor': 0, 'demand': 0, 'cancel': False, 'terminal': 'complete', 'want_terminal': False, 'replaying': False, 'live': ['live'], 'last': 8, 'subscribed': True}, {'eligible': [[1, 'a'], [6, 'b'], [8, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': ['live'], 'deferred': [], 'cursor': 0, 'remaining': 0, 'attach_live': False, 'history_order': [1, 6, 8]}), ({'history': [], 'cursor': 0, 'demand': 1, 'cancel': False, 'terminal': 'complete', 'want_terminal': False, 'replaying': True, 'live': [], 'last': 0, 'subscribed': True}, {'eligible': [], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 0, 'remaining': 1, 'attach_live': False, 'history_order': []}), ({'history': [], 'cursor': 6, 'demand': 0, 'cancel': True, 'terminal': 'complete', 'want_terminal': False, 'replaying': True, 'live': [], 'last': 0, 'subscribed': True}, {'eligible': [], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 6, 'remaining': 0, 'attach_live': False, 'history_order': []}), ({'history': [], 'cursor': 0, 'demand': 0, 'cancel': False, 'terminal': None, 'want_terminal': False, 'replaying': False, 'live': [], 'last': 0, 'subscribed': False}, {'eligible': [], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 0, 'remaining': 0, 'attach_live': True, 'history_order': []})], 3: [({'history': [[1, 'a'], [9, 'b'], [12, 'c']], 'cursor': 0, 'demand': 0, 'cancel': False, 'terminal': 'complete', 'want_terminal': True, 'replaying': True, 'live': ['live'], 'last': 0, 'subscribed': False}, {'eligible': [[1, 'a'], [9, 'b'], [12, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': ['live'], 'cursor': 0, 'remaining': 0, 'attach_live': False, 'history_order': [1, 9, 12]}), ({'history': [[1, 'a'], [9, 'b'], [12, 'c']], 'cursor': 9, 'demand': 12, 'cancel': True, 'terminal': None, 'want_terminal': True, 'replaying': True, 'live': ['live'], 'last': 12, 'subscribed': False}, {'eligible': [[12, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 12, 'remaining': 11, 'attach_live': False, 'history_order': [1, 9, 12]}), ({'history': [[1, 'a'], [9, 'b'], [12, 'c']], 'cursor': 0, 'demand': 1, 'cancel': True, 'terminal': None, 'want_terminal': True, 'replaying': True, 'live': ['live'], 'last': 0, 'subscribed': True}, {'eligible': [[1, 'a'], [9, 'b'], [12, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 1, 'remaining': 0, 'attach_live': False, 'history_order': [1, 9, 12]}), ({'history': [[1, 'a']], 'cursor': 0, 'demand': 1, 'cancel': True, 'terminal': 'complete', 'want_terminal': False, 'replaying': True, 'live': ['live'], 'last': 0, 'subscribed': True}, {'eligible': [[1, 'a']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 1, 'remaining': 0, 'attach_live': False, 'history_order': [1]}), ({'history': [[1, 'a'], [9, 'b'], [12, 'c']], 'cursor': 0, 'demand': 0, 'cancel': False, 'terminal': 'complete', 'want_terminal': True, 'replaying': False, 'live': ['live'], 'last': 0, 'subscribed': True}, {'eligible': [[1, 'a'], [9, 'b'], [12, 'c']], 'values': [], 'gap': False, 'terminal': 'complete', 'live': ['live'], 'deferred': [], 'cursor': 0, 'remaining': 0, 'attach_live': False, 'history_order': [1, 9, 12]}), ({'history': [[1, 'a'], [9, 'b'], [12, 'c']], 'cursor': 1, 'demand': 1, 'cancel': True, 'terminal': None, 'want_terminal': True, 'replaying': True, 'live': [], 'last': 0, 'subscribed': False}, {'eligible': [[9, 'b'], [12, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 9, 'remaining': 0, 'attach_live': False, 'history_order': [1, 9, 12]}), ({'history': [], 'cursor': 0, 'demand': 0, 'cancel': False, 'terminal': None, 'want_terminal': False, 'replaying': False, 'live': [], 'last': 0, 'subscribed': False}, {'eligible': [], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 0, 'remaining': 0, 'attach_live': True, 'history_order': []}), ({'history': [[1, 'a'], [9, 'b'], [12, 'c']], 'cursor': 9, 'demand': 12, 'cancel': True, 'terminal': 'complete', 'want_terminal': True, 'replaying': True, 'live': ['live'], 'last': 12, 'subscribed': True}, {'eligible': [[12, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 12, 'remaining': 11, 'attach_live': False, 'history_order': [1, 9, 12]})], 4: [({'history': [[1, 'a'], [12, 'b'], [16, 'c']], 'cursor': 0, 'demand': 0, 'cancel': False, 'terminal': 'complete', 'want_terminal': True, 'replaying': True, 'live': ['live'], 'last': 0, 'subscribed': False}, {'eligible': [[1, 'a'], [12, 'b'], [16, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': ['live'], 'cursor': 0, 'remaining': 0, 'attach_live': False, 'history_order': [1, 12, 16]}), ({'history': [[1, 'a'], [12, 'b'], [16, 'c']], 'cursor': 12, 'demand': 16, 'cancel': True, 'terminal': None, 'want_terminal': True, 'replaying': True, 'live': ['live'], 'last': 0, 'subscribed': True}, {'eligible': [[16, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 16, 'remaining': 15, 'attach_live': False, 'history_order': [1, 12, 16]}), ({'history': [[1, 'a'], [12, 'b'], [16, 'c']], 'cursor': 0, 'demand': 1, 'cancel': False, 'terminal': 'complete', 'want_terminal': True, 'replaying': True, 'live': [], 'last': 16, 'subscribed': True}, {'eligible': [[1, 'a'], [12, 'b'], [16, 'c']], 'values': ['a'], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 1, 'remaining': 0, 'attach_live': False, 'history_order': [1, 12, 16]}), ({'history': [[1, 'a'], [12, 'b'], [16, 'c']], 'cursor': 1, 'demand': 16, 'cancel': False, 'terminal': 'complete', 'want_terminal': True, 'replaying': False, 'live': ['live'], 'last': 0, 'subscribed': True}, {'eligible': [[12, 'b'], [16, 'c']], 'values': ['b', 'c'], 'gap': False, 'terminal': 'complete', 'live': ['live'], 'deferred': [], 'cursor': 16, 'remaining': 14, 'attach_live': False, 'history_order': [1, 12, 16]}), ({'history': [], 'cursor': 0, 'demand': 0, 'cancel': False, 'terminal': 'complete', 'want_terminal': False, 'replaying': False, 'live': ['live'], 'last': 0, 'subscribed': False}, {'eligible': [], 'values': [], 'gap': False, 'terminal': None, 'live': ['live'], 'deferred': [], 'cursor': 0, 'remaining': 0, 'attach_live': False, 'history_order': []}), ({'history': [[1, 'a'], [12, 'b'], [16, 'c']], 'cursor': 0, 'demand': 0, 'cancel': True, 'terminal': 'complete', 'want_terminal': False, 'replaying': False, 'live': ['live'], 'last': 0, 'subscribed': False}, {'eligible': [[1, 'a'], [12, 'b'], [16, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 0, 'remaining': 0, 'attach_live': False, 'history_order': [1, 12, 16]}), ({'history': [], 'cursor': 0, 'demand': 0, 'cancel': False, 'terminal': None, 'want_terminal': False, 'replaying': False, 'live': [], 'last': 0, 'subscribed': False}, {'eligible': [], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 0, 'remaining': 0, 'attach_live': True, 'history_order': []}), ({'history': [[1, 'a'], [12, 'b'], [16, 'c']], 'cursor': 12, 'demand': 16, 'cancel': True, 'terminal': 'complete', 'want_terminal': True, 'replaying': True, 'live': ['live'], 'last': 16, 'subscribed': True}, {'eligible': [[16, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 16, 'remaining': 15, 'attach_live': False, 'history_order': [1, 12, 16]})], 5: [({'history': [[1, 'a'], [15, 'b'], [20, 'c']], 'cursor': 1, 'demand': 1, 'cancel': False, 'terminal': 'complete', 'want_terminal': True, 'replaying': True, 'live': ['live'], 'last': 20, 'subscribed': False}, {'eligible': [[15, 'b'], [20, 'c']], 'values': ['b'], 'gap': False, 'terminal': None, 'live': [], 'deferred': ['live'], 'cursor': 15, 'remaining': 0, 'attach_live': False, 'history_order': [1, 15, 20]}), ({'history': [[1, 'a'], [15, 'b'], [20, 'c']], 'cursor': 0, 'demand': 20, 'cancel': True, 'terminal': None, 'want_terminal': False, 'replaying': True, 'live': ['live'], 'last': 0, 'subscribed': False}, {'eligible': [[1, 'a'], [15, 'b'], [20, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 20, 'remaining': 17, 'attach_live': False, 'history_order': [1, 15, 20]}), ({'history': [[1, 'a']], 'cursor': 1, 'demand': 1, 'cancel': False, 'terminal': 'complete', 'want_terminal': True, 'replaying': False, 'live': [], 'last': 20, 'subscribed': False}, {'eligible': [], 'values': [], 'gap': False, 'terminal': 'complete', 'live': [], 'deferred': [], 'cursor': 1, 'remaining': 1, 'attach_live': False, 'history_order': [1]}), ({'history': [[1, 'a'], [15, 'b'], [20, 'c']], 'cursor': 0, 'demand': 20, 'cancel': False, 'terminal': None, 'want_terminal': True, 'replaying': True, 'live': [], 'last': 20, 'subscribed': True}, {'eligible': [[1, 'a'], [15, 'b'], [20, 'c']], 'values': ['a', 'b', 'c'], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 20, 'remaining': 17, 'attach_live': False, 'history_order': [1, 15, 20]}), ({'history': [[1, 'a']], 'cursor': 15, 'demand': 0, 'cancel': True, 'terminal': 'complete', 'want_terminal': True, 'replaying': False, 'live': ['live'], 'last': 0, 'subscribed': True}, {'eligible': [], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 15, 'remaining': 0, 'attach_live': False, 'history_order': [1]}), ({'history': [], 'cursor': 15, 'demand': 0, 'cancel': True, 'terminal': None, 'want_terminal': True, 'replaying': False, 'live': ['live'], 'last': 20, 'subscribed': True}, {'eligible': [], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 15, 'remaining': 0, 'attach_live': False, 'history_order': []}), ({'history': [], 'cursor': 0, 'demand': 0, 'cancel': False, 'terminal': None, 'want_terminal': False, 'replaying': False, 'live': [], 'last': 0, 'subscribed': False}, {'eligible': [], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 0, 'remaining': 0, 'attach_live': True, 'history_order': []}), ({'history': [[1, 'a'], [15, 'b'], [20, 'c']], 'cursor': 15, 'demand': 20, 'cancel': True, 'terminal': 'complete', 'want_terminal': True, 'replaying': True, 'live': ['live'], 'last': 20, 'subscribed': True}, {'eligible': [[20, 'c']], 'values': [], 'gap': False, 'terminal': None, 'live': [], 'deferred': [], 'cursor': 20, 'remaining': 19, 'attach_live': False, 'history_order': [1, 15, 20]})]}
for i,(state,expected) in enumerate(fixtures[N]):
check("transition "+str(i), solve(state), expected)
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 |
|---|---|---|---|
| transition 0 | {'attach_live': False, 'cursor': 1, 'deferred': ['live'], 'eligible': [[1, 'a'], [3, 'b'], [4, 'c']], 'gap': True, 'history_order': [1, 3, 4], 'live': [], 'remaining': 0, 'terminal': None, 'values': ['a']} | {'attach_live': False, 'cursor': 1, 'deferred': ['live'], 'eligible': [[1, 'a'], [3, 'b'], [4, 'c']], 'gap': False, 'history_order': [1, 3, 4], 'live': [], 'remaining': 0, 'terminal': None, 'values': ['a']} | Failed |
| transition 1 | {'attach_live': False, 'cursor': 4, 'deferred': [], 'eligible': [[3, 'b'], [4, 'c']], 'gap': False, 'history_order': [1, 3, 4], 'live': [], 'remaining': 2, 'terminal': None, 'values': []} | {'attach_live': False, 'cursor': 4, 'deferred': [], 'eligible': [[3, 'b'], [4, 'c']], 'gap': False, 'history_order': [1, 3, 4], 'live': [], 'remaining': 2, 'terminal': None, 'values': []} | Passed |
| transition 2 | {'attach_live': False, 'cursor': 0, 'deferred': [], 'eligible': [[1, 'a'], [3, 'b'], [4, 'c']], 'gap': True, 'history_order': [1, 3, 4], 'live': [], 'remaining': 0, 'terminal': None, 'values': []} | {'attach_live': False, 'cursor': 0, 'deferred': [], 'eligible': [[1, 'a'], [3, 'b'], [4, 'c']], 'gap': False, 'history_order': [1, 3, 4], 'live': [], 'remaining': 0, 'terminal': None, 'values': []} | Failed |
| transition 3 | {'attach_live': False, 'cursor': 0, 'deferred': [], 'eligible': [], 'gap': False, 'history_order': [], 'live': [], 'remaining': 1, 'terminal': None, 'values': []} | {'attach_live': False, 'cursor': 0, 'deferred': [], 'eligible': [], 'gap': False, 'history_order': [], 'live': [], 'remaining': 1, 'terminal': None, 'values': []} | Passed |
| transition 4 | {'attach_live': True, 'cursor': 3, 'deferred': [], 'eligible': [], 'gap': False, 'history_order': [], 'live': [], 'remaining': 1, 'terminal': None, 'values': []} | {'attach_live': True, 'cursor': 3, 'deferred': [], 'eligible': [], 'gap': False, 'history_order': [], 'live': [], 'remaining': 1, 'terminal': None, 'values': []} | Passed |
| transition 5 | {'attach_live': False, 'cursor': 3, 'deferred': [], 'eligible': [], 'gap': False, 'history_order': [1], 'live': [], 'remaining': 0, 'terminal': None, 'values': []} | {'attach_live': False, 'cursor': 3, 'deferred': [], 'eligible': [], 'gap': False, 'history_order': [1], 'live': [], 'remaining': 0, 'terminal': None, 'values': []} | Passed |
| transition 6 | {'attach_live': True, 'cursor': 0, 'deferred': [], 'eligible': [], 'gap': False, 'history_order': [], 'live': [], 'remaining': 0, 'terminal': None, 'values': []} | {'attach_live': True, 'cursor': 0, 'deferred': [], 'eligible': [], 'gap': False, 'history_order': [], 'live': [], 'remaining': 0, 'terminal': None, 'values': []} | Passed |
| transition 7 | {'attach_live': False, 'cursor': 4, 'deferred': [], 'eligible': [[4, 'c']], 'gap': False, 'history_order': [1, 3, 4], 'live': [], 'remaining': 3, 'terminal': None, 'values': []} | {'attach_live': False, 'cursor': 4, 'deferred': [], 'eligible': [[4, 'c']], 'gap': False, 'history_order': [1, 3, 4], 'live': [], 'remaining': 3, 'terminal': None, 'values': []} | Passed |
SHA-256 / 6f4eb71f4d06ac7a68e4ce3b10c908d5275a027e07f56e46cbd56fd38e26d168
HELD IN THE MEMBER ARCHIVE
The verified repair and its recorded checks are member-only.
This mechanism has 8 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.
Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.
Member access is invitation-based. Sign in with your invited account to inspect the repair.
Sign in to the archive ↗Verification & scope
A deterministic, bounded, single-threaded transition planner. Returned plans model state changes; they do not implement a production event framework. 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:43:46.403669+00:00.
Case digest / d202055e0cfb219f0b78852a8fceab1fedbb7b9300f69e1fb065500574f04392