FA-896 / Queues / Open access
Commit a consume-transform-publish transaction: A previous producer instance commits an old transaction · case 01
The transactional consume operation is admitted even though a previous producer instance commits an old transaction.
ROOT CAUSE
The admission path omits the producer fenced invariant while validating the other operation preconditions.
VERIFIED REPAIR
Require r['producer_fenced'][0] == r['producer_fenced'][1] together with every other stated precondition before accepting the operation.
Unsuccessful approach: Adding the producer fenced check repairs the reported defect, but replacing the adjacent input owned check loses that independent invariant.
Case contract
Return a Boolean admission decision for commit a consume-transform-publish transaction. The record r must satisfy all of: r['input_owned'][0] == r['input_owned'][1]; r['output_committed'] is True; r['offset_exact'][0] == r['offset_exact'][1]+1; r['transaction_open'] == 'open'; r['producer_fenced'][0] == r['producer_fenced'][1]. Extra tracing fields are ignored; validation does not mutate the record.
Why this case matters
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.
1 / The failure
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(r):
return (r['input_owned'][0] == r['input_owned'][1]) and (r['output_committed'] is True) and (r['offset_exact'][0] == r['offset_exact'][1]+1) and (r['transaction_open'] == 'open')
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'input_owned': [8, 8], 'output_committed': True, 'offset_exact': [11, 10], 'transaction_open': 'open', 'producer_fenced': [9, 9]}
check('valid operation', solve(r), True)
check('Commit acknowledges an input partition no longer owned', solve(dict(r, **{'input_owned': [7, 8]})), False)
check('Input progress commits before the transformed output', solve(dict(r, **{'output_committed': False})), False)
check('Commit skips an unprocessed input offset', solve(dict(r, **{'offset_exact': [12, 10]})), False)
check('A commit revives an aborted consume transaction', solve(dict(r, **{'transaction_open': 'aborted'})), False)
check('A previous producer instance commits an old transaction', solve(dict(r, **{'producer_fenced': [8, 9]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'input_owned': [7, 8], 'output_committed': False, 'offset_exact': [12, 10], 'transaction_open': 'aborted', 'producer_fenced': [8, 9]}
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 |
| Commit acknowledges an input partition no longer owned | False | False | Passed |
| Input progress commits before the transformed output | False | False | Passed |
| Commit skips an unprocessed input offset | False | False | Passed |
| A commit revives an aborted consume transaction | False | False | Passed |
| A previous producer instance commits an old transaction | 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 / b776f7f411a97aa070e1e6fe8087efcd87dc1105537acc31c4921049b23246f0
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(r):
return (r['output_committed'] is True) and (r['offset_exact'][0] == r['offset_exact'][1]+1) and (r['transaction_open'] == 'open') and (r['producer_fenced'][0] == r['producer_fenced'][1])
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'input_owned': [8, 8], 'output_committed': True, 'offset_exact': [11, 10], 'transaction_open': 'open', 'producer_fenced': [9, 9]}
check('valid operation', solve(r), True)
check('Commit acknowledges an input partition no longer owned', solve(dict(r, **{'input_owned': [7, 8]})), False)
check('Input progress commits before the transformed output', solve(dict(r, **{'output_committed': False})), False)
check('Commit skips an unprocessed input offset', solve(dict(r, **{'offset_exact': [12, 10]})), False)
check('A commit revives an aborted consume transaction', solve(dict(r, **{'transaction_open': 'aborted'})), False)
check('A previous producer instance commits an old transaction', solve(dict(r, **{'producer_fenced': [8, 9]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'input_owned': [7, 8], 'output_committed': False, 'offset_exact': [12, 10], 'transaction_open': 'aborted', 'producer_fenced': [8, 9]}
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 |
| Commit acknowledges an input partition no longer owned | True | False | Failed |
| Input progress commits before the transformed output | False | False | Passed |
| Commit skips an unprocessed input offset | False | False | Passed |
| A commit revives an aborted consume transaction | False | False | Passed |
| A previous producer instance commits an old transaction | 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 / 5668b6df1dcc8bf61a301328ed31ac33ad65ed4b5afc207763e61604cd09a887
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(r):
return (r['input_owned'][0] == r['input_owned'][1]) and (r['output_committed'] is True) and (r['offset_exact'][0] == r['offset_exact'][1]+1) and (r['transaction_open'] == 'open') and (r['producer_fenced'][0] == r['producer_fenced'][1])
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'input_owned': [8, 8], 'output_committed': True, 'offset_exact': [11, 10], 'transaction_open': 'open', 'producer_fenced': [9, 9]}
check('valid operation', solve(r), True)
check('Commit acknowledges an input partition no longer owned', solve(dict(r, **{'input_owned': [7, 8]})), False)
check('Input progress commits before the transformed output', solve(dict(r, **{'output_committed': False})), False)
check('Commit skips an unprocessed input offset', solve(dict(r, **{'offset_exact': [12, 10]})), False)
check('A commit revives an aborted consume transaction', solve(dict(r, **{'transaction_open': 'aborted'})), False)
check('A previous producer instance commits an old transaction', solve(dict(r, **{'producer_fenced': [8, 9]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'input_owned': [7, 8], 'output_committed': False, 'offset_exact': [12, 10], 'transaction_open': 'aborted', 'producer_fenced': [8, 9]}
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 |
| Commit acknowledges an input partition no longer owned | False | False | Passed |
| Input progress commits before the transformed output | False | False | Passed |
| Commit skips an unprocessed input offset | False | False | Passed |
| A commit revives an aborted consume transaction | False | False | Passed |
| A previous producer instance commits an old transaction | 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 / 80e85882f5fbe52ad3183d96099fea52444649192c9fd9bdb3f60b1664a6dce6
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:36:56.632625+00:00.
Case digest / 3451d88fd73a25260f24304dc8e67000fe315f81b7549425c1a54e63317ad678