{"abstract":"The partition rebalance operation is admitted even though a partition is assigned to a consumer not subscribed to its topic.","category":"Queues","checks":9,"contract":"Return a Boolean admission decision for assign a partition during consumer rebalance. The record r must satisfy all of: r['revocation_complete'] is True; r['assignment_epoch'][0] > r['assignment_epoch'][1]; r['checkpoint_available'] is not None; r['subscription_match'][0] in r['subscription_match'][1]; r['capacity_limit'][0]+r['capacity_limit'][1] <= r['capacity_limit'][2]. Extra tracing fields are ignored; validation does not mutate the record.","evaluation_group":"xd-partition-rebalance","failed_approach":"Adding the subscription match check repairs the reported defect, but replacing the adjacent capacity limit check loses that independent invariant.","family":"xd-partition-rebalance-subscription_match","id":"FA-866","implementations":{"attempt":{"sha256":"11ab052e02677112a7d4c04e63964216cc0f0018716c1a2a1edd50c6565d96a9","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(r):\n    return (r['revocation_complete'] is True) and (r['assignment_epoch'][0] > r['assignment_epoch'][1]) and (r['checkpoint_available'] is not None) and (r['subscription_match'][0] in r['subscription_match'][1])\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nr = {'revocation_complete': True, 'assignment_epoch': [5, 4], 'checkpoint_available': 0, 'subscription_match': ['orders', ['orders', 'audit']], 'capacity_limit': [2, 1, 3]}\ncheck('valid operation', solve(r), True)\ncheck('The new consumer starts while the old owner remains active', solve(dict(r, **{'revocation_complete': False})), False)\ncheck('A stale rebalance overwrites a newer assignment', solve(dict(r, **{'assignment_epoch': [4, 4]})), False)\ncheck('A new owner starts without the last committed checkpoint', solve(dict(r, **{'checkpoint_available': None})), False)\ncheck('A partition is assigned to a consumer not subscribed to its topic', solve(dict(r, **{'subscription_match': ['events', ['orders', 'audit']]})), False)\ncheck('Rebalance exceeds the new owner partition capacity', solve(dict(r, **{'capacity_limit': [3, 1, 3]})), False)\ncheck('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)\ncheck('repeat validation is pure', solve(r), True)\ninvalid = {'revocation_complete': False, 'assignment_epoch': [4, 4], 'checkpoint_available': None, 'subscription_match': ['events', ['orders', 'audit']], 'capacity_limit': [3, 1, 3]}\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":"7e10b209168d847978a595d5167b3965d613ed8d9f71cf77a5f3f58f655dbed7","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(r):\n    return (r['revocation_complete'] is True) and (r['assignment_epoch'][0] > r['assignment_epoch'][1]) and (r['checkpoint_available'] is not None) and (r['capacity_limit'][0]+r['capacity_limit'][1] <= r['capacity_limit'][2])\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nr = {'revocation_complete': True, 'assignment_epoch': [5, 4], 'checkpoint_available': 0, 'subscription_match': ['orders', ['orders', 'audit']], 'capacity_limit': [2, 1, 3]}\ncheck('valid operation', solve(r), True)\ncheck('The new consumer starts while the old owner remains active', solve(dict(r, **{'revocation_complete': False})), False)\ncheck('A stale rebalance overwrites a newer assignment', solve(dict(r, **{'assignment_epoch': [4, 4]})), False)\ncheck('A new owner starts without the last committed checkpoint', solve(dict(r, **{'checkpoint_available': None})), False)\ncheck('A partition is assigned to a consumer not subscribed to its topic', solve(dict(r, **{'subscription_match': ['events', ['orders', 'audit']]})), False)\ncheck('Rebalance exceeds the new owner partition capacity', solve(dict(r, **{'capacity_limit': [3, 1, 3]})), False)\ncheck('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)\ncheck('repeat validation is pure', solve(r), True)\ninvalid = {'revocation_complete': False, 'assignment_epoch': [4, 4], 'checkpoint_available': None, 'subscription_match': ['events', ['orders', 'audit']], 'capacity_limit': [3, 1, 3]}\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":"7d049ff4b1891d50172e768c799b4830d80ca93d772ad441aa2e21045ded88b5","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(r):\n    return (r['revocation_complete'] is True) and (r['assignment_epoch'][0] > r['assignment_epoch'][1]) and (r['checkpoint_available'] is not None) and (r['subscription_match'][0] in r['subscription_match'][1]) and (r['capacity_limit'][0]+r['capacity_limit'][1] <= r['capacity_limit'][2])\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nr = {'revocation_complete': True, 'assignment_epoch': [5, 4], 'checkpoint_available': 0, 'subscription_match': ['orders', ['orders', 'audit']], 'capacity_limit': [2, 1, 3]}\ncheck('valid operation', solve(r), True)\ncheck('The new consumer starts while the old owner remains active', solve(dict(r, **{'revocation_complete': False})), False)\ncheck('A stale rebalance overwrites a newer assignment', solve(dict(r, **{'assignment_epoch': [4, 4]})), False)\ncheck('A new owner starts without the last committed checkpoint', solve(dict(r, **{'checkpoint_available': None})), False)\ncheck('A partition is assigned to a consumer not subscribed to its topic', solve(dict(r, **{'subscription_match': ['events', ['orders', 'audit']]})), False)\ncheck('Rebalance exceeds the new owner partition capacity', solve(dict(r, **{'capacity_limit': [3, 1, 3]})), False)\ncheck('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)\ncheck('repeat validation is pure', solve(r), True)\ninvalid = {'revocation_complete': False, 'assignment_epoch': [4, 4], 'checkpoint_available': None, 'subscription_match': ['events', ['orders', 'audit']], 'capacity_limit': [3, 1, 3]}\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-partition-rebalance-subscription_match","generated_at":"2026-09-29T14:36:56.559599+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic local contract for queues. Each negative fixture violates exactly one invariant. No transport timing, persistence, cryptographic verification, or full protocol implementation is claimed.","repair":"Require r['subscription_match'][0] in r['subscription_match'][1] together with every other stated precondition before accepting the operation.","root_cause":"The admission path omits the subscription match invariant while validating the other operation preconditions.","sha256":"f8b8a4f554e76f4f9e946e6e57941138c174f0f723787edb4b9478cca81d5778","title":"Assign a partition during consumer rebalance: A partition is assigned to a consumer not subscribed to its topic · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":32.902,"exit_code":1,"observations":[{"actual":true,"check":"valid operation","expected":true,"passed":true},{"actual":false,"check":"The new consumer starts while the old owner remains active","expected":false,"passed":true},{"actual":false,"check":"A stale rebalance overwrites a newer assignment","expected":false,"passed":true},{"actual":false,"check":"A new owner starts without the last committed checkpoint","expected":false,"passed":true},{"actual":false,"check":"A partition is assigned to a consumer not subscribed to its topic","expected":false,"passed":true},{"actual":true,"check":"Rebalance exceeds the new owner partition capacity","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\": \"The new consumer starts while the old owner remains active\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"A stale rebalance overwrites a newer assignment\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"A new owner starts without the last committed checkpoint\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"A partition is assigned to a consumer not subscribed to its topic\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"Rebalance exceeds the new owner partition capacity\", \"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"},"broken":{"elapsed_ms":31.95,"exit_code":1,"observations":[{"actual":true,"check":"valid operation","expected":true,"passed":true},{"actual":false,"check":"The new consumer starts while the old owner remains active","expected":false,"passed":true},{"actual":false,"check":"A stale rebalance overwrites a newer assignment","expected":false,"passed":true},{"actual":false,"check":"A new owner starts without the last committed checkpoint","expected":false,"passed":true},{"actual":true,"check":"A partition is assigned to a consumer not subscribed to its topic","expected":false,"passed":false},{"actual":false,"check":"Rebalance exceeds the new owner partition capacity","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\": \"The new consumer starts while the old owner remains active\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"A stale rebalance overwrites a newer assignment\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"A new owner starts without the last committed checkpoint\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"A partition is assigned to a consumer not subscribed to its topic\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"Rebalance exceeds the new owner partition capacity\", \"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":29.814,"exit_code":0,"observations":[{"actual":true,"check":"valid operation","expected":true,"passed":true},{"actual":false,"check":"The new consumer starts while the old owner remains active","expected":false,"passed":true},{"actual":false,"check":"A stale rebalance overwrites a newer assignment","expected":false,"passed":true},{"actual":false,"check":"A new owner starts without the last committed checkpoint","expected":false,"passed":true},{"actual":false,"check":"A partition is assigned to a consumer not subscribed to its topic","expected":false,"passed":true},{"actual":false,"check":"Rebalance exceeds the new owner partition capacity","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\": \"The new consumer starts while the old owner remains active\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"A stale rebalance overwrites a newer assignment\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"A new owner starts without the last committed checkpoint\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"A partition is assigned to a consumer not subscribed to its topic\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"Rebalance exceeds the new owner partition capacity\", \"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"}