FAILURE MAP
← Case archive

FA-42676 / Listener lifecycle / Open access

Merge reports delayed errors before all inner callbacks finish · case 01

Merge reports delayed errors before all inner callbacks finish; the returned lifecycle plan violates the stated transition contract.

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

ROOT CAUSE

The report_delayed decision in the merge-slots listener model is computed as s['delay_error'] and bool(s['errors']), losing a required lifecycle condition.

VERIFIED REPAIR

Compute the report_delayed decision from the complete contract: s['delay_error'] and bool(s['errors']) and s['outer_done'] and not s['active'] and not s['pending'] and s['reserved']==0.

Unsuccessful approach: The partial repair uses s['delay_error'] and bool(s['errors']) and not s['active']; 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'])-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']),
        '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': True, '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}Failed
transition 1{'active': [], 'cancel_siblings': True, 'errors': ['old', [None, 'bad']], 'finish': False, 'pending': [], 'release_slots': 0, 'report_delayed': True, '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}Failed
transition 2{'active': ['a', 'b'], 'cancel_siblings': False, 'errors': ['old', ['missing', 'bad']], 'finish': False, 'pending': ['x', 'y', 'z'], 'release_slots': 0, 'report_delayed': True, '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}Failed
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': True, '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}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': True, '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}Failed

SHA-256 / 71635c336bb115df250058592d0d49a402bc9100bf96cfb8eab35a151d999a64

2 / The unsuccessful fix

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'])-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 not s['active'],
        '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': True, '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}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': 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 / 1183618e5f9e5c37e03edf93390d40f08091bc4d865bdd43e1895248894f2855

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

Case digest / 46f13c29d3b30a3f0ee3c5574c417b496b59a935d114798289ccd42c5ed61e3c