FA-1221 / Workflow orchestration / Open access
Run a saga compensation action: A committed step has no recorded inverse operation · case 01
The saga compensation operation is admitted even though a committed step has no recorded inverse operation.
ROOT CAUSE
The admission path omits the compensation registered invariant while validating the other operation preconditions.
THE FAILURE
The admission path omits the compensation registered invariant while validating the other operation preconditions.
Unsuccessful approach: Adding the compensation registered check repairs the reported defect, but replacing the adjacent forward committed check loses that independent invariant.
Case contract
Return a Boolean admission decision for run a saga compensation action. The record r must satisfy all of: r['forward_committed'] is True; all(r['reverse_dependency']); r['compensation_identity'][0] not in r['compensation_identity'][1]; r['resource_version'][0] == r['resource_version'][1]; r['compensation_registered'] is not None. Extra tracing fields are ignored; validation does not mutate the record.
Why this case matters
A deterministic local contract for workflow orchestration. 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['forward_committed'] is True) and (all(r['reverse_dependency'])) and (r['compensation_identity'][0] not in r['compensation_identity'][1]) and (r['resource_version'][0] == r['resource_version'][1])
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'forward_committed': True, 'reverse_dependency': [True, True], 'compensation_identity': ['c2', ['c1']], 'resource_version': [7, 7], 'compensation_registered': 'release'}
check('valid operation', solve(r), True)
check('Compensation reverses a forward action that never committed', solve(dict(r, **{'forward_committed': False})), False)
check('An upstream step is compensated while dependents remain active', solve(dict(r, **{'reverse_dependency': [True, False]})), False)
check('Retried compensation refunds the same side effect twice', solve(dict(r, **{'compensation_identity': ['c1', ['c1']]})), False)
check('Compensation overwrites a resource changed by another workflow', solve(dict(r, **{'resource_version': [6, 7]})), False)
check('A committed step has no recorded inverse operation', solve(dict(r, **{'compensation_registered': None})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'forward_committed': False, 'reverse_dependency': [True, False], 'compensation_identity': ['c1', ['c1']], 'resource_version': [6, 7], 'compensation_registered': None}
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| valid operation | True | True | Passed |
| Compensation reverses a forward action that never committed | False | False | Passed |
| An upstream step is compensated while dependents remain active | False | False | Passed |
| Retried compensation refunds the same side effect twice | False | False | Passed |
| Compensation overwrites a resource changed by another workflow | False | False | Passed |
| A committed step has no recorded inverse operation | True | False | Failed |
| unrelated tracing metadata | True | True | Passed |
| repeat validation is pure | True | True | Passed |
| two independent violations in variant | False | False | Passed |
SHA-256 / b337ad4f0fcf9f6cc2f7ae3721940c48b773520a415c756b0286d3d8216f9710
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(r):
return (all(r['reverse_dependency'])) and (r['compensation_identity'][0] not in r['compensation_identity'][1]) and (r['resource_version'][0] == r['resource_version'][1]) and (r['compensation_registered'] is not None)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'forward_committed': True, 'reverse_dependency': [True, True], 'compensation_identity': ['c2', ['c1']], 'resource_version': [7, 7], 'compensation_registered': 'release'}
check('valid operation', solve(r), True)
check('Compensation reverses a forward action that never committed', solve(dict(r, **{'forward_committed': False})), False)
check('An upstream step is compensated while dependents remain active', solve(dict(r, **{'reverse_dependency': [True, False]})), False)
check('Retried compensation refunds the same side effect twice', solve(dict(r, **{'compensation_identity': ['c1', ['c1']]})), False)
check('Compensation overwrites a resource changed by another workflow', solve(dict(r, **{'resource_version': [6, 7]})), False)
check('A committed step has no recorded inverse operation', solve(dict(r, **{'compensation_registered': None})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'forward_committed': False, 'reverse_dependency': [True, False], 'compensation_identity': ['c1', ['c1']], 'resource_version': [6, 7], 'compensation_registered': None}
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| valid operation | True | True | Passed |
| Compensation reverses a forward action that never committed | True | False | Failed |
| An upstream step is compensated while dependents remain active | False | False | Passed |
| Retried compensation refunds the same side effect twice | False | False | Passed |
| Compensation overwrites a resource changed by another workflow | False | False | Passed |
| A committed step has no recorded inverse operation | False | False | Passed |
| unrelated tracing metadata | True | True | Passed |
| repeat validation is pure | True | True | Passed |
| two independent violations in variant | False | False | Passed |
SHA-256 / cdb8d99b98aee5c38ccf54c367b63a0791be4d2a75c8dacfd974295f413c87af
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:00.057358+00:00.
Case digest / 28bbef066bc222a4c21e85fba7ea271620149fce26c2bbb8355146d416d17dd0