{"abstract":"The graceful drain operation is admitted even though shutdown abandons child workers holding resources.","category":"Reliability","checks":9,"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.","evaluation_group":"xd-graceful-drain","failed_approach":"Adding the children reaped check repairs the reported defect, but replacing the adjacent new admission closed check loses that independent invariant.","family":"xd-graceful-drain-children_reaped","id":"FA-1071","implementations":{"attempt":{"sha256":"b9a69cb9db42e86843fd981ed901a727f333c7e205894c02bbdd6aac333dcd8f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(r):\n    return (r['inflight_zero'] == 0) and (r['registration_removed'] is False) and (r['flush_complete'] is True) and (all(r['children_reaped']))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nr = {'new_admission_closed': False, 'inflight_zero': 0, 'registration_removed': False, 'flush_complete': True, 'children_reaped': [True, True]}\ncheck('valid operation', solve(r), True)\ncheck('Shutdown still permits new work to enter', solve(dict(r, **{'new_admission_closed': True})), False)\ncheck('Shutdown terminates in-flight requests prematurely', solve(dict(r, **{'inflight_zero': 1})), False)\ncheck('Shutdown completes while routing still advertises the instance', solve(dict(r, **{'registration_removed': True})), False)\ncheck('Shutdown discards buffered durable work', solve(dict(r, **{'flush_complete': False})), False)\ncheck('Shutdown abandons child workers holding resources', solve(dict(r, **{'children_reaped': [True, False]})), False)\ncheck('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)\ncheck('repeat validation is pure', solve(r), True)\ninvalid = {'new_admission_closed': True, 'inflight_zero': 1, 'registration_removed': True, 'flush_complete': False, 'children_reaped': [True, False]}\nkeys = list(invalid)\npair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}\ncheck('two independent violations in variant', solve(dict(r, **pair)), False)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"broken":{"sha256":"72ff106f9d98c428963c9edb50d698232465e147987ee1f576424cc438080af4","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(r):\n    return (r['new_admission_closed'] is False) and (r['inflight_zero'] == 0) and (r['registration_removed'] is False) and (r['flush_complete'] is True)\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nr = {'new_admission_closed': False, 'inflight_zero': 0, 'registration_removed': False, 'flush_complete': True, 'children_reaped': [True, True]}\ncheck('valid operation', solve(r), True)\ncheck('Shutdown still permits new work to enter', solve(dict(r, **{'new_admission_closed': True})), False)\ncheck('Shutdown terminates in-flight requests prematurely', solve(dict(r, **{'inflight_zero': 1})), False)\ncheck('Shutdown completes while routing still advertises the instance', solve(dict(r, **{'registration_removed': True})), False)\ncheck('Shutdown discards buffered durable work', solve(dict(r, **{'flush_complete': False})), False)\ncheck('Shutdown abandons child workers holding resources', solve(dict(r, **{'children_reaped': [True, False]})), False)\ncheck('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)\ncheck('repeat validation is pure', solve(r), True)\ninvalid = {'new_admission_closed': True, 'inflight_zero': 1, 'registration_removed': True, 'flush_complete': False, 'children_reaped': [True, False]}\nkeys = list(invalid)\npair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}\ncheck('two independent violations in variant', solve(dict(r, **pair)), False)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"},"fixed":{"sha256":"650292b11afdedfeb927c183ceaa91bc1da76776d61ae01cd6a64070702fbc7f","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(r):\n    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']))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nr = {'new_admission_closed': False, 'inflight_zero': 0, 'registration_removed': False, 'flush_complete': True, 'children_reaped': [True, True]}\ncheck('valid operation', solve(r), True)\ncheck('Shutdown still permits new work to enter', solve(dict(r, **{'new_admission_closed': True})), False)\ncheck('Shutdown terminates in-flight requests prematurely', solve(dict(r, **{'inflight_zero': 1})), False)\ncheck('Shutdown completes while routing still advertises the instance', solve(dict(r, **{'registration_removed': True})), False)\ncheck('Shutdown discards buffered durable work', solve(dict(r, **{'flush_complete': False})), False)\ncheck('Shutdown abandons child workers holding resources', solve(dict(r, **{'children_reaped': [True, False]})), False)\ncheck('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)\ncheck('repeat validation is pure', solve(r), True)\ninvalid = {'new_admission_closed': True, 'inflight_zero': 1, 'registration_removed': True, 'flush_complete': False, 'children_reaped': [True, False]}\nkeys = list(invalid)\npair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}\ncheck('two independent violations in variant', solve(dict(r, **pair)), False)\nprint(json.dumps({\"observations\": observations, \"passed\": all(x[\"passed\"] for x in observations)}, ensure_ascii=False))\nraise SystemExit(0 if all(x[\"passed\"] for x in observations) else 1)\n"}},"limitations":" 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.","method":"Deterministic executable model with adversarial boundary fixtures.","provenance":{"created_by":"Failure Map","dependencies":"Python standard library","family":"xd-graceful-drain-children_reaped","generated_at":"2026-09-29T14:36:58.517395+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"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.","repair":"Require all(r['children_reaped']) together with every other stated precondition before accepting the operation.","root_cause":"The admission path omits the children reaped invariant while validating the other operation preconditions.","sha256":"9ac5ff7e3431e1d12bf06587fdfb15680ae25e4ae2a17c52ca5dc50385c17b2d","title":"Finish draining a service instance: Shutdown abandons child workers holding resources · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":31.519,"exit_code":1,"observations":[{"actual":true,"check":"valid operation","expected":true,"passed":true},{"actual":true,"check":"Shutdown still permits new work to enter","expected":false,"passed":false},{"actual":false,"check":"Shutdown terminates in-flight requests prematurely","expected":false,"passed":true},{"actual":false,"check":"Shutdown completes while routing still advertises the instance","expected":false,"passed":true},{"actual":false,"check":"Shutdown discards buffered durable work","expected":false,"passed":true},{"actual":false,"check":"Shutdown abandons child workers holding resources","expected":false,"passed":true},{"actual":true,"check":"unrelated tracing metadata","expected":true,"passed":true},{"actual":true,"check":"repeat validation is pure","expected":true,"passed":true},{"actual":false,"check":"two independent violations in variant","expected":false,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"valid operation\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"Shutdown still permits new work to enter\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"Shutdown terminates in-flight requests prematurely\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"Shutdown completes while routing still advertises the instance\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"Shutdown discards buffered durable work\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"Shutdown abandons child workers holding resources\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"unrelated tracing metadata\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"repeat validation is pure\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"two independent violations in variant\", \"actual\": false, \"expected\": false, \"passed\": true}], \"passed\": false}\n"},"broken":{"elapsed_ms":34.211,"exit_code":1,"observations":[{"actual":true,"check":"valid operation","expected":true,"passed":true},{"actual":false,"check":"Shutdown still permits new work to enter","expected":false,"passed":true},{"actual":false,"check":"Shutdown terminates in-flight requests prematurely","expected":false,"passed":true},{"actual":false,"check":"Shutdown completes while routing still advertises the instance","expected":false,"passed":true},{"actual":false,"check":"Shutdown discards buffered durable work","expected":false,"passed":true},{"actual":true,"check":"Shutdown abandons child workers holding resources","expected":false,"passed":false},{"actual":true,"check":"unrelated tracing metadata","expected":true,"passed":true},{"actual":true,"check":"repeat validation is pure","expected":true,"passed":true},{"actual":false,"check":"two independent violations in variant","expected":false,"passed":true}],"passed":false,"stderr":"","stdout":"{\"observations\": [{\"check\": \"valid operation\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"Shutdown still permits new work to enter\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"Shutdown terminates in-flight requests prematurely\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"Shutdown completes while routing still advertises the instance\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"Shutdown discards buffered durable work\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"Shutdown abandons child workers holding resources\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"unrelated tracing metadata\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"repeat validation is pure\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"two independent violations in variant\", \"actual\": false, \"expected\": false, \"passed\": true}], \"passed\": false}\n"},"fixed":{"elapsed_ms":31.831,"exit_code":0,"observations":[{"actual":true,"check":"valid operation","expected":true,"passed":true},{"actual":false,"check":"Shutdown still permits new work to enter","expected":false,"passed":true},{"actual":false,"check":"Shutdown terminates in-flight requests prematurely","expected":false,"passed":true},{"actual":false,"check":"Shutdown completes while routing still advertises the instance","expected":false,"passed":true},{"actual":false,"check":"Shutdown discards buffered durable work","expected":false,"passed":true},{"actual":false,"check":"Shutdown abandons child workers holding resources","expected":false,"passed":true},{"actual":true,"check":"unrelated tracing metadata","expected":true,"passed":true},{"actual":true,"check":"repeat validation is pure","expected":true,"passed":true},{"actual":false,"check":"two independent violations in variant","expected":false,"passed":true}],"passed":true,"stderr":"","stdout":"{\"observations\": [{\"check\": \"valid operation\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"Shutdown still permits new work to enter\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"Shutdown terminates in-flight requests prematurely\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"Shutdown completes while routing still advertises the instance\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"Shutdown discards buffered durable work\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"Shutdown abandons child workers holding resources\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"unrelated tracing metadata\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"repeat validation is pure\", \"actual\": true, \"expected\": true, \"passed\": true}, {\"check\": \"two independent violations in variant\", \"actual\": false, \"expected\": false, \"passed\": true}], \"passed\": true}\n"}},"verified":true,"visibility":"public"}