{"abstract":"The graceful drain operation is admitted even though shutdown completes while routing still advertises the instance.","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 registration removed check repairs the reported defect, but replacing the adjacent flush complete check loses that independent invariant.","family":"xd-graceful-drain-registration_removed","id":"FA-1061","implementations":{"attempt":{"sha256":"72bb81ee1b9f5a69f06e2e71f6b9196cedf98a4af5cad8252707f959c809cf77","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 (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":"131c092380d275fb96bcbe05f7c7670af77cbc05461e2cb16d6f72ae5a7d80bc","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['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"},"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-registration_removed","generated_at":"2026-09-29T14:36:58.509933+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 r['registration_removed'] is False together with every other stated precondition before accepting the operation.","root_cause":"The admission path omits the registration removed invariant while validating the other operation preconditions.","sha256":"c29a09c0c2f24144d9144b15b17b9ec7ab1294de8897d9f696f04771a2fc32c0","title":"Finish draining a service instance: Shutdown completes while routing still advertises the instance · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":30.303,"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":true,"check":"Shutdown discards buffered durable work","expected":false,"passed":false},{"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\": 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\": true, \"expected\": false, \"passed\": false}, {\"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.031,"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":true,"check":"Shutdown completes while routing still advertises the instance","expected":false,"passed":false},{"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\": 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\": true, \"expected\": false, \"passed\": false}, {\"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"},"fixed":{"elapsed_ms":31.67,"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"}