FA-1071 / Reliability / Open access
Finish draining a service instance: Shutdown abandons child workers holding resources · case 01
The graceful drain operation is admitted even though shutdown abandons child workers holding resources.
ROOT CAUSE
The admission path omits the children reaped invariant while validating the other operation preconditions.
VERIFIED REPAIR
Require all(r['children_reaped']) together with every other stated precondition before accepting the operation.
Unsuccessful approach: Adding the children reaped check repairs the reported defect, but replacing the adjacent new admission closed check loses that independent invariant.
Case contract
Return a Boolean admission decision for finish draining a service instance. The record r must satisfy all of: r['new_admission_closed'] is False; r['inflight_zero'] == 0; r['registration_removed'] is False; r['flush_complete'] is True; all(r['children_reaped']). Extra tracing fields are ignored; validation does not mutate the record.
Why this case matters
A deterministic local contract for reliability. Each negative fixture violates exactly one invariant. No transport timing, persistence, cryptographic verification, or full protocol implementation is claimed.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(r):
return (r['new_admission_closed'] is False) and (r['inflight_zero'] == 0) and (r['registration_removed'] is False) and (r['flush_complete'] is True)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'new_admission_closed': False, 'inflight_zero': 0, 'registration_removed': False, 'flush_complete': True, 'children_reaped': [True, True]}
check('valid operation', solve(r), True)
check('Shutdown still permits new work to enter', solve(dict(r, **{'new_admission_closed': True})), False)
check('Shutdown terminates in-flight requests prematurely', solve(dict(r, **{'inflight_zero': 1})), False)
check('Shutdown completes while routing still advertises the instance', solve(dict(r, **{'registration_removed': True})), False)
check('Shutdown discards buffered durable work', solve(dict(r, **{'flush_complete': False})), False)
check('Shutdown abandons child workers holding resources', solve(dict(r, **{'children_reaped': [True, False]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'new_admission_closed': True, 'inflight_zero': 1, 'registration_removed': True, 'flush_complete': False, 'children_reaped': [True, False]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| valid operation | True | True | Passed |
| Shutdown still permits new work to enter | False | False | Passed |
| Shutdown terminates in-flight requests prematurely | False | False | Passed |
| Shutdown completes while routing still advertises the instance | False | False | Passed |
| Shutdown discards buffered durable work | False | False | Passed |
| Shutdown abandons child workers holding resources | True | False | Failed |
| unrelated tracing metadata | True | True | Passed |
| repeat validation is pure | True | True | Passed |
| two independent violations in variant | False | False | Passed |
SHA-256 / 72ff106f9d98c428963c9edb50d698232465e147987ee1f576424cc438080af4
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(r):
return (r['inflight_zero'] == 0) and (r['registration_removed'] is False) and (r['flush_complete'] is True) and (all(r['children_reaped']))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'new_admission_closed': False, 'inflight_zero': 0, 'registration_removed': False, 'flush_complete': True, 'children_reaped': [True, True]}
check('valid operation', solve(r), True)
check('Shutdown still permits new work to enter', solve(dict(r, **{'new_admission_closed': True})), False)
check('Shutdown terminates in-flight requests prematurely', solve(dict(r, **{'inflight_zero': 1})), False)
check('Shutdown completes while routing still advertises the instance', solve(dict(r, **{'registration_removed': True})), False)
check('Shutdown discards buffered durable work', solve(dict(r, **{'flush_complete': False})), False)
check('Shutdown abandons child workers holding resources', solve(dict(r, **{'children_reaped': [True, False]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'new_admission_closed': True, 'inflight_zero': 1, 'registration_removed': True, 'flush_complete': False, 'children_reaped': [True, False]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| valid operation | True | True | Passed |
| Shutdown still permits new work to enter | True | False | Failed |
| Shutdown terminates in-flight requests prematurely | False | False | Passed |
| Shutdown completes while routing still advertises the instance | False | False | Passed |
| Shutdown discards buffered durable work | False | False | Passed |
| Shutdown abandons child workers holding resources | False | False | Passed |
| unrelated tracing metadata | True | True | Passed |
| repeat validation is pure | True | True | Passed |
| two independent violations in variant | False | False | Passed |
SHA-256 / b9a69cb9db42e86843fd981ed901a727f333c7e205894c02bbdd6aac333dcd8f
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(r):
return (r['new_admission_closed'] is False) and (r['inflight_zero'] == 0) and (r['registration_removed'] is False) and (r['flush_complete'] is True) and (all(r['children_reaped']))
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'new_admission_closed': False, 'inflight_zero': 0, 'registration_removed': False, 'flush_complete': True, 'children_reaped': [True, True]}
check('valid operation', solve(r), True)
check('Shutdown still permits new work to enter', solve(dict(r, **{'new_admission_closed': True})), False)
check('Shutdown terminates in-flight requests prematurely', solve(dict(r, **{'inflight_zero': 1})), False)
check('Shutdown completes while routing still advertises the instance', solve(dict(r, **{'registration_removed': True})), False)
check('Shutdown discards buffered durable work', solve(dict(r, **{'flush_complete': False})), False)
check('Shutdown abandons child workers holding resources', solve(dict(r, **{'children_reaped': [True, False]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'new_admission_closed': True, 'inflight_zero': 1, 'registration_removed': True, 'flush_complete': False, 'children_reaped': [True, False]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| valid operation | True | True | Passed |
| Shutdown still permits new work to enter | False | False | Passed |
| Shutdown terminates in-flight requests prematurely | False | False | Passed |
| Shutdown completes while routing still advertises the instance | False | False | Passed |
| Shutdown discards buffered durable work | False | False | Passed |
| Shutdown abandons child workers holding resources | False | False | Passed |
| unrelated tracing metadata | True | True | Passed |
| repeat validation is pure | True | True | Passed |
| two independent violations in variant | False | False | Passed |
SHA-256 / 650292b11afdedfeb927c183ceaa91bc1da76776d61ae01cd6a64070702fbc7f
Verification & scope
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:36:58.517395+00:00.
Case digest / 9ac5ff7e3431e1d12bf06587fdfb15680ae25e4ae2a17c52ca5dc50385c17b2d