FAILURE MAP
← Case archive

FA-24751 / Client state / Open access

Effect teardown stops after one disposer fails · case 01

Effect teardown stops after one disposer fails.

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

ROOT CAUSE

The faulty implementation violates Effect resources dispose in reverse registration order. Every disposer runs even when an earlier one fails; failure identities are reported in disposal order.

VERIFIED REPAIR

Effect resources dispose in reverse registration order. Every disposer runs even when an earlier one fails; failure identities are reported in disposal order.

Unsuccessful approach: The partial repair still violates at least one explicit regression oracle.

Case contract

Effect resources dispose in reverse registration order. Every disposer runs even when an earlier one fails; failure identities are reported in disposal order.

Why this case matters

A bounded offline client-state transition with explicit lifecycle inputs.

1 / The failure

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

N = 1
observations = []
def solve(disposers):
    done=[]; errors=[]
    for name,failed in reversed(disposers):
        done.append(name)
        if failed: errors.append(name); break
    return done,errors
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('failure does not stop', solve([('outer',False),('inner',True)]), (['inner','outer'],['inner']))
check('multiple failures', solve([('a',True),('b',True)]), (['b','a'],['b','a']))
check('normal lifo', solve([('a',False),('b',False)]), (['b','a'],[]))
check('none registered', solve([]), ([],[]))
check('one failed', solve([('a',True)]), (['a'],['a']))
check('parameterized stack', solve([(str(i),False) for i in range(N+2)]), ([str(i) for i in reversed(range(N+2))],[]))
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
failure does not stop[['inner'], ['inner']][['inner', 'outer'], ['inner']]Failed
multiple failures[['b'], ['b']][['b', 'a'], ['b', 'a']]Failed
normal lifo[['b', 'a'], []][['b', 'a'], []]Passed
none registered[[], []][[], []]Passed
one failed[['a'], ['a']][['a'], ['a']]Passed
parameterized stack[['2', '1', '0'], []][['2', '1', '0'], []]Passed

SHA-256 / 163b7bcd2cd0a08cb1de186a3b984136e889c9ae857f93ffb29d858d730a3eba

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(disposers):
    return [name for name,failed in disposers],[name for name,failed in disposers if failed]
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('failure does not stop', solve([('outer',False),('inner',True)]), (['inner','outer'],['inner']))
check('multiple failures', solve([('a',True),('b',True)]), (['b','a'],['b','a']))
check('normal lifo', solve([('a',False),('b',False)]), (['b','a'],[]))
check('none registered', solve([]), ([],[]))
check('one failed', solve([('a',True)]), (['a'],['a']))
check('parameterized stack', solve([(str(i),False) for i in range(N+2)]), ([str(i) for i in reversed(range(N+2))],[]))
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
failure does not stop[['outer', 'inner'], ['inner']][['inner', 'outer'], ['inner']]Failed
multiple failures[['a', 'b'], ['a', 'b']][['b', 'a'], ['b', 'a']]Failed
normal lifo[['a', 'b'], []][['b', 'a'], []]Failed
none registered[[], []][[], []]Passed
one failed[['a'], ['a']][['a'], ['a']]Passed
parameterized stack[['0', '1', '2'], []][['2', '1', '0'], []]Failed

SHA-256 / 0de901d363497ddfebe02243266dad4cc1576e86dead131843946715561e904d

3 / The verified repair

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

N = 1
observations = []
def solve(disposers):
    done=[]; errors=[]
    for name,failed in reversed(disposers):
        done.append(name)
        if failed: errors.append(name)
    return done,errors
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('failure does not stop', solve([('outer',False),('inner',True)]), (['inner','outer'],['inner']))
check('multiple failures', solve([('a',True),('b',True)]), (['b','a'],['b','a']))
check('normal lifo', solve([('a',False),('b',False)]), (['b','a'],[]))
check('none registered', solve([]), ([],[]))
check('one failed', solve([('a',True)]), (['a'],['a']))
check('parameterized stack', solve([(str(i),False) for i in range(N+2)]), ([str(i) for i in reversed(range(N+2))],[]))
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
failure does not stop[['inner', 'outer'], ['inner']][['inner', 'outer'], ['inner']]Passed
multiple failures[['b', 'a'], ['b', 'a']][['b', 'a'], ['b', 'a']]Passed
normal lifo[['b', 'a'], []][['b', 'a'], []]Passed
none registered[[], []][[], []]Passed
one failed[['a'], ['a']][['a'], ['a']]Passed
parameterized stack[['2', '1', '0'], []][['2', '1', '0'], []]Passed

SHA-256 / 4b6b4b38e845c927670760d8e07348efaac76eb1914aa89c05d5a7bd45d2d838

Verification & scope

This models the stated application policy only; 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:41:00.390234+00:00.

Case digest / e949d05e206a05d3ee0c8f436bb7e71a25c8d47394173cb6c8d945da380b7787