FAILURE MAP
← Case archive

FA-1491 / Concurrency / Open access

Resolve a prepared participant after recovery: Recovery reverses a previously recorded final decision · case 01

The prepared recovery operation is admitted even though recovery reverses a previously recorded final decision.

Verified by executionVariant 1 · 9 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The admission path omits the decision consistent invariant while validating the other operation preconditions.

THE FAILURE

The admission path omits the decision consistent invariant while validating the other operation preconditions.

Unsuccessful approach: Adding the decision consistent check repairs the reported defect, but replacing the adjacent locks retained check loses that independent invariant.

Case contract

Return a Boolean admission decision for resolve a prepared participant after recovery. The record r must satisfy all of: r['decision_known'] in ['commit','abort']; r['transaction_identity'][0] == r['transaction_identity'][1]; r['prepare_record'] is True; r['decision_consistent'][0] is None or r['decision_consistent'][0] == r['decision_consistent'][1]; set(r['locks_retained'][0]) <= set(r['locks_retained'][1]). Extra tracing fields are ignored; validation does not mutate the record.

Why this case matters

A deterministic local contract for concurrency. Each negative fixture violates exactly one invariant. No transport timing, persistence, cryptographic verification, or full protocol implementation is claimed.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (r['decision_known'] in ['commit','abort']) and (r['transaction_identity'][0] == r['transaction_identity'][1]) and (r['prepare_record'] is True) and (set(r['locks_retained'][0]) <= set(r['locks_retained'][1]))
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'decision_known': 'commit', 'transaction_identity': ['t2', 't2'], 'prepare_record': True, 'decision_consistent': ['commit', 'commit'], 'locks_retained': [['k1'], ['k1', 'k2']]}
check('valid operation', solve(r), True)
check('An uncertain participant guesses commit without evidence', solve(dict(r, **{'decision_known': 'unknown'})), False)
check('Recovery applies another transaction decision', solve(dict(r, **{'transaction_identity': ['t1', 't2']})), False)
check('Recovery commits a transaction with no durable prepare record', solve(dict(r, **{'prepare_record': False})), False)
check('Recovery reverses a previously recorded final decision', solve(dict(r, **{'decision_consistent': ['abort', 'commit']})), False)
check('Prepared data becomes visible after losing its write locks', solve(dict(r, **{'locks_retained': [['k1'], ['k2']]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'decision_known': 'unknown', 'transaction_identity': ['t1', 't2'], 'prepare_record': False, 'decision_consistent': ['abort', 'commit'], 'locks_retained': [['k1'], ['k2']]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
valid operationTrueTruePassed
An uncertain participant guesses commit without evidenceFalseFalsePassed
Recovery applies another transaction decisionFalseFalsePassed
Recovery commits a transaction with no durable prepare recordFalseFalsePassed
Recovery reverses a previously recorded final decisionTrueFalseFailed
Prepared data becomes visible after losing its write locksFalseFalsePassed
unrelated tracing metadataTrueTruePassed
repeat validation is pureTrueTruePassed
two independent violations in variantFalseFalsePassed

SHA-256 / 857cd0292306f1aa9fe5a17705f47ae578534cc6aab17fd9fe1c9c939010d92a

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json

N = 1
observations = []
def solve(r):
    return (r['decision_known'] in ['commit','abort']) and (r['transaction_identity'][0] == r['transaction_identity'][1]) and (r['prepare_record'] is True) and (r['decision_consistent'][0] is None or r['decision_consistent'][0] == r['decision_consistent'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'decision_known': 'commit', 'transaction_identity': ['t2', 't2'], 'prepare_record': True, 'decision_consistent': ['commit', 'commit'], 'locks_retained': [['k1'], ['k1', 'k2']]}
check('valid operation', solve(r), True)
check('An uncertain participant guesses commit without evidence', solve(dict(r, **{'decision_known': 'unknown'})), False)
check('Recovery applies another transaction decision', solve(dict(r, **{'transaction_identity': ['t1', 't2']})), False)
check('Recovery commits a transaction with no durable prepare record', solve(dict(r, **{'prepare_record': False})), False)
check('Recovery reverses a previously recorded final decision', solve(dict(r, **{'decision_consistent': ['abort', 'commit']})), False)
check('Prepared data becomes visible after losing its write locks', solve(dict(r, **{'locks_retained': [['k1'], ['k2']]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'decision_known': 'unknown', 'transaction_identity': ['t1', 't2'], 'prepare_record': False, 'decision_consistent': ['abort', 'commit'], 'locks_retained': [['k1'], ['k2']]}
keys = list(invalid)
pair = {keys[N % len(keys)]: invalid[keys[N % len(keys)]], keys[(N+1) % len(keys)]: invalid[keys[(N+1) % len(keys)]]}
check('two independent violations in variant', solve(dict(r, **pair)), False)
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
valid operationTrueTruePassed
An uncertain participant guesses commit without evidenceFalseFalsePassed
Recovery applies another transaction decisionFalseFalsePassed
Recovery commits a transaction with no durable prepare recordFalseFalsePassed
Recovery reverses a previously recorded final decisionFalseFalsePassed
Prepared data becomes visible after losing its write locksTrueFalseFailed
unrelated tracing metadataTrueTruePassed
repeat validation is pureTrueTruePassed
two independent violations in variantFalseFalsePassed

SHA-256 / ba468643603fecf0db0e6473449485f99ad0ff6b485df9531f5cdc0164d4a84c

HELD IN THE MEMBER ARCHIVE

The verified repair and its recorded checks are member-only.

This mechanism has 9 recorded checks per implementation. The open-access tier publishes the failure and the unsuccessful fix; the repaired source that passes every check, and the observations that prove it, are available to members.

Every case sharing this mechanism uses the same contract and the same repair, so this one record is held back for all of them.

Member access is invitation-based. Sign in with your invited account to inspect the repair.

Sign in to the archive ↗

Verification & scope

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.

Observations recorded using Python 3.12.14 at 2026-09-29T14:37:02.962759+00:00.

Case digest / 2ddd403e50b3884b047410898ca814d503eb0611116a60766b0a1e9abd55bead