FAILURE MAP
← Case archive

FA-23931 / Client state / Open access

Component subscription registration: Unmount buffer discard · case 01

Unmount buffer discard.

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

ROOT CAUSE

The unmount-buffer-discard client decision evaluates `buffered` instead of `buffered if mounted else []`.

VERIFIED REPAIR

Apply the modeled unmount-buffer-discard rule: `buffered if mounted else []`.

Unsuccessful approach: The partial repair `[]` 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 unmount-buffer-discard 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 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['old'][]Failed
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 / a7def92d6d95e4673a818ec0f6cb3d887f0bce09700a3ab695b9baf0649985bc

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 []
    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']Failed
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']Failed
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 / 99c7deb027f3ea300b38ed7e3dc0239b50b40f0c1ed18ee8f620a4ec7ac9650b

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

Case digest / 1822e40b35918fa3e881991b0ae43b31a7d2e802ab8b9a5bb670ba2917022e0f