FAILURE MAP
← Case archive

FA-23936 / Client state / Open access

Component subscription registration: Buffered delivery order · case 01

Buffered delivery order.

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

ROOT CAUSE

The buffered-delivery-order client decision evaluates `[event]+buffered` instead of `buffered+[event]`.

VERIFIED REPAIR

Apply the modeled buffered-delivery-order rule: `buffered+[event]`.

Unsuccessful approach: The partial repair `[event]` still violates the explicit fixture contract.

Case contract

Registration handles differ from topic names. Removing a handle removes all its registrations while preserving other handles and topic reference counts; unmounted consumers receive nothing and discard buffered events. Operation buffered-delivery-order has the six explicit input/output oracles below.

Why this case matters

An offline client lifecycle model that isolates a state-management defect without DOM rendering or network services.

1 / The failure

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

N = 1
observations = []
def solve(operation, s):
    registrations, removed, event, mounted, buffered = s
    if operation == 'unsubscribe-by-registration':
        return [(k,t) for k,t in registrations if k!=removed]
    if operation == 'topic-recipient-routing':
        return [k for k,t in registrations if t==event]
    if operation == 'unmounted-event-delivery':
        return [k for k,t in registrations if t==event] if mounted else []
    if operation == 'last-listener-resource-close':
        return not any(k!=removed for k,t in registrations)
    if operation == 'registration-topic-index':
        return sorted({t for k,t in registrations})
    if operation == 'unmount-buffer-discard':
        return buffered if mounted else []
    if operation == 'buffered-delivery-order':
        return [event]+buffered
    if operation == 'unknown-unsubscribe-noop':
        return removed not in [k for k,t in registrations]
    if operation == 'registration-removal-count':
        return sum(k==removed for k,t in registrations)
    if operation == 'remaining-topic-reference-count':
        return sum(t==event and k!=removed for k,t in registrations)
    raise ValueError('unknown modeled operation')
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('unsubscribe-by-registration scenario 1', solve('unsubscribe-by-registration', ([('a','x'),('b','x'),('c','y')],'a','x',True,['old'+str(N)])), [('b','x'),('c','y')])
check('unsubscribe-by-registration scenario 2', solve('unsubscribe-by-registration', ([],'a','x',True,[])), [])
check('unsubscribe-by-registration scenario 3', solve('unsubscribe-by-registration', ([('a','x'),('a','y')],'a','y',False,['old'])), [])
check('unsubscribe-by-registration scenario 4', solve('unsubscribe-by-registration', ([('a','x')],'z','x',True,[])), [('a','x')])
check('unsubscribe-by-registration scenario 5', solve('unsubscribe-by-registration', ([('a','x'),('b','y')],'b','z',True,['a','b'])), [('a','x')])
check('unsubscribe-by-registration scenario 6', solve('unsubscribe-by-registration', ([('a','x'),('b','x')],'b','x',False,[])), [('a','x')])
check('topic-recipient-routing scenario 1', solve('topic-recipient-routing', ([('a','x'),('b','x'),('c','y')],'a','x',True,['old'+str(N)])), ['a','b'])
check('topic-recipient-routing scenario 2', solve('topic-recipient-routing', ([],'a','x',True,[])), [])
check('topic-recipient-routing scenario 3', solve('topic-recipient-routing', ([('a','x'),('a','y')],'a','y',False,['old'])), ['a'])
check('topic-recipient-routing scenario 4', solve('topic-recipient-routing', ([('a','x')],'z','x',True,[])), ['a'])
check('topic-recipient-routing scenario 5', solve('topic-recipient-routing', ([('a','x'),('b','y')],'b','z',True,['a','b'])), [])
check('topic-recipient-routing scenario 6', solve('topic-recipient-routing', ([('a','x'),('b','x')],'b','x',False,[])), ['a','b'])
check('unmounted-event-delivery scenario 1', solve('unmounted-event-delivery', ([('a','x'),('b','x'),('c','y')],'a','x',True,['old'+str(N)])), ['a','b'])
check('unmounted-event-delivery scenario 2', solve('unmounted-event-delivery', ([],'a','x',True,[])), [])
check('unmounted-event-delivery scenario 3', solve('unmounted-event-delivery', ([('a','x'),('a','y')],'a','y',False,['old'])), [])
check('unmounted-event-delivery scenario 4', solve('unmounted-event-delivery', ([('a','x')],'z','x',True,[])), ['a'])
check('unmounted-event-delivery scenario 5', solve('unmounted-event-delivery', ([('a','x'),('b','y')],'b','z',True,['a','b'])), [])
check('unmounted-event-delivery scenario 6', solve('unmounted-event-delivery', ([('a','x'),('b','x')],'b','x',False,[])), [])
check('last-listener-resource-close scenario 1', solve('last-listener-resource-close', ([('a','x'),('b','x'),('c','y')],'a','x',True,['old'+str(N)])), False)
check('last-listener-resource-close scenario 2', solve('last-listener-resource-close', ([],'a','x',True,[])), True)
check('last-listener-resource-close scenario 3', solve('last-listener-resource-close', ([('a','x'),('a','y')],'a','y',False,['old'])), True)
check('last-listener-resource-close scenario 4', solve('last-listener-resource-close', ([('a','x')],'z','x',True,[])), False)
check('last-listener-resource-close scenario 5', solve('last-listener-resource-close', ([('a','x'),('b','y')],'b','z',True,['a','b'])), False)
check('last-listener-resource-close scenario 6', solve('last-listener-resource-close', ([('a','x'),('b','x')],'b','x',False,[])), False)
check('registration-topic-index scenario 1', solve('registration-topic-index', ([('a','x'),('b','x'),('c','y')],'a','x',True,['old'+str(N)])), ['x','y'])
check('registration-topic-index scenario 2', solve('registration-topic-index', ([],'a','x',True,[])), [])
check('registration-topic-index scenario 3', solve('registration-topic-index', ([('a','x'),('a','y')],'a','y',False,['old'])), ['x','y'])
check('registration-topic-index scenario 4', solve('registration-topic-index', ([('a','x')],'z','x',True,[])), ['x'])
check('registration-topic-index scenario 5', solve('registration-topic-index', ([('a','x'),('b','y')],'b','z',True,['a','b'])), ['x','y'])
check('registration-topic-index scenario 6', solve('registration-topic-index', ([('a','x'),('b','x')],'b','x',False,[])), ['x'])
check('unmount-buffer-discard scenario 1', solve('unmount-buffer-discard', ([('a','x'),('b','x'),('c','y')],'a','x',True,['old'+str(N)])), ['old'+str(N)])
check('unmount-buffer-discard scenario 2', solve('unmount-buffer-discard', ([],'a','x',True,[])), [])
check('unmount-buffer-discard scenario 3', solve('unmount-buffer-discard', ([('a','x'),('a','y')],'a','y',False,['old'])), [])
check('unmount-buffer-discard scenario 4', solve('unmount-buffer-discard', ([('a','x')],'z','x',True,[])), [])
check('unmount-buffer-discard scenario 5', solve('unmount-buffer-discard', ([('a','x'),('b','y')],'b','z',True,['a','b'])), ['a','b'])
check('unmount-buffer-discard scenario 6', solve('unmount-buffer-discard', ([('a','x'),('b','x')],'b','x',False,[])), [])
check('buffered-delivery-order scenario 1', solve('buffered-delivery-order', ([('a','x'),('b','x'),('c','y')],'a','x',True,['old'+str(N)])), ['old'+str(N),'x'])
check('buffered-delivery-order scenario 2', solve('buffered-delivery-order', ([],'a','x',True,[])), ['x'])
check('buffered-delivery-order scenario 3', solve('buffered-delivery-order', ([('a','x'),('a','y')],'a','y',False,['old'])), ['old','y'])
check('buffered-delivery-order scenario 4', solve('buffered-delivery-order', ([('a','x')],'z','x',True,[])), ['x'])
check('buffered-delivery-order scenario 5', solve('buffered-delivery-order', ([('a','x'),('b','y')],'b','z',True,['a','b'])), ['a','b','z'])
check('buffered-delivery-order scenario 6', solve('buffered-delivery-order', ([('a','x'),('b','x')],'b','x',False,[])), ['x'])
check('unknown-unsubscribe-noop scenario 1', solve('unknown-unsubscribe-noop', ([('a','x'),('b','x'),('c','y')],'a','x',True,['old'+str(N)])), False)
check('unknown-unsubscribe-noop scenario 2', solve('unknown-unsubscribe-noop', ([],'a','x',True,[])), True)
check('unknown-unsubscribe-noop scenario 3', solve('unknown-unsubscribe-noop', ([('a','x'),('a','y')],'a','y',False,['old'])), False)
check('unknown-unsubscribe-noop scenario 4', solve('unknown-unsubscribe-noop', ([('a','x')],'z','x',True,[])), True)
check('unknown-unsubscribe-noop scenario 5', solve('unknown-unsubscribe-noop', ([('a','x'),('b','y')],'b','z',True,['a','b'])), False)
check('unknown-unsubscribe-noop scenario 6', solve('unknown-unsubscribe-noop', ([('a','x'),('b','x')],'b','x',False,[])), False)
check('registration-removal-count scenario 1', solve('registration-removal-count', ([('a','x'),('b','x'),('c','y')],'a','x',True,['old'+str(N)])), 1)
check('registration-removal-count scenario 2', solve('registration-removal-count', ([],'a','x',True,[])), 0)
check('registration-removal-count scenario 3', solve('registration-removal-count', ([('a','x'),('a','y')],'a','y',False,['old'])), 2)
check('registration-removal-count scenario 4', solve('registration-removal-count', ([('a','x')],'z','x',True,[])), 0)
check('registration-removal-count scenario 5', solve('registration-removal-count', ([('a','x'),('b','y')],'b','z',True,['a','b'])), 1)
check('registration-removal-count scenario 6', solve('registration-removal-count', ([('a','x'),('b','x')],'b','x',False,[])), 1)
check('remaining-topic-reference-count scenario 1', solve('remaining-topic-reference-count', ([('a','x'),('b','x'),('c','y')],'a','x',True,['old'+str(N)])), 1)
check('remaining-topic-reference-count scenario 2', solve('remaining-topic-reference-count', ([],'a','x',True,[])), 0)
check('remaining-topic-reference-count scenario 3', solve('remaining-topic-reference-count', ([('a','x'),('a','y')],'a','y',False,['old'])), 0)
check('remaining-topic-reference-count scenario 4', solve('remaining-topic-reference-count', ([('a','x')],'z','x',True,[])), 1)
check('remaining-topic-reference-count scenario 5', solve('remaining-topic-reference-count', ([('a','x'),('b','y')],'b','z',True,['a','b'])), 0)
check('remaining-topic-reference-count scenario 6', solve('remaining-topic-reference-count', ([('a','x'),('b','x')],'b','x',False,[])), 1)
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
unsubscribe-by-registration scenario 1[['b', 'x'], ['c', 'y']][['b', 'x'], ['c', 'y']]Passed
unsubscribe-by-registration scenario 2[][]Passed
unsubscribe-by-registration scenario 3[][]Passed
unsubscribe-by-registration scenario 4[['a', 'x']][['a', 'x']]Passed
unsubscribe-by-registration scenario 5[['a', 'x']][['a', 'x']]Passed
unsubscribe-by-registration scenario 6[['a', 'x']][['a', 'x']]Passed
topic-recipient-routing scenario 1['a', 'b']['a', 'b']Passed
topic-recipient-routing scenario 2[][]Passed
topic-recipient-routing scenario 3['a']['a']Passed
topic-recipient-routing scenario 4['a']['a']Passed
topic-recipient-routing scenario 5[][]Passed
topic-recipient-routing scenario 6['a', 'b']['a', 'b']Passed
unmounted-event-delivery scenario 1['a', 'b']['a', 'b']Passed
unmounted-event-delivery scenario 2[][]Passed
unmounted-event-delivery scenario 3[][]Passed
unmounted-event-delivery scenario 4['a']['a']Passed
unmounted-event-delivery scenario 5[][]Passed
unmounted-event-delivery scenario 6[][]Passed
last-listener-resource-close scenario 1FalseFalsePassed
last-listener-resource-close scenario 2TrueTruePassed
last-listener-resource-close scenario 3TrueTruePassed
last-listener-resource-close scenario 4FalseFalsePassed
last-listener-resource-close scenario 5FalseFalsePassed
last-listener-resource-close scenario 6FalseFalsePassed
registration-topic-index scenario 1['x', 'y']['x', 'y']Passed
registration-topic-index scenario 2[][]Passed
registration-topic-index scenario 3['x', 'y']['x', 'y']Passed
registration-topic-index scenario 4['x']['x']Passed
registration-topic-index scenario 5['x', 'y']['x', 'y']Passed
registration-topic-index scenario 6['x']['x']Passed
unmount-buffer-discard scenario 1['old1']['old1']Passed
unmount-buffer-discard scenario 2[][]Passed
unmount-buffer-discard scenario 3[][]Passed
unmount-buffer-discard scenario 4[][]Passed
unmount-buffer-discard scenario 5['a', 'b']['a', 'b']Passed
unmount-buffer-discard scenario 6[][]Passed
buffered-delivery-order scenario 1['x', 'old1']['old1', 'x']Failed
buffered-delivery-order scenario 2['x']['x']Passed
buffered-delivery-order scenario 3['y', 'old']['old', 'y']Failed
buffered-delivery-order scenario 4['x']['x']Passed
buffered-delivery-order scenario 5['z', 'a', 'b']['a', 'b', 'z']Failed
buffered-delivery-order scenario 6['x']['x']Passed
unknown-unsubscribe-noop scenario 1FalseFalsePassed
unknown-unsubscribe-noop scenario 2TrueTruePassed
unknown-unsubscribe-noop scenario 3FalseFalsePassed
unknown-unsubscribe-noop scenario 4TrueTruePassed
unknown-unsubscribe-noop scenario 5FalseFalsePassed
unknown-unsubscribe-noop scenario 6FalseFalsePassed
registration-removal-count scenario 111Passed
registration-removal-count scenario 200Passed
registration-removal-count scenario 322Passed
registration-removal-count scenario 400Passed
registration-removal-count scenario 511Passed
registration-removal-count scenario 611Passed
remaining-topic-reference-count scenario 111Passed
remaining-topic-reference-count scenario 200Passed
remaining-topic-reference-count scenario 300Passed
remaining-topic-reference-count scenario 411Passed
remaining-topic-reference-count scenario 500Passed
remaining-topic-reference-count scenario 611Passed

SHA-256 / 4beab3ee800d9f2d1e16948b5d02778a8fbcf7caff7772523c927bc6f7debe8b

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(operation, s):
    registrations, removed, event, mounted, buffered = s
    if operation == 'unsubscribe-by-registration':
        return [(k,t) for k,t in registrations if k!=removed]
    if operation == 'topic-recipient-routing':
        return [k for k,t in registrations if t==event]
    if operation == 'unmounted-event-delivery':
        return [k for k,t in registrations if t==event] if mounted else []
    if operation == 'last-listener-resource-close':
        return not any(k!=removed for k,t in registrations)
    if operation == 'registration-topic-index':
        return sorted({t for k,t in registrations})
    if operation == 'unmount-buffer-discard':
        return buffered if mounted else []
    if operation == 'buffered-delivery-order':
        return [event]
    if operation == 'unknown-unsubscribe-noop':
        return removed not in [k for k,t in registrations]
    if operation == 'registration-removal-count':
        return sum(k==removed for k,t in registrations)
    if operation == 'remaining-topic-reference-count':
        return sum(t==event and k!=removed for k,t in registrations)
    raise ValueError('unknown modeled operation')
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('unsubscribe-by-registration scenario 1', solve('unsubscribe-by-registration', ([('a','x'),('b','x'),('c','y')],'a','x',True,['old'+str(N)])), [('b','x'),('c','y')])
check('unsubscribe-by-registration scenario 2', solve('unsubscribe-by-registration', ([],'a','x',True,[])), [])
check('unsubscribe-by-registration scenario 3', solve('unsubscribe-by-registration', ([('a','x'),('a','y')],'a','y',False,['old'])), [])
check('unsubscribe-by-registration scenario 4', solve('unsubscribe-by-registration', ([('a','x')],'z','x',True,[])), [('a','x')])
check('unsubscribe-by-registration scenario 5', solve('unsubscribe-by-registration', ([('a','x'),('b','y')],'b','z',True,['a','b'])), [('a','x')])
check('unsubscribe-by-registration scenario 6', solve('unsubscribe-by-registration', ([('a','x'),('b','x')],'b','x',False,[])), [('a','x')])
check('topic-recipient-routing scenario 1', solve('topic-recipient-routing', ([('a','x'),('b','x'),('c','y')],'a','x',True,['old'+str(N)])), ['a','b'])
check('topic-recipient-routing scenario 2', solve('topic-recipient-routing', ([],'a','x',True,[])), [])
check('topic-recipient-routing scenario 3', solve('topic-recipient-routing', ([('a','x'),('a','y')],'a','y',False,['old'])), ['a'])
check('topic-recipient-routing scenario 4', solve('topic-recipient-routing', ([('a','x')],'z','x',True,[])), ['a'])
check('topic-recipient-routing scenario 5', solve('topic-recipient-routing', ([('a','x'),('b','y')],'b','z',True,['a','b'])), [])
check('topic-recipient-routing scenario 6', solve('topic-recipient-routing', ([('a','x'),('b','x')],'b','x',False,[])), ['a','b'])
check('unmounted-event-delivery scenario 1', solve('unmounted-event-delivery', ([('a','x'),('b','x'),('c','y')],'a','x',True,['old'+str(N)])), ['a','b'])
check('unmounted-event-delivery scenario 2', solve('unmounted-event-delivery', ([],'a','x',True,[])), [])
check('unmounted-event-delivery scenario 3', solve('unmounted-event-delivery', ([('a','x'),('a','y')],'a','y',False,['old'])), [])
check('unmounted-event-delivery scenario 4', solve('unmounted-event-delivery', ([('a','x')],'z','x',True,[])), ['a'])
check('unmounted-event-delivery scenario 5', solve('unmounted-event-delivery', ([('a','x'),('b','y')],'b','z',True,['a','b'])), [])
check('unmounted-event-delivery scenario 6', solve('unmounted-event-delivery', ([('a','x'),('b','x')],'b','x',False,[])), [])
check('last-listener-resource-close scenario 1', solve('last-listener-resource-close', ([('a','x'),('b','x'),('c','y')],'a','x',True,['old'+str(N)])), False)
check('last-listener-resource-close scenario 2', solve('last-listener-resource-close', ([],'a','x',True,[])), True)
check('last-listener-resource-close scenario 3', solve('last-listener-resource-close', ([('a','x'),('a','y')],'a','y',False,['old'])), True)
check('last-listener-resource-close scenario 4', solve('last-listener-resource-close', ([('a','x')],'z','x',True,[])), False)
check('last-listener-resource-close scenario 5', solve('last-listener-resource-close', ([('a','x'),('b','y')],'b','z',True,['a','b'])), False)
check('last-listener-resource-close scenario 6', solve('last-listener-resource-close', ([('a','x'),('b','x')],'b','x',False,[])), False)
check('registration-topic-index scenario 1', solve('registration-topic-index', ([('a','x'),('b','x'),('c','y')],'a','x',True,['old'+str(N)])), ['x','y'])
check('registration-topic-index scenario 2', solve('registration-topic-index', ([],'a','x',True,[])), [])
check('registration-topic-index scenario 3', solve('registration-topic-index', ([('a','x'),('a','y')],'a','y',False,['old'])), ['x','y'])
check('registration-topic-index scenario 4', solve('registration-topic-index', ([('a','x')],'z','x',True,[])), ['x'])
check('registration-topic-index scenario 5', solve('registration-topic-index', ([('a','x'),('b','y')],'b','z',True,['a','b'])), ['x','y'])
check('registration-topic-index scenario 6', solve('registration-topic-index', ([('a','x'),('b','x')],'b','x',False,[])), ['x'])
check('unmount-buffer-discard scenario 1', solve('unmount-buffer-discard', ([('a','x'),('b','x'),('c','y')],'a','x',True,['old'+str(N)])), ['old'+str(N)])
check('unmount-buffer-discard scenario 2', solve('unmount-buffer-discard', ([],'a','x',True,[])), [])
check('unmount-buffer-discard scenario 3', solve('unmount-buffer-discard', ([('a','x'),('a','y')],'a','y',False,['old'])), [])
check('unmount-buffer-discard scenario 4', solve('unmount-buffer-discard', ([('a','x')],'z','x',True,[])), [])
check('unmount-buffer-discard scenario 5', solve('unmount-buffer-discard', ([('a','x'),('b','y')],'b','z',True,['a','b'])), ['a','b'])
check('unmount-buffer-discard scenario 6', solve('unmount-buffer-discard', ([('a','x'),('b','x')],'b','x',False,[])), [])
check('buffered-delivery-order scenario 1', solve('buffered-delivery-order', ([('a','x'),('b','x'),('c','y')],'a','x',True,['old'+str(N)])), ['old'+str(N),'x'])
check('buffered-delivery-order scenario 2', solve('buffered-delivery-order', ([],'a','x',True,[])), ['x'])
check('buffered-delivery-order scenario 3', solve('buffered-delivery-order', ([('a','x'),('a','y')],'a','y',False,['old'])), ['old','y'])
check('buffered-delivery-order scenario 4', solve('buffered-delivery-order', ([('a','x')],'z','x',True,[])), ['x'])
check('buffered-delivery-order scenario 5', solve('buffered-delivery-order', ([('a','x'),('b','y')],'b','z',True,['a','b'])), ['a','b','z'])
check('buffered-delivery-order scenario 6', solve('buffered-delivery-order', ([('a','x'),('b','x')],'b','x',False,[])), ['x'])
check('unknown-unsubscribe-noop scenario 1', solve('unknown-unsubscribe-noop', ([('a','x'),('b','x'),('c','y')],'a','x',True,['old'+str(N)])), False)
check('unknown-unsubscribe-noop scenario 2', solve('unknown-unsubscribe-noop', ([],'a','x',True,[])), True)
check('unknown-unsubscribe-noop scenario 3', solve('unknown-unsubscribe-noop', ([('a','x'),('a','y')],'a','y',False,['old'])), False)
check('unknown-unsubscribe-noop scenario 4', solve('unknown-unsubscribe-noop', ([('a','x')],'z','x',True,[])), True)
check('unknown-unsubscribe-noop scenario 5', solve('unknown-unsubscribe-noop', ([('a','x'),('b','y')],'b','z',True,['a','b'])), False)
check('unknown-unsubscribe-noop scenario 6', solve('unknown-unsubscribe-noop', ([('a','x'),('b','x')],'b','x',False,[])), False)
check('registration-removal-count scenario 1', solve('registration-removal-count', ([('a','x'),('b','x'),('c','y')],'a','x',True,['old'+str(N)])), 1)
check('registration-removal-count scenario 2', solve('registration-removal-count', ([],'a','x',True,[])), 0)
check('registration-removal-count scenario 3', solve('registration-removal-count', ([('a','x'),('a','y')],'a','y',False,['old'])), 2)
check('registration-removal-count scenario 4', solve('registration-removal-count', ([('a','x')],'z','x',True,[])), 0)
check('registration-removal-count scenario 5', solve('registration-removal-count', ([('a','x'),('b','y')],'b','z',True,['a','b'])), 1)
check('registration-removal-count scenario 6', solve('registration-removal-count', ([('a','x'),('b','x')],'b','x',False,[])), 1)
check('remaining-topic-reference-count scenario 1', solve('remaining-topic-reference-count', ([('a','x'),('b','x'),('c','y')],'a','x',True,['old'+str(N)])), 1)
check('remaining-topic-reference-count scenario 2', solve('remaining-topic-reference-count', ([],'a','x',True,[])), 0)
check('remaining-topic-reference-count scenario 3', solve('remaining-topic-reference-count', ([('a','x'),('a','y')],'a','y',False,['old'])), 0)
check('remaining-topic-reference-count scenario 4', solve('remaining-topic-reference-count', ([('a','x')],'z','x',True,[])), 1)
check('remaining-topic-reference-count scenario 5', solve('remaining-topic-reference-count', ([('a','x'),('b','y')],'b','z',True,['a','b'])), 0)
check('remaining-topic-reference-count scenario 6', solve('remaining-topic-reference-count', ([('a','x'),('b','x')],'b','x',False,[])), 1)
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
unsubscribe-by-registration scenario 1[['b', 'x'], ['c', 'y']][['b', 'x'], ['c', 'y']]Passed
unsubscribe-by-registration scenario 2[][]Passed
unsubscribe-by-registration scenario 3[][]Passed
unsubscribe-by-registration scenario 4[['a', 'x']][['a', 'x']]Passed
unsubscribe-by-registration scenario 5[['a', 'x']][['a', 'x']]Passed
unsubscribe-by-registration scenario 6[['a', 'x']][['a', 'x']]Passed
topic-recipient-routing scenario 1['a', 'b']['a', 'b']Passed
topic-recipient-routing scenario 2[][]Passed
topic-recipient-routing scenario 3['a']['a']Passed
topic-recipient-routing scenario 4['a']['a']Passed
topic-recipient-routing scenario 5[][]Passed
topic-recipient-routing scenario 6['a', 'b']['a', 'b']Passed
unmounted-event-delivery scenario 1['a', 'b']['a', 'b']Passed
unmounted-event-delivery scenario 2[][]Passed
unmounted-event-delivery scenario 3[][]Passed
unmounted-event-delivery scenario 4['a']['a']Passed
unmounted-event-delivery scenario 5[][]Passed
unmounted-event-delivery scenario 6[][]Passed
last-listener-resource-close scenario 1FalseFalsePassed
last-listener-resource-close scenario 2TrueTruePassed
last-listener-resource-close scenario 3TrueTruePassed
last-listener-resource-close scenario 4FalseFalsePassed
last-listener-resource-close scenario 5FalseFalsePassed
last-listener-resource-close scenario 6FalseFalsePassed
registration-topic-index scenario 1['x', 'y']['x', 'y']Passed
registration-topic-index scenario 2[][]Passed
registration-topic-index scenario 3['x', 'y']['x', 'y']Passed
registration-topic-index scenario 4['x']['x']Passed
registration-topic-index scenario 5['x', 'y']['x', 'y']Passed
registration-topic-index scenario 6['x']['x']Passed
unmount-buffer-discard scenario 1['old1']['old1']Passed
unmount-buffer-discard scenario 2[][]Passed
unmount-buffer-discard scenario 3[][]Passed
unmount-buffer-discard scenario 4[][]Passed
unmount-buffer-discard scenario 5['a', 'b']['a', 'b']Passed
unmount-buffer-discard scenario 6[][]Passed
buffered-delivery-order scenario 1['x']['old1', 'x']Failed
buffered-delivery-order scenario 2['x']['x']Passed
buffered-delivery-order scenario 3['y']['old', 'y']Failed
buffered-delivery-order scenario 4['x']['x']Passed
buffered-delivery-order scenario 5['z']['a', 'b', 'z']Failed
buffered-delivery-order scenario 6['x']['x']Passed
unknown-unsubscribe-noop scenario 1FalseFalsePassed
unknown-unsubscribe-noop scenario 2TrueTruePassed
unknown-unsubscribe-noop scenario 3FalseFalsePassed
unknown-unsubscribe-noop scenario 4TrueTruePassed
unknown-unsubscribe-noop scenario 5FalseFalsePassed
unknown-unsubscribe-noop scenario 6FalseFalsePassed
registration-removal-count scenario 111Passed
registration-removal-count scenario 200Passed
registration-removal-count scenario 322Passed
registration-removal-count scenario 400Passed
registration-removal-count scenario 511Passed
registration-removal-count scenario 611Passed
remaining-topic-reference-count scenario 111Passed
remaining-topic-reference-count scenario 200Passed
remaining-topic-reference-count scenario 300Passed
remaining-topic-reference-count scenario 411Passed
remaining-topic-reference-count scenario 500Passed
remaining-topic-reference-count scenario 611Passed

SHA-256 / 363ff55656d09b2aa1b2c45870ae5d6d58b56b69186bb93a3c43d8bd25c25628

3 / The verified repair

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

N = 1
observations = []
def solve(operation, s):
    registrations, removed, event, mounted, buffered = s
    if operation == 'unsubscribe-by-registration':
        return [(k,t) for k,t in registrations if k!=removed]
    if operation == 'topic-recipient-routing':
        return [k for k,t in registrations if t==event]
    if operation == 'unmounted-event-delivery':
        return [k for k,t in registrations if t==event] if mounted else []
    if operation == 'last-listener-resource-close':
        return not any(k!=removed for k,t in registrations)
    if operation == 'registration-topic-index':
        return sorted({t for k,t in registrations})
    if operation == 'unmount-buffer-discard':
        return buffered if mounted else []
    if operation == 'buffered-delivery-order':
        return buffered+[event]
    if operation == 'unknown-unsubscribe-noop':
        return removed not in [k for k,t in registrations]
    if operation == 'registration-removal-count':
        return sum(k==removed for k,t in registrations)
    if operation == 'remaining-topic-reference-count':
        return sum(t==event and k!=removed for k,t in registrations)
    raise ValueError('unknown modeled operation')
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('unsubscribe-by-registration scenario 1', solve('unsubscribe-by-registration', ([('a','x'),('b','x'),('c','y')],'a','x',True,['old'+str(N)])), [('b','x'),('c','y')])
check('unsubscribe-by-registration scenario 2', solve('unsubscribe-by-registration', ([],'a','x',True,[])), [])
check('unsubscribe-by-registration scenario 3', solve('unsubscribe-by-registration', ([('a','x'),('a','y')],'a','y',False,['old'])), [])
check('unsubscribe-by-registration scenario 4', solve('unsubscribe-by-registration', ([('a','x')],'z','x',True,[])), [('a','x')])
check('unsubscribe-by-registration scenario 5', solve('unsubscribe-by-registration', ([('a','x'),('b','y')],'b','z',True,['a','b'])), [('a','x')])
check('unsubscribe-by-registration scenario 6', solve('unsubscribe-by-registration', ([('a','x'),('b','x')],'b','x',False,[])), [('a','x')])
check('topic-recipient-routing scenario 1', solve('topic-recipient-routing', ([('a','x'),('b','x'),('c','y')],'a','x',True,['old'+str(N)])), ['a','b'])
check('topic-recipient-routing scenario 2', solve('topic-recipient-routing', ([],'a','x',True,[])), [])
check('topic-recipient-routing scenario 3', solve('topic-recipient-routing', ([('a','x'),('a','y')],'a','y',False,['old'])), ['a'])
check('topic-recipient-routing scenario 4', solve('topic-recipient-routing', ([('a','x')],'z','x',True,[])), ['a'])
check('topic-recipient-routing scenario 5', solve('topic-recipient-routing', ([('a','x'),('b','y')],'b','z',True,['a','b'])), [])
check('topic-recipient-routing scenario 6', solve('topic-recipient-routing', ([('a','x'),('b','x')],'b','x',False,[])), ['a','b'])
check('unmounted-event-delivery scenario 1', solve('unmounted-event-delivery', ([('a','x'),('b','x'),('c','y')],'a','x',True,['old'+str(N)])), ['a','b'])
check('unmounted-event-delivery scenario 2', solve('unmounted-event-delivery', ([],'a','x',True,[])), [])
check('unmounted-event-delivery scenario 3', solve('unmounted-event-delivery', ([('a','x'),('a','y')],'a','y',False,['old'])), [])
check('unmounted-event-delivery scenario 4', solve('unmounted-event-delivery', ([('a','x')],'z','x',True,[])), ['a'])
check('unmounted-event-delivery scenario 5', solve('unmounted-event-delivery', ([('a','x'),('b','y')],'b','z',True,['a','b'])), [])
check('unmounted-event-delivery scenario 6', solve('unmounted-event-delivery', ([('a','x'),('b','x')],'b','x',False,[])), [])
check('last-listener-resource-close scenario 1', solve('last-listener-resource-close', ([('a','x'),('b','x'),('c','y')],'a','x',True,['old'+str(N)])), False)
check('last-listener-resource-close scenario 2', solve('last-listener-resource-close', ([],'a','x',True,[])), True)
check('last-listener-resource-close scenario 3', solve('last-listener-resource-close', ([('a','x'),('a','y')],'a','y',False,['old'])), True)
check('last-listener-resource-close scenario 4', solve('last-listener-resource-close', ([('a','x')],'z','x',True,[])), False)
check('last-listener-resource-close scenario 5', solve('last-listener-resource-close', ([('a','x'),('b','y')],'b','z',True,['a','b'])), False)
check('last-listener-resource-close scenario 6', solve('last-listener-resource-close', ([('a','x'),('b','x')],'b','x',False,[])), False)
check('registration-topic-index scenario 1', solve('registration-topic-index', ([('a','x'),('b','x'),('c','y')],'a','x',True,['old'+str(N)])), ['x','y'])
check('registration-topic-index scenario 2', solve('registration-topic-index', ([],'a','x',True,[])), [])
check('registration-topic-index scenario 3', solve('registration-topic-index', ([('a','x'),('a','y')],'a','y',False,['old'])), ['x','y'])
check('registration-topic-index scenario 4', solve('registration-topic-index', ([('a','x')],'z','x',True,[])), ['x'])
check('registration-topic-index scenario 5', solve('registration-topic-index', ([('a','x'),('b','y')],'b','z',True,['a','b'])), ['x','y'])
check('registration-topic-index scenario 6', solve('registration-topic-index', ([('a','x'),('b','x')],'b','x',False,[])), ['x'])
check('unmount-buffer-discard scenario 1', solve('unmount-buffer-discard', ([('a','x'),('b','x'),('c','y')],'a','x',True,['old'+str(N)])), ['old'+str(N)])
check('unmount-buffer-discard scenario 2', solve('unmount-buffer-discard', ([],'a','x',True,[])), [])
check('unmount-buffer-discard scenario 3', solve('unmount-buffer-discard', ([('a','x'),('a','y')],'a','y',False,['old'])), [])
check('unmount-buffer-discard scenario 4', solve('unmount-buffer-discard', ([('a','x')],'z','x',True,[])), [])
check('unmount-buffer-discard scenario 5', solve('unmount-buffer-discard', ([('a','x'),('b','y')],'b','z',True,['a','b'])), ['a','b'])
check('unmount-buffer-discard scenario 6', solve('unmount-buffer-discard', ([('a','x'),('b','x')],'b','x',False,[])), [])
check('buffered-delivery-order scenario 1', solve('buffered-delivery-order', ([('a','x'),('b','x'),('c','y')],'a','x',True,['old'+str(N)])), ['old'+str(N),'x'])
check('buffered-delivery-order scenario 2', solve('buffered-delivery-order', ([],'a','x',True,[])), ['x'])
check('buffered-delivery-order scenario 3', solve('buffered-delivery-order', ([('a','x'),('a','y')],'a','y',False,['old'])), ['old','y'])
check('buffered-delivery-order scenario 4', solve('buffered-delivery-order', ([('a','x')],'z','x',True,[])), ['x'])
check('buffered-delivery-order scenario 5', solve('buffered-delivery-order', ([('a','x'),('b','y')],'b','z',True,['a','b'])), ['a','b','z'])
check('buffered-delivery-order scenario 6', solve('buffered-delivery-order', ([('a','x'),('b','x')],'b','x',False,[])), ['x'])
check('unknown-unsubscribe-noop scenario 1', solve('unknown-unsubscribe-noop', ([('a','x'),('b','x'),('c','y')],'a','x',True,['old'+str(N)])), False)
check('unknown-unsubscribe-noop scenario 2', solve('unknown-unsubscribe-noop', ([],'a','x',True,[])), True)
check('unknown-unsubscribe-noop scenario 3', solve('unknown-unsubscribe-noop', ([('a','x'),('a','y')],'a','y',False,['old'])), False)
check('unknown-unsubscribe-noop scenario 4', solve('unknown-unsubscribe-noop', ([('a','x')],'z','x',True,[])), True)
check('unknown-unsubscribe-noop scenario 5', solve('unknown-unsubscribe-noop', ([('a','x'),('b','y')],'b','z',True,['a','b'])), False)
check('unknown-unsubscribe-noop scenario 6', solve('unknown-unsubscribe-noop', ([('a','x'),('b','x')],'b','x',False,[])), False)
check('registration-removal-count scenario 1', solve('registration-removal-count', ([('a','x'),('b','x'),('c','y')],'a','x',True,['old'+str(N)])), 1)
check('registration-removal-count scenario 2', solve('registration-removal-count', ([],'a','x',True,[])), 0)
check('registration-removal-count scenario 3', solve('registration-removal-count', ([('a','x'),('a','y')],'a','y',False,['old'])), 2)
check('registration-removal-count scenario 4', solve('registration-removal-count', ([('a','x')],'z','x',True,[])), 0)
check('registration-removal-count scenario 5', solve('registration-removal-count', ([('a','x'),('b','y')],'b','z',True,['a','b'])), 1)
check('registration-removal-count scenario 6', solve('registration-removal-count', ([('a','x'),('b','x')],'b','x',False,[])), 1)
check('remaining-topic-reference-count scenario 1', solve('remaining-topic-reference-count', ([('a','x'),('b','x'),('c','y')],'a','x',True,['old'+str(N)])), 1)
check('remaining-topic-reference-count scenario 2', solve('remaining-topic-reference-count', ([],'a','x',True,[])), 0)
check('remaining-topic-reference-count scenario 3', solve('remaining-topic-reference-count', ([('a','x'),('a','y')],'a','y',False,['old'])), 0)
check('remaining-topic-reference-count scenario 4', solve('remaining-topic-reference-count', ([('a','x')],'z','x',True,[])), 1)
check('remaining-topic-reference-count scenario 5', solve('remaining-topic-reference-count', ([('a','x'),('b','y')],'b','z',True,['a','b'])), 0)
check('remaining-topic-reference-count scenario 6', solve('remaining-topic-reference-count', ([('a','x'),('b','x')],'b','x',False,[])), 1)
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
unsubscribe-by-registration scenario 1[['b', 'x'], ['c', 'y']][['b', 'x'], ['c', 'y']]Passed
unsubscribe-by-registration scenario 2[][]Passed
unsubscribe-by-registration scenario 3[][]Passed
unsubscribe-by-registration scenario 4[['a', 'x']][['a', 'x']]Passed
unsubscribe-by-registration scenario 5[['a', 'x']][['a', 'x']]Passed
unsubscribe-by-registration scenario 6[['a', 'x']][['a', 'x']]Passed
topic-recipient-routing scenario 1['a', 'b']['a', 'b']Passed
topic-recipient-routing scenario 2[][]Passed
topic-recipient-routing scenario 3['a']['a']Passed
topic-recipient-routing scenario 4['a']['a']Passed
topic-recipient-routing scenario 5[][]Passed
topic-recipient-routing scenario 6['a', 'b']['a', 'b']Passed
unmounted-event-delivery scenario 1['a', 'b']['a', 'b']Passed
unmounted-event-delivery scenario 2[][]Passed
unmounted-event-delivery scenario 3[][]Passed
unmounted-event-delivery scenario 4['a']['a']Passed
unmounted-event-delivery scenario 5[][]Passed
unmounted-event-delivery scenario 6[][]Passed
last-listener-resource-close scenario 1FalseFalsePassed
last-listener-resource-close scenario 2TrueTruePassed
last-listener-resource-close scenario 3TrueTruePassed
last-listener-resource-close scenario 4FalseFalsePassed
last-listener-resource-close scenario 5FalseFalsePassed
last-listener-resource-close scenario 6FalseFalsePassed
registration-topic-index scenario 1['x', 'y']['x', 'y']Passed
registration-topic-index scenario 2[][]Passed
registration-topic-index scenario 3['x', 'y']['x', 'y']Passed
registration-topic-index scenario 4['x']['x']Passed
registration-topic-index scenario 5['x', 'y']['x', 'y']Passed
registration-topic-index scenario 6['x']['x']Passed
unmount-buffer-discard scenario 1['old1']['old1']Passed
unmount-buffer-discard scenario 2[][]Passed
unmount-buffer-discard scenario 3[][]Passed
unmount-buffer-discard scenario 4[][]Passed
unmount-buffer-discard scenario 5['a', 'b']['a', 'b']Passed
unmount-buffer-discard scenario 6[][]Passed
buffered-delivery-order scenario 1['old1', 'x']['old1', 'x']Passed
buffered-delivery-order scenario 2['x']['x']Passed
buffered-delivery-order scenario 3['old', 'y']['old', 'y']Passed
buffered-delivery-order scenario 4['x']['x']Passed
buffered-delivery-order scenario 5['a', 'b', 'z']['a', 'b', 'z']Passed
buffered-delivery-order scenario 6['x']['x']Passed
unknown-unsubscribe-noop scenario 1FalseFalsePassed
unknown-unsubscribe-noop scenario 2TrueTruePassed
unknown-unsubscribe-noop scenario 3FalseFalsePassed
unknown-unsubscribe-noop scenario 4TrueTruePassed
unknown-unsubscribe-noop scenario 5FalseFalsePassed
unknown-unsubscribe-noop scenario 6FalseFalsePassed
registration-removal-count scenario 111Passed
registration-removal-count scenario 200Passed
registration-removal-count scenario 322Passed
registration-removal-count scenario 400Passed
registration-removal-count scenario 511Passed
registration-removal-count scenario 611Passed
remaining-topic-reference-count scenario 111Passed
remaining-topic-reference-count scenario 200Passed
remaining-topic-reference-count scenario 300Passed
remaining-topic-reference-count scenario 411Passed
remaining-topic-reference-count scenario 500Passed
remaining-topic-reference-count scenario 611Passed

SHA-256 / 022e0cc47bdb2bf8d37fe3052c321be8797849fb64de9a5fb88d79d9f97f7fee

Verification & scope

Only the explicitly specified operations and finite deterministic records are modeled; no browser or framework conformance is claimed. This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:40:52.452814+00:00.

Case digest / 526189d69a50d5f6a526d5b96ffb37191944c0815186c9bb243d9185f83a8a8b