FAILURE MAP
← Case archive

FA-42641 / Listener lifecycle / Open access

Merge concurrency ignores synchronous inner reservations · case 01

Merge concurrency ignores synchronous inner reservations; the returned lifecycle plan violates the stated transition contract.

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

ROOT CAUSE

The slots decision in the merge-slots listener model is computed as max(0,s['limit']-len(s['active'])), losing a required lifecycle condition.

VERIFIED REPAIR

Compute the slots decision from the complete contract: max(0,s['limit']-len(s['active'])-s['reserved']).

Unsuccessful approach: The partial repair uses s['limit']-len(s['active'])-s['reserved']; a retained regression distinguishes it from the full transition.

Case contract

Plan a bounded-concurrency merge observer. Active inner IDs occupy slots, reserved synchronous starts also occupy slots, and pending outer items are FIFO. Fill only free slots; completion removes the matching inner ID. Outer completion waits for active, reserved and pending work. Fail-fast cancels siblings; delay-error retains them and accumulates errors until all work drains. New delayed-error entries are [failing_inner_id,error] records; preserve the supplied done identity instead of storing only the message. 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: slots = max(0,s['limit']-len(s['active'])-s['reserved']); starts = s['pending'][:max(0,s['limit']-len(s['active'])-s['reserved'])]; pending = s['pending'][max(0,s['limit']-len(s['active'])-s['reserved']):]; active = [x for x in s['active'] if x!=s['done']]; finish = s['outer_done'] and not s['active'] and not s['pending'] and s['reserved']==0; cancel_siblings = s['cancel'] or (s['error'] is not None and not s['delay_error']); errors = list(s['errors'])+([[s['done'],s['error']]] if s['error'] is not None else []); report_delayed = s['delay_error'] and bool(s['errors']) and s['outer_done'] and not s['active'] and not s['pending'] and s['reserved']==0; unknown_completion = s['done'] is not None and s['done'] not in s['active']; release_slots = int(s['done'] is not None and s['done'] in s['active'])

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 {
        'slots': max(0,s['limit']-len(s['active'])),
        'starts': s['pending'][:max(0,s['limit']-len(s['active'])-s['reserved'])],
        'pending': s['pending'][max(0,s['limit']-len(s['active'])-s['reserved']):],
        'active': [x for x in s['active'] if x!=s['done']],
        'finish': s['outer_done'] and not s['active'] and not s['pending'] and s['reserved']==0,
        'cancel_siblings': s['cancel'] or (s['error'] is not None and not s['delay_error']),
        'errors': list(s['errors'])+([[s['done'],s['error']]] if s['error'] is not None else []),
        'report_delayed': s['delay_error'] and bool(s['errors']) and s['outer_done'] and not s['active'] and not s['pending'] and s['reserved']==0,
        'unknown_completion': s['done'] is not None and s['done'] not in s['active'],
        'release_slots': int(s['done'] is not None and s['done'] in s['active']),
    }
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'active': ['a', 'b'], 'reserved': 3, 'limit': 3, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': False, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': False, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': [], 'reserved': 1, 'limit': 0, 'pending': [], 'done': None, 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': True, 'errors': ['old', [None, 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 3, 'limit': 1, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': False, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': False, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 3, 'limit': 3, 'pending': ['x', 'y', 'z'], 'done': None, 'outer_done': False, 'error': None, 'delay_error': False, 'errors': [], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': True, 'errors': [], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a'], 'reserved': 0, 'limit': 3, 'pending': [], 'done': None, 'outer_done': True, 'error': None, 'delay_error': False, 'errors': [], 'cancel': True}, {'slots': 2, 'starts': [], 'pending': [], 'active': ['a'], 'finish': False, 'cancel_siblings': True, 'errors': [], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 1, 'limit': 3, 'pending': [], 'done': 'a', 'outer_done': False, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': [], 'active': ['b'], 'finish': False, 'cancel_siblings': True, 'errors': ['old', ['a', 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 1}), ({'active': [], 'reserved': 0, 'limit': 0, 'pending': [], 'done': None, 'outer_done': False, 'error': None, 'delay_error': False, 'errors': [], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': False, 'errors': [], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 3, 'limit': 3, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': True, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0})], 2: [({'active': ['a', 'b'], 'reserved': 6, 'limit': 6, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': False, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': [], 'reserved': 6, 'limit': 6, 'pending': [], 'done': None, 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': True, 'errors': ['old', [None, 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 6, 'limit': 1, 'pending': ['x'], 'done': None, 'outer_done': False, 'error': None, 'delay_error': True, 'errors': [], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': ['x'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': True, 'errors': [], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a'], 'reserved': 0, 'limit': 0, 'pending': [], 'done': 'missing', 'outer_done': False, 'error': None, 'delay_error': False, 'errors': [], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': [], 'active': ['a'], 'finish': False, 'cancel_siblings': False, 'errors': [], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 1, 'limit': 6, 'pending': ['x', 'y', 'z'], 'done': 'a', 'outer_done': True, 'error': 'bad', 'delay_error': False, 'errors': ['old'], 'cancel': False}, {'slots': 3, 'starts': ['x', 'y', 'z'], 'pending': [], 'active': ['b'], 'finish': False, 'cancel_siblings': True, 'errors': ['old', ['a', 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 1}), ({'active': [], 'reserved': 1, 'limit': 6, 'pending': ['x'], 'done': 'missing', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 5, 'starts': ['x'], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': True, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': [], 'reserved': 0, 'limit': 0, 'pending': [], 'done': None, 'outer_done': False, 'error': None, 'delay_error': False, 'errors': [], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': False, 'errors': [], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 6, 'limit': 6, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': True, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0})], 3: [({'active': ['a', 'b'], 'reserved': 9, 'limit': 9, 'pending': ['x'], 'done': 'missing', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': ['x'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': True, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': [], 'reserved': 9, 'limit': 1, 'pending': [], 'done': None, 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': False, 'errors': ['old', [None, 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a'], 'reserved': 1, 'limit': 9, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': False, 'error': None, 'delay_error': False, 'errors': ['old'], 'cancel': True}, {'slots': 7, 'starts': ['x', 'y', 'z'], 'pending': [], 'active': ['a'], 'finish': False, 'cancel_siblings': True, 'errors': ['old'], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 9, 'limit': 9, 'pending': [], 'done': 'missing', 'outer_done': False, 'error': 'bad', 'delay_error': True, 'errors': [], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': [], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': False, 'errors': [['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 1, 'limit': 0, 'pending': [], 'done': None, 'outer_done': False, 'error': None, 'delay_error': False, 'errors': ['old'], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': [], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': True, 'errors': ['old'], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a'], 'reserved': 1, 'limit': 9, 'pending': [], 'done': 'missing', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': [], 'cancel': True}, {'slots': 7, 'starts': [], 'pending': [], 'active': ['a'], 'finish': False, 'cancel_siblings': True, 'errors': [['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': [], 'reserved': 0, 'limit': 0, 'pending': [], 'done': None, 'outer_done': False, 'error': None, 'delay_error': False, 'errors': [], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': False, 'errors': [], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 9, 'limit': 9, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': True, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0})], 4: [({'active': ['a', 'b'], 'reserved': 12, 'limit': 12, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': True, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': [], 'reserved': 12, 'limit': 1, 'pending': [], 'done': None, 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': False, 'errors': ['old', [None, 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 0, 'limit': 12, 'pending': ['x', 'y', 'z'], 'done': None, 'outer_done': False, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 10, 'starts': ['x', 'y', 'z'], 'pending': [], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': True, 'errors': ['old', [None, 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a'], 'reserved': 0, 'limit': 1, 'pending': ['x'], 'done': 'a', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': ['x'], 'active': [], 'finish': False, 'cancel_siblings': False, 'errors': ['old', ['a', 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 1}), ({'active': ['a'], 'reserved': 1, 'limit': 12, 'pending': [], 'done': None, 'outer_done': False, 'error': 'bad', 'delay_error': False, 'errors': ['old'], 'cancel': True}, {'slots': 10, 'starts': [], 'pending': [], 'active': ['a'], 'finish': False, 'cancel_siblings': True, 'errors': ['old', [None, 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 0, 'limit': 1, 'pending': [], 'done': 'a', 'outer_done': False, 'error': 'bad', 'delay_error': True, 'errors': [], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': [], 'active': ['b'], 'finish': False, 'cancel_siblings': True, 'errors': [['a', 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 1}), ({'active': [], 'reserved': 0, 'limit': 0, 'pending': [], 'done': None, 'outer_done': False, 'error': None, 'delay_error': False, 'errors': [], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': False, 'errors': [], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0})], 5: [({'active': ['a'], 'reserved': 15, 'limit': 15, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a'], 'finish': False, 'cancel_siblings': False, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': [], 'reserved': 1, 'limit': 15, 'pending': [], 'done': None, 'outer_done': True, 'error': None, 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 14, 'starts': [], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': True, 'errors': ['old'], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': [], 'reserved': 1, 'limit': 0, 'pending': ['x', 'y', 'z'], 'done': 'a', 'outer_done': True, 'error': 'bad', 'delay_error': False, 'errors': ['old'], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': [], 'finish': False, 'cancel_siblings': True, 'errors': ['old', ['a', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 0, 'limit': 1, 'pending': [], 'done': 'a', 'outer_done': False, 'error': 'bad', 'delay_error': True, 'errors': [], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': [], 'active': ['b'], 'finish': False, 'cancel_siblings': False, 'errors': [['a', 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 1}), ({'active': [], 'reserved': 1, 'limit': 15, 'pending': ['x'], 'done': None, 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 14, 'starts': ['x'], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': True, 'errors': ['old', [None, 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a'], 'reserved': 1, 'limit': 1, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': True, 'error': None, 'delay_error': True, 'errors': [], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a'], 'finish': False, 'cancel_siblings': False, 'errors': [], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': [], 'reserved': 0, 'limit': 0, 'pending': [], 'done': None, 'outer_done': False, 'error': None, 'delay_error': False, 'errors': [], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': False, 'errors': [], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 15, 'limit': 15, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': True, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0})]}
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 fixtureActualExpectedOutcome
transition 0{'active': ['a', 'b'], 'cancel_siblings': False, 'errors': ['old', ['missing', 'bad']], 'finish': False, 'pending': ['x', 'y', 'z'], 'release_slots': 0, 'report_delayed': False, 'slots': 1, 'starts': [], 'unknown_completion': True}{'active': ['a', 'b'], 'cancel_siblings': False, 'errors': ['old', ['missing', 'bad']], 'finish': False, 'pending': ['x', 'y', 'z'], 'release_slots': 0, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': True}Failed
transition 1{'active': [], 'cancel_siblings': True, 'errors': ['old', [None, 'bad']], 'finish': False, 'pending': [], 'release_slots': 0, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': False}{'active': [], 'cancel_siblings': True, 'errors': ['old', [None, 'bad']], 'finish': False, 'pending': [], 'release_slots': 0, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': False}Passed
transition 2{'active': ['a', 'b'], 'cancel_siblings': False, 'errors': ['old', ['missing', 'bad']], 'finish': False, 'pending': ['x', 'y', 'z'], 'release_slots': 0, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': True}{'active': ['a', 'b'], 'cancel_siblings': False, 'errors': ['old', ['missing', 'bad']], 'finish': False, 'pending': ['x', 'y', 'z'], 'release_slots': 0, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': True}Passed
transition 3{'active': ['a', 'b'], 'cancel_siblings': True, 'errors': [], 'finish': False, 'pending': ['x', 'y', 'z'], 'release_slots': 0, 'report_delayed': False, 'slots': 1, 'starts': [], 'unknown_completion': False}{'active': ['a', 'b'], 'cancel_siblings': True, 'errors': [], 'finish': False, 'pending': ['x', 'y', 'z'], 'release_slots': 0, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': False}Failed
transition 4{'active': ['a'], 'cancel_siblings': True, 'errors': [], 'finish': False, 'pending': [], 'release_slots': 0, 'report_delayed': False, 'slots': 2, 'starts': [], 'unknown_completion': False}{'active': ['a'], 'cancel_siblings': True, 'errors': [], 'finish': False, 'pending': [], 'release_slots': 0, 'report_delayed': False, 'slots': 2, 'starts': [], 'unknown_completion': False}Passed
transition 5{'active': ['b'], 'cancel_siblings': True, 'errors': ['old', ['a', 'bad']], 'finish': False, 'pending': [], 'release_slots': 1, 'report_delayed': False, 'slots': 1, 'starts': [], 'unknown_completion': False}{'active': ['b'], 'cancel_siblings': True, 'errors': ['old', ['a', 'bad']], 'finish': False, 'pending': [], 'release_slots': 1, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': False}Failed
transition 6{'active': [], 'cancel_siblings': False, 'errors': [], 'finish': False, 'pending': [], 'release_slots': 0, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': False}{'active': [], 'cancel_siblings': False, 'errors': [], 'finish': False, 'pending': [], 'release_slots': 0, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': False}Passed
transition 7{'active': ['a', 'b'], 'cancel_siblings': True, 'errors': ['old', ['missing', 'bad']], 'finish': False, 'pending': ['x', 'y', 'z'], 'release_slots': 0, 'report_delayed': False, 'slots': 1, 'starts': [], 'unknown_completion': True}{'active': ['a', 'b'], 'cancel_siblings': True, 'errors': ['old', ['missing', 'bad']], 'finish': False, 'pending': ['x', 'y', 'z'], 'release_slots': 0, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': True}Failed

SHA-256 / e0d5ef75fbc835c85fa290bbec53366625a256b22340226cb1082105f9449755

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(s):
    return {
        'slots': s['limit']-len(s['active'])-s['reserved'],
        'starts': s['pending'][:max(0,s['limit']-len(s['active'])-s['reserved'])],
        'pending': s['pending'][max(0,s['limit']-len(s['active'])-s['reserved']):],
        'active': [x for x in s['active'] if x!=s['done']],
        'finish': s['outer_done'] and not s['active'] and not s['pending'] and s['reserved']==0,
        'cancel_siblings': s['cancel'] or (s['error'] is not None and not s['delay_error']),
        'errors': list(s['errors'])+([[s['done'],s['error']]] if s['error'] is not None else []),
        'report_delayed': s['delay_error'] and bool(s['errors']) and s['outer_done'] and not s['active'] and not s['pending'] and s['reserved']==0,
        'unknown_completion': s['done'] is not None and s['done'] not in s['active'],
        'release_slots': int(s['done'] is not None and s['done'] in s['active']),
    }
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'active': ['a', 'b'], 'reserved': 3, 'limit': 3, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': False, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': False, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': [], 'reserved': 1, 'limit': 0, 'pending': [], 'done': None, 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': True, 'errors': ['old', [None, 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 3, 'limit': 1, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': False, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': False, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 3, 'limit': 3, 'pending': ['x', 'y', 'z'], 'done': None, 'outer_done': False, 'error': None, 'delay_error': False, 'errors': [], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': True, 'errors': [], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a'], 'reserved': 0, 'limit': 3, 'pending': [], 'done': None, 'outer_done': True, 'error': None, 'delay_error': False, 'errors': [], 'cancel': True}, {'slots': 2, 'starts': [], 'pending': [], 'active': ['a'], 'finish': False, 'cancel_siblings': True, 'errors': [], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 1, 'limit': 3, 'pending': [], 'done': 'a', 'outer_done': False, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': [], 'active': ['b'], 'finish': False, 'cancel_siblings': True, 'errors': ['old', ['a', 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 1}), ({'active': [], 'reserved': 0, 'limit': 0, 'pending': [], 'done': None, 'outer_done': False, 'error': None, 'delay_error': False, 'errors': [], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': False, 'errors': [], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 3, 'limit': 3, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': True, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0})], 2: [({'active': ['a', 'b'], 'reserved': 6, 'limit': 6, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': False, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': [], 'reserved': 6, 'limit': 6, 'pending': [], 'done': None, 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': True, 'errors': ['old', [None, 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 6, 'limit': 1, 'pending': ['x'], 'done': None, 'outer_done': False, 'error': None, 'delay_error': True, 'errors': [], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': ['x'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': True, 'errors': [], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a'], 'reserved': 0, 'limit': 0, 'pending': [], 'done': 'missing', 'outer_done': False, 'error': None, 'delay_error': False, 'errors': [], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': [], 'active': ['a'], 'finish': False, 'cancel_siblings': False, 'errors': [], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 1, 'limit': 6, 'pending': ['x', 'y', 'z'], 'done': 'a', 'outer_done': True, 'error': 'bad', 'delay_error': False, 'errors': ['old'], 'cancel': False}, {'slots': 3, 'starts': ['x', 'y', 'z'], 'pending': [], 'active': ['b'], 'finish': False, 'cancel_siblings': True, 'errors': ['old', ['a', 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 1}), ({'active': [], 'reserved': 1, 'limit': 6, 'pending': ['x'], 'done': 'missing', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 5, 'starts': ['x'], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': True, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': [], 'reserved': 0, 'limit': 0, 'pending': [], 'done': None, 'outer_done': False, 'error': None, 'delay_error': False, 'errors': [], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': False, 'errors': [], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 6, 'limit': 6, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': True, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0})], 3: [({'active': ['a', 'b'], 'reserved': 9, 'limit': 9, 'pending': ['x'], 'done': 'missing', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': ['x'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': True, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': [], 'reserved': 9, 'limit': 1, 'pending': [], 'done': None, 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': False, 'errors': ['old', [None, 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a'], 'reserved': 1, 'limit': 9, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': False, 'error': None, 'delay_error': False, 'errors': ['old'], 'cancel': True}, {'slots': 7, 'starts': ['x', 'y', 'z'], 'pending': [], 'active': ['a'], 'finish': False, 'cancel_siblings': True, 'errors': ['old'], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 9, 'limit': 9, 'pending': [], 'done': 'missing', 'outer_done': False, 'error': 'bad', 'delay_error': True, 'errors': [], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': [], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': False, 'errors': [['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 1, 'limit': 0, 'pending': [], 'done': None, 'outer_done': False, 'error': None, 'delay_error': False, 'errors': ['old'], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': [], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': True, 'errors': ['old'], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a'], 'reserved': 1, 'limit': 9, 'pending': [], 'done': 'missing', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': [], 'cancel': True}, {'slots': 7, 'starts': [], 'pending': [], 'active': ['a'], 'finish': False, 'cancel_siblings': True, 'errors': [['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': [], 'reserved': 0, 'limit': 0, 'pending': [], 'done': None, 'outer_done': False, 'error': None, 'delay_error': False, 'errors': [], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': False, 'errors': [], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 9, 'limit': 9, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': True, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0})], 4: [({'active': ['a', 'b'], 'reserved': 12, 'limit': 12, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': True, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': [], 'reserved': 12, 'limit': 1, 'pending': [], 'done': None, 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': False, 'errors': ['old', [None, 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 0, 'limit': 12, 'pending': ['x', 'y', 'z'], 'done': None, 'outer_done': False, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 10, 'starts': ['x', 'y', 'z'], 'pending': [], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': True, 'errors': ['old', [None, 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a'], 'reserved': 0, 'limit': 1, 'pending': ['x'], 'done': 'a', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': ['x'], 'active': [], 'finish': False, 'cancel_siblings': False, 'errors': ['old', ['a', 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 1}), ({'active': ['a'], 'reserved': 1, 'limit': 12, 'pending': [], 'done': None, 'outer_done': False, 'error': 'bad', 'delay_error': False, 'errors': ['old'], 'cancel': True}, {'slots': 10, 'starts': [], 'pending': [], 'active': ['a'], 'finish': False, 'cancel_siblings': True, 'errors': ['old', [None, 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 0, 'limit': 1, 'pending': [], 'done': 'a', 'outer_done': False, 'error': 'bad', 'delay_error': True, 'errors': [], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': [], 'active': ['b'], 'finish': False, 'cancel_siblings': True, 'errors': [['a', 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 1}), ({'active': [], 'reserved': 0, 'limit': 0, 'pending': [], 'done': None, 'outer_done': False, 'error': None, 'delay_error': False, 'errors': [], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': False, 'errors': [], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0})], 5: [({'active': ['a'], 'reserved': 15, 'limit': 15, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a'], 'finish': False, 'cancel_siblings': False, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': [], 'reserved': 1, 'limit': 15, 'pending': [], 'done': None, 'outer_done': True, 'error': None, 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 14, 'starts': [], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': True, 'errors': ['old'], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': [], 'reserved': 1, 'limit': 0, 'pending': ['x', 'y', 'z'], 'done': 'a', 'outer_done': True, 'error': 'bad', 'delay_error': False, 'errors': ['old'], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': [], 'finish': False, 'cancel_siblings': True, 'errors': ['old', ['a', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 0, 'limit': 1, 'pending': [], 'done': 'a', 'outer_done': False, 'error': 'bad', 'delay_error': True, 'errors': [], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': [], 'active': ['b'], 'finish': False, 'cancel_siblings': False, 'errors': [['a', 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 1}), ({'active': [], 'reserved': 1, 'limit': 15, 'pending': ['x'], 'done': None, 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 14, 'starts': ['x'], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': True, 'errors': ['old', [None, 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a'], 'reserved': 1, 'limit': 1, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': True, 'error': None, 'delay_error': True, 'errors': [], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a'], 'finish': False, 'cancel_siblings': False, 'errors': [], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': [], 'reserved': 0, 'limit': 0, 'pending': [], 'done': None, 'outer_done': False, 'error': None, 'delay_error': False, 'errors': [], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': False, 'errors': [], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 15, 'limit': 15, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': True, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0})]}
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 fixtureActualExpectedOutcome
transition 0{'active': ['a', 'b'], 'cancel_siblings': False, 'errors': ['old', ['missing', 'bad']], 'finish': False, 'pending': ['x', 'y', 'z'], 'release_slots': 0, 'report_delayed': False, 'slots': -2, 'starts': [], 'unknown_completion': True}{'active': ['a', 'b'], 'cancel_siblings': False, 'errors': ['old', ['missing', 'bad']], 'finish': False, 'pending': ['x', 'y', 'z'], 'release_slots': 0, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': True}Failed
transition 1{'active': [], 'cancel_siblings': True, 'errors': ['old', [None, 'bad']], 'finish': False, 'pending': [], 'release_slots': 0, 'report_delayed': False, 'slots': -1, 'starts': [], 'unknown_completion': False}{'active': [], 'cancel_siblings': True, 'errors': ['old', [None, 'bad']], 'finish': False, 'pending': [], 'release_slots': 0, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': False}Failed
transition 2{'active': ['a', 'b'], 'cancel_siblings': False, 'errors': ['old', ['missing', 'bad']], 'finish': False, 'pending': ['x', 'y', 'z'], 'release_slots': 0, 'report_delayed': False, 'slots': -4, 'starts': [], 'unknown_completion': True}{'active': ['a', 'b'], 'cancel_siblings': False, 'errors': ['old', ['missing', 'bad']], 'finish': False, 'pending': ['x', 'y', 'z'], 'release_slots': 0, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': True}Failed
transition 3{'active': ['a', 'b'], 'cancel_siblings': True, 'errors': [], 'finish': False, 'pending': ['x', 'y', 'z'], 'release_slots': 0, 'report_delayed': False, 'slots': -2, 'starts': [], 'unknown_completion': False}{'active': ['a', 'b'], 'cancel_siblings': True, 'errors': [], 'finish': False, 'pending': ['x', 'y', 'z'], 'release_slots': 0, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': False}Failed
transition 4{'active': ['a'], 'cancel_siblings': True, 'errors': [], 'finish': False, 'pending': [], 'release_slots': 0, 'report_delayed': False, 'slots': 2, 'starts': [], 'unknown_completion': False}{'active': ['a'], 'cancel_siblings': True, 'errors': [], 'finish': False, 'pending': [], 'release_slots': 0, 'report_delayed': False, 'slots': 2, 'starts': [], 'unknown_completion': False}Passed
transition 5{'active': ['b'], 'cancel_siblings': True, 'errors': ['old', ['a', 'bad']], 'finish': False, 'pending': [], 'release_slots': 1, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': False}{'active': ['b'], 'cancel_siblings': True, 'errors': ['old', ['a', 'bad']], 'finish': False, 'pending': [], 'release_slots': 1, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': False}Passed
transition 6{'active': [], 'cancel_siblings': False, 'errors': [], 'finish': False, 'pending': [], 'release_slots': 0, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': False}{'active': [], 'cancel_siblings': False, 'errors': [], 'finish': False, 'pending': [], 'release_slots': 0, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': False}Passed
transition 7{'active': ['a', 'b'], 'cancel_siblings': True, 'errors': ['old', ['missing', 'bad']], 'finish': False, 'pending': ['x', 'y', 'z'], 'release_slots': 0, 'report_delayed': False, 'slots': -2, 'starts': [], 'unknown_completion': True}{'active': ['a', 'b'], 'cancel_siblings': True, 'errors': ['old', ['missing', 'bad']], 'finish': False, 'pending': ['x', 'y', 'z'], 'release_slots': 0, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': True}Failed

SHA-256 / 821a01f8c6d2084a43725cb41f95fdfe3a68c0958f92c7c5864485fce675b966

3 / The verified repair

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

N = 1
observations = []
def solve(s):
    return {
        'slots': max(0,s['limit']-len(s['active'])-s['reserved']),
        'starts': s['pending'][:max(0,s['limit']-len(s['active'])-s['reserved'])],
        'pending': s['pending'][max(0,s['limit']-len(s['active'])-s['reserved']):],
        'active': [x for x in s['active'] if x!=s['done']],
        'finish': s['outer_done'] and not s['active'] and not s['pending'] and s['reserved']==0,
        'cancel_siblings': s['cancel'] or (s['error'] is not None and not s['delay_error']),
        'errors': list(s['errors'])+([[s['done'],s['error']]] if s['error'] is not None else []),
        'report_delayed': s['delay_error'] and bool(s['errors']) and s['outer_done'] and not s['active'] and not s['pending'] and s['reserved']==0,
        'unknown_completion': s['done'] is not None and s['done'] not in s['active'],
        'release_slots': int(s['done'] is not None and s['done'] in s['active']),
    }
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
fixtures = {1: [({'active': ['a', 'b'], 'reserved': 3, 'limit': 3, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': False, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': False, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': [], 'reserved': 1, 'limit': 0, 'pending': [], 'done': None, 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': True, 'errors': ['old', [None, 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 3, 'limit': 1, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': False, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': False, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 3, 'limit': 3, 'pending': ['x', 'y', 'z'], 'done': None, 'outer_done': False, 'error': None, 'delay_error': False, 'errors': [], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': True, 'errors': [], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a'], 'reserved': 0, 'limit': 3, 'pending': [], 'done': None, 'outer_done': True, 'error': None, 'delay_error': False, 'errors': [], 'cancel': True}, {'slots': 2, 'starts': [], 'pending': [], 'active': ['a'], 'finish': False, 'cancel_siblings': True, 'errors': [], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 1, 'limit': 3, 'pending': [], 'done': 'a', 'outer_done': False, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': [], 'active': ['b'], 'finish': False, 'cancel_siblings': True, 'errors': ['old', ['a', 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 1}), ({'active': [], 'reserved': 0, 'limit': 0, 'pending': [], 'done': None, 'outer_done': False, 'error': None, 'delay_error': False, 'errors': [], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': False, 'errors': [], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 3, 'limit': 3, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': True, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0})], 2: [({'active': ['a', 'b'], 'reserved': 6, 'limit': 6, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': False, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': [], 'reserved': 6, 'limit': 6, 'pending': [], 'done': None, 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': True, 'errors': ['old', [None, 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 6, 'limit': 1, 'pending': ['x'], 'done': None, 'outer_done': False, 'error': None, 'delay_error': True, 'errors': [], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': ['x'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': True, 'errors': [], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a'], 'reserved': 0, 'limit': 0, 'pending': [], 'done': 'missing', 'outer_done': False, 'error': None, 'delay_error': False, 'errors': [], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': [], 'active': ['a'], 'finish': False, 'cancel_siblings': False, 'errors': [], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 1, 'limit': 6, 'pending': ['x', 'y', 'z'], 'done': 'a', 'outer_done': True, 'error': 'bad', 'delay_error': False, 'errors': ['old'], 'cancel': False}, {'slots': 3, 'starts': ['x', 'y', 'z'], 'pending': [], 'active': ['b'], 'finish': False, 'cancel_siblings': True, 'errors': ['old', ['a', 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 1}), ({'active': [], 'reserved': 1, 'limit': 6, 'pending': ['x'], 'done': 'missing', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 5, 'starts': ['x'], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': True, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': [], 'reserved': 0, 'limit': 0, 'pending': [], 'done': None, 'outer_done': False, 'error': None, 'delay_error': False, 'errors': [], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': False, 'errors': [], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 6, 'limit': 6, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': True, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0})], 3: [({'active': ['a', 'b'], 'reserved': 9, 'limit': 9, 'pending': ['x'], 'done': 'missing', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': ['x'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': True, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': [], 'reserved': 9, 'limit': 1, 'pending': [], 'done': None, 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': False, 'errors': ['old', [None, 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a'], 'reserved': 1, 'limit': 9, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': False, 'error': None, 'delay_error': False, 'errors': ['old'], 'cancel': True}, {'slots': 7, 'starts': ['x', 'y', 'z'], 'pending': [], 'active': ['a'], 'finish': False, 'cancel_siblings': True, 'errors': ['old'], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 9, 'limit': 9, 'pending': [], 'done': 'missing', 'outer_done': False, 'error': 'bad', 'delay_error': True, 'errors': [], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': [], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': False, 'errors': [['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 1, 'limit': 0, 'pending': [], 'done': None, 'outer_done': False, 'error': None, 'delay_error': False, 'errors': ['old'], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': [], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': True, 'errors': ['old'], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a'], 'reserved': 1, 'limit': 9, 'pending': [], 'done': 'missing', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': [], 'cancel': True}, {'slots': 7, 'starts': [], 'pending': [], 'active': ['a'], 'finish': False, 'cancel_siblings': True, 'errors': [['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': [], 'reserved': 0, 'limit': 0, 'pending': [], 'done': None, 'outer_done': False, 'error': None, 'delay_error': False, 'errors': [], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': False, 'errors': [], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 9, 'limit': 9, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': True, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0})], 4: [({'active': ['a', 'b'], 'reserved': 12, 'limit': 12, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': True, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': [], 'reserved': 12, 'limit': 1, 'pending': [], 'done': None, 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': False, 'errors': ['old', [None, 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 0, 'limit': 12, 'pending': ['x', 'y', 'z'], 'done': None, 'outer_done': False, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 10, 'starts': ['x', 'y', 'z'], 'pending': [], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': True, 'errors': ['old', [None, 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a'], 'reserved': 0, 'limit': 1, 'pending': ['x'], 'done': 'a', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': ['x'], 'active': [], 'finish': False, 'cancel_siblings': False, 'errors': ['old', ['a', 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 1}), ({'active': ['a'], 'reserved': 1, 'limit': 12, 'pending': [], 'done': None, 'outer_done': False, 'error': 'bad', 'delay_error': False, 'errors': ['old'], 'cancel': True}, {'slots': 10, 'starts': [], 'pending': [], 'active': ['a'], 'finish': False, 'cancel_siblings': True, 'errors': ['old', [None, 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 0, 'limit': 1, 'pending': [], 'done': 'a', 'outer_done': False, 'error': 'bad', 'delay_error': True, 'errors': [], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': [], 'active': ['b'], 'finish': False, 'cancel_siblings': True, 'errors': [['a', 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 1}), ({'active': [], 'reserved': 0, 'limit': 0, 'pending': [], 'done': None, 'outer_done': False, 'error': None, 'delay_error': False, 'errors': [], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': False, 'errors': [], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0})], 5: [({'active': ['a'], 'reserved': 15, 'limit': 15, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a'], 'finish': False, 'cancel_siblings': False, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': [], 'reserved': 1, 'limit': 15, 'pending': [], 'done': None, 'outer_done': True, 'error': None, 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 14, 'starts': [], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': True, 'errors': ['old'], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': [], 'reserved': 1, 'limit': 0, 'pending': ['x', 'y', 'z'], 'done': 'a', 'outer_done': True, 'error': 'bad', 'delay_error': False, 'errors': ['old'], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': [], 'finish': False, 'cancel_siblings': True, 'errors': ['old', ['a', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 0, 'limit': 1, 'pending': [], 'done': 'a', 'outer_done': False, 'error': 'bad', 'delay_error': True, 'errors': [], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': [], 'active': ['b'], 'finish': False, 'cancel_siblings': False, 'errors': [['a', 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 1}), ({'active': [], 'reserved': 1, 'limit': 15, 'pending': ['x'], 'done': None, 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 14, 'starts': ['x'], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': True, 'errors': ['old', [None, 'bad']], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a'], 'reserved': 1, 'limit': 1, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': True, 'error': None, 'delay_error': True, 'errors': [], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a'], 'finish': False, 'cancel_siblings': False, 'errors': [], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0}), ({'active': [], 'reserved': 0, 'limit': 0, 'pending': [], 'done': None, 'outer_done': False, 'error': None, 'delay_error': False, 'errors': [], 'cancel': False}, {'slots': 0, 'starts': [], 'pending': [], 'active': [], 'finish': False, 'cancel_siblings': False, 'errors': [], 'report_delayed': False, 'unknown_completion': False, 'release_slots': 0}), ({'active': ['a', 'b'], 'reserved': 15, 'limit': 15, 'pending': ['x', 'y', 'z'], 'done': 'missing', 'outer_done': True, 'error': 'bad', 'delay_error': True, 'errors': ['old'], 'cancel': True}, {'slots': 0, 'starts': [], 'pending': ['x', 'y', 'z'], 'active': ['a', 'b'], 'finish': False, 'cancel_siblings': True, 'errors': ['old', ['missing', 'bad']], 'report_delayed': False, 'unknown_completion': True, 'release_slots': 0})]}
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 fixtureActualExpectedOutcome
transition 0{'active': ['a', 'b'], 'cancel_siblings': False, 'errors': ['old', ['missing', 'bad']], 'finish': False, 'pending': ['x', 'y', 'z'], 'release_slots': 0, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': True}{'active': ['a', 'b'], 'cancel_siblings': False, 'errors': ['old', ['missing', 'bad']], 'finish': False, 'pending': ['x', 'y', 'z'], 'release_slots': 0, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': True}Passed
transition 1{'active': [], 'cancel_siblings': True, 'errors': ['old', [None, 'bad']], 'finish': False, 'pending': [], 'release_slots': 0, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': False}{'active': [], 'cancel_siblings': True, 'errors': ['old', [None, 'bad']], 'finish': False, 'pending': [], 'release_slots': 0, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': False}Passed
transition 2{'active': ['a', 'b'], 'cancel_siblings': False, 'errors': ['old', ['missing', 'bad']], 'finish': False, 'pending': ['x', 'y', 'z'], 'release_slots': 0, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': True}{'active': ['a', 'b'], 'cancel_siblings': False, 'errors': ['old', ['missing', 'bad']], 'finish': False, 'pending': ['x', 'y', 'z'], 'release_slots': 0, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': True}Passed
transition 3{'active': ['a', 'b'], 'cancel_siblings': True, 'errors': [], 'finish': False, 'pending': ['x', 'y', 'z'], 'release_slots': 0, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': False}{'active': ['a', 'b'], 'cancel_siblings': True, 'errors': [], 'finish': False, 'pending': ['x', 'y', 'z'], 'release_slots': 0, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': False}Passed
transition 4{'active': ['a'], 'cancel_siblings': True, 'errors': [], 'finish': False, 'pending': [], 'release_slots': 0, 'report_delayed': False, 'slots': 2, 'starts': [], 'unknown_completion': False}{'active': ['a'], 'cancel_siblings': True, 'errors': [], 'finish': False, 'pending': [], 'release_slots': 0, 'report_delayed': False, 'slots': 2, 'starts': [], 'unknown_completion': False}Passed
transition 5{'active': ['b'], 'cancel_siblings': True, 'errors': ['old', ['a', 'bad']], 'finish': False, 'pending': [], 'release_slots': 1, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': False}{'active': ['b'], 'cancel_siblings': True, 'errors': ['old', ['a', 'bad']], 'finish': False, 'pending': [], 'release_slots': 1, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': False}Passed
transition 6{'active': [], 'cancel_siblings': False, 'errors': [], 'finish': False, 'pending': [], 'release_slots': 0, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': False}{'active': [], 'cancel_siblings': False, 'errors': [], 'finish': False, 'pending': [], 'release_slots': 0, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': False}Passed
transition 7{'active': ['a', 'b'], 'cancel_siblings': True, 'errors': ['old', ['missing', 'bad']], 'finish': False, 'pending': ['x', 'y', 'z'], 'release_slots': 0, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': True}{'active': ['a', 'b'], 'cancel_siblings': True, 'errors': ['old', ['missing', 'bad']], 'finish': False, 'pending': ['x', 'y', 'z'], 'release_slots': 0, 'report_delayed': False, 'slots': 0, 'starts': [], 'unknown_completion': True}Passed

SHA-256 / 534d84dcaee381de46d0be634fa6294ba4077423607bdb1e74d5d819edcbdb0b

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:53.704700+00:00.

Case digest / fc16901d9da3c2022f5b73b1f39831a5b43748c057b26d83b2fe4c7415d42271