{"abstract":"The append log operation is admitted even though conflict truncation removes a committed entry.","category":"Consensus","checks":9,"contract":"Return a Boolean admission decision for admit a leader log append. The record r must satisfy all of: r['leader_term'][0] >= r['leader_term'][1]; r['prefix_exists'][0] <= r['prefix_exists'][1]; r['prefix_term'][0] == r['prefix_term'][1]; r['commit_protected'][0] > r['commit_protected'][1]; r['contiguous_indexes'][1] == list(range(r['contiguous_indexes'][0]+1, r['contiguous_indexes'][0]+1+len(r['contiguous_indexes'][1]))). Extra tracing fields are ignored; validation does not mutate the record.","evaluation_group":"xd-append-log","failed_approach":"Adding the commit protected check repairs the reported defect, but replacing the adjacent contiguous indexes check loses that independent invariant.","family":"xd-append-log-commit_protected","id":"FA-441","implementations":{"attempt":{"sha256":"62e5b4f299981c746e2498402f76c5416073e85f825929e6d588a351d6e885c2","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(r):\n    return (r['leader_term'][0] >= r['leader_term'][1]) and (r['prefix_exists'][0] <= r['prefix_exists'][1]) and (r['prefix_term'][0] == r['prefix_term'][1]) and (r['commit_protected'][0] > r['commit_protected'][1])\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nr = {'leader_term': [5, 5], 'prefix_exists': [8, 8], 'prefix_term': [4, 4], 'commit_protected': [9, 8], 'contiguous_indexes': [8, [9, 10, 11]]}\ncheck('valid operation', solve(r), True)\ncheck('An old leader appends entries after a term change', solve(dict(r, **{'leader_term': [4, 5]})), False)\ncheck('An append references a missing predecessor index', solve(dict(r, **{'prefix_exists': [9, 8]})), False)\ncheck('An append attaches to a conflicting predecessor term', solve(dict(r, **{'prefix_term': [3, 4]})), False)\ncheck('Conflict truncation removes a committed entry', solve(dict(r, **{'commit_protected': [8, 8]})), False)\ncheck('Incoming log entries contain an index gap', solve(dict(r, **{'contiguous_indexes': [8, [9, 11]]})), False)\ncheck('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)\ncheck('repeat validation is pure', solve(r), True)\ninvalid = {'leader_term': [4, 5], 'prefix_exists': [9, 8], 'prefix_term': [3, 4], 'commit_protected': [8, 8], 'contiguous_indexes': [8, [9, 11]]}\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":"f3f562823de8bef1c7247d20bef81c8892871dc55e4a78d9922fd08c9e8a8b83","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(r):\n    return (r['leader_term'][0] >= r['leader_term'][1]) and (r['prefix_exists'][0] <= r['prefix_exists'][1]) and (r['prefix_term'][0] == r['prefix_term'][1]) and (r['contiguous_indexes'][1] == list(range(r['contiguous_indexes'][0]+1, r['contiguous_indexes'][0]+1+len(r['contiguous_indexes'][1]))))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nr = {'leader_term': [5, 5], 'prefix_exists': [8, 8], 'prefix_term': [4, 4], 'commit_protected': [9, 8], 'contiguous_indexes': [8, [9, 10, 11]]}\ncheck('valid operation', solve(r), True)\ncheck('An old leader appends entries after a term change', solve(dict(r, **{'leader_term': [4, 5]})), False)\ncheck('An append references a missing predecessor index', solve(dict(r, **{'prefix_exists': [9, 8]})), False)\ncheck('An append attaches to a conflicting predecessor term', solve(dict(r, **{'prefix_term': [3, 4]})), False)\ncheck('Conflict truncation removes a committed entry', solve(dict(r, **{'commit_protected': [8, 8]})), False)\ncheck('Incoming log entries contain an index gap', solve(dict(r, **{'contiguous_indexes': [8, [9, 11]]})), False)\ncheck('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)\ncheck('repeat validation is pure', solve(r), True)\ninvalid = {'leader_term': [4, 5], 'prefix_exists': [9, 8], 'prefix_term': [3, 4], 'commit_protected': [8, 8], 'contiguous_indexes': [8, [9, 11]]}\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":"5350b1bdc82529bb867eb2c75f9bb239c5ba62b89234776c879f0824a3b2919d","source":"\"\"\"Failure Map reference implementation. Python standard library only.\"\"\"\nimport json\n\nN = 1\nobservations = []\ndef solve(r):\n    return (r['leader_term'][0] >= r['leader_term'][1]) and (r['prefix_exists'][0] <= r['prefix_exists'][1]) and (r['prefix_term'][0] == r['prefix_term'][1]) and (r['commit_protected'][0] > r['commit_protected'][1]) and (r['contiguous_indexes'][1] == list(range(r['contiguous_indexes'][0]+1, r['contiguous_indexes'][0]+1+len(r['contiguous_indexes'][1]))))\ndef check(label, actual, expected):\n    observations.append({\"check\": label, \"actual\": actual, \"expected\": expected, \"passed\": actual == expected})\nr = {'leader_term': [5, 5], 'prefix_exists': [8, 8], 'prefix_term': [4, 4], 'commit_protected': [9, 8], 'contiguous_indexes': [8, [9, 10, 11]]}\ncheck('valid operation', solve(r), True)\ncheck('An old leader appends entries after a term change', solve(dict(r, **{'leader_term': [4, 5]})), False)\ncheck('An append references a missing predecessor index', solve(dict(r, **{'prefix_exists': [9, 8]})), False)\ncheck('An append attaches to a conflicting predecessor term', solve(dict(r, **{'prefix_term': [3, 4]})), False)\ncheck('Conflict truncation removes a committed entry', solve(dict(r, **{'commit_protected': [8, 8]})), False)\ncheck('Incoming log entries contain an index gap', solve(dict(r, **{'contiguous_indexes': [8, [9, 11]]})), False)\ncheck('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)\ncheck('repeat validation is pure', solve(r), True)\ninvalid = {'leader_term': [4, 5], 'prefix_exists': [9, 8], 'prefix_term': [3, 4], 'commit_protected': [8, 8], 'contiguous_indexes': [8, [9, 11]]}\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-append-log-commit_protected","generated_at":"2026-09-29T14:36:53.118349+00:00","license":"CC0-1.0","python":"3.12.14","seed":1,"split":"open-access"},"relevance":"A deterministic local contract for consensus. Each negative fixture violates exactly one invariant. No transport timing, persistence, cryptographic verification, or full protocol implementation is claimed.","repair":"Require r['commit_protected'][0] > r['commit_protected'][1] together with every other stated precondition before accepting the operation.","root_cause":"The admission path omits the commit protected invariant while validating the other operation preconditions.","sha256":"fa773da68d0e423e2fb9699bed7a52f660fb9399121fe203e2971d5a012225b2","title":"Admit a leader log append: Conflict truncation removes a committed entry · case 01","variant":1,"variant_policy":"Five numbered records share a model and may reuse boundary fixtures.","verification":{"attempt":{"elapsed_ms":38.777,"exit_code":1,"observations":[{"actual":true,"check":"valid operation","expected":true,"passed":true},{"actual":false,"check":"An old leader appends entries after a term change","expected":false,"passed":true},{"actual":false,"check":"An append references a missing predecessor index","expected":false,"passed":true},{"actual":false,"check":"An append attaches to a conflicting predecessor term","expected":false,"passed":true},{"actual":false,"check":"Conflict truncation removes a committed entry","expected":false,"passed":true},{"actual":true,"check":"Incoming log entries contain an index gap","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\": \"An old leader appends entries after a term change\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"An append references a missing predecessor index\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"An append attaches to a conflicting predecessor term\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"Conflict truncation removes a committed entry\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"Incoming log entries contain an index gap\", \"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":34.628,"exit_code":1,"observations":[{"actual":true,"check":"valid operation","expected":true,"passed":true},{"actual":false,"check":"An old leader appends entries after a term change","expected":false,"passed":true},{"actual":false,"check":"An append references a missing predecessor index","expected":false,"passed":true},{"actual":false,"check":"An append attaches to a conflicting predecessor term","expected":false,"passed":true},{"actual":true,"check":"Conflict truncation removes a committed entry","expected":false,"passed":false},{"actual":false,"check":"Incoming log entries contain an index gap","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\": \"An old leader appends entries after a term change\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"An append references a missing predecessor index\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"An append attaches to a conflicting predecessor term\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"Conflict truncation removes a committed entry\", \"actual\": true, \"expected\": false, \"passed\": false}, {\"check\": \"Incoming log entries contain an index gap\", \"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":34.792,"exit_code":0,"observations":[{"actual":true,"check":"valid operation","expected":true,"passed":true},{"actual":false,"check":"An old leader appends entries after a term change","expected":false,"passed":true},{"actual":false,"check":"An append references a missing predecessor index","expected":false,"passed":true},{"actual":false,"check":"An append attaches to a conflicting predecessor term","expected":false,"passed":true},{"actual":false,"check":"Conflict truncation removes a committed entry","expected":false,"passed":true},{"actual":false,"check":"Incoming log entries contain an index gap","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\": \"An old leader appends entries after a term change\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"An append references a missing predecessor index\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"An append attaches to a conflicting predecessor term\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"Conflict truncation removes a committed entry\", \"actual\": false, \"expected\": false, \"passed\": true}, {\"check\": \"Incoming log entries contain an index gap\", \"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"}