{"abstract":"The graceful drain operation is admitted even though shutdown terminates in-flight requests prematurely.","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.","contract_signature":"r","evaluation_group":"xd-graceful-drain","failed_approach":"Adding the inflight zero check repairs the reported defect, but replacing the adjacent registration removed check loses that independent invariant.","family":"xd-graceful-drain-inflight_zero","id":"FA-1056","implementations":{"attempt":{"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"},"broken":{"sha256":"8a9a7751b3d8b8165ce6bcc11b85fe1d239bb679d1d4e65e743ef54c358fe119","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['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-inflight_zero","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.","root_cause":"The admission path omits the inflight zero invariant while validating the other operation preconditions.","sha256":"8cd943f70983c4d6b3534a255646baa0b8ff3a5afa24800a69aef51ef1429884","title":"Finish draining a service instance: Shutdown terminates in-flight requests prematurely · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verified":true,"visibility":"public","verification":{"attempt":{"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"},"broken":{"elapsed_ms":28.442,"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":true,"check":"Shutdown terminates in-flight requests prematurely","expected":false,"passed":false},{"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\": false, \"expected\": false, \"passed\": true}, {\"check\": \"Shutdown terminates in-flight requests prematurely\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"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"}},"member_only":{"stages":["fixed"],"fields":["implementations.fixed","verification.fixed","harness","repair"],"note":"The verified repair, its recorded checks, the repair description, and the scoring harness are available to members."}}