FA-806 / Queues / Open access
Move a poison message to a dead-letter queue: The source is deleted without a dead-letter destination · case 01
The queue dead letter operation is admitted even though the source is deleted without a dead-letter destination.
ROOT CAUSE
The admission path omits the destination exists invariant while validating the other operation preconditions.
VERIFIED REPAIR
Require r['destination_exists'] is True together with every other stated precondition before accepting the operation.
Unsuccessful approach: Adding the destination exists check repairs the reported defect, but replacing the adjacent transfer persisted check loses that independent invariant.
Case contract
Return a Boolean admission decision for move a poison message to a dead-letter queue. The record r must satisfy all of: r['attempt_threshold'][0] >= r['attempt_threshold'][1]; r['destination_exists'] is True; r['transfer_persisted'] is True; r['cycle_detection'][0] not in r['cycle_detection'][1]; r['original_identity'][0] == r['original_identity'][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['attempt_threshold'][0] >= r['attempt_threshold'][1]) and (r['transfer_persisted'] is True) and (r['cycle_detection'][0] not in r['cycle_detection'][1]) and (r['original_identity'][0] == r['original_identity'][1])
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'attempt_threshold': [5, 5], 'destination_exists': True, 'transfer_persisted': True, 'cycle_detection': ['q3', ['q1', 'q2']], 'original_identity': ['m1', 'm1']}
check('valid operation', solve(r), True)
check('A transient first failure is dead-lettered prematurely', solve(dict(r, **{'attempt_threshold': [4, 5]})), False)
check('The source is deleted without a dead-letter destination', solve(dict(r, **{'destination_exists': False})), False)
check('The source is removed before the target copy is durable', solve(dict(r, **{'transfer_persisted': False})), False)
check('Dead-letter forwarding revisits a queue in its own route', solve(dict(r, **{'cycle_detection': ['q1', ['q1', 'q2']]})), False)
check('Dead-letter transfer loses the original message identity', solve(dict(r, **{'original_identity': ['m2', 'm1']})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'attempt_threshold': [4, 5], 'destination_exists': False, 'transfer_persisted': False, 'cycle_detection': ['q1', ['q1', 'q2']], 'original_identity': ['m2', 'm1']}
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 |
| A transient first failure is dead-lettered prematurely | False | False | Passed |
| The source is deleted without a dead-letter destination | True | False | Failed |
| The source is removed before the target copy is durable | False | False | Passed |
| Dead-letter forwarding revisits a queue in its own route | False | False | Passed |
| Dead-letter transfer loses the original message identity | 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 / 0fa5d45757cb4014b1f770e412040b0adc6a06aef1c45bb5517918e05709f9cf
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(r):
return (r['attempt_threshold'][0] >= r['attempt_threshold'][1]) and (r['destination_exists'] is True) and (r['cycle_detection'][0] not in r['cycle_detection'][1]) and (r['original_identity'][0] == r['original_identity'][1])
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'attempt_threshold': [5, 5], 'destination_exists': True, 'transfer_persisted': True, 'cycle_detection': ['q3', ['q1', 'q2']], 'original_identity': ['m1', 'm1']}
check('valid operation', solve(r), True)
check('A transient first failure is dead-lettered prematurely', solve(dict(r, **{'attempt_threshold': [4, 5]})), False)
check('The source is deleted without a dead-letter destination', solve(dict(r, **{'destination_exists': False})), False)
check('The source is removed before the target copy is durable', solve(dict(r, **{'transfer_persisted': False})), False)
check('Dead-letter forwarding revisits a queue in its own route', solve(dict(r, **{'cycle_detection': ['q1', ['q1', 'q2']]})), False)
check('Dead-letter transfer loses the original message identity', solve(dict(r, **{'original_identity': ['m2', 'm1']})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'attempt_threshold': [4, 5], 'destination_exists': False, 'transfer_persisted': False, 'cycle_detection': ['q1', ['q1', 'q2']], 'original_identity': ['m2', 'm1']}
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 |
| A transient first failure is dead-lettered prematurely | False | False | Passed |
| The source is deleted without a dead-letter destination | False | False | Passed |
| The source is removed before the target copy is durable | True | False | Failed |
| Dead-letter forwarding revisits a queue in its own route | False | False | Passed |
| Dead-letter transfer loses the original message identity | 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 / 8fdb6eec0ce82a5af674821f1a387ac936c693638f35c531976db5b55813925b
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(r):
return (r['attempt_threshold'][0] >= r['attempt_threshold'][1]) and (r['destination_exists'] is True) and (r['transfer_persisted'] is True) and (r['cycle_detection'][0] not in r['cycle_detection'][1]) and (r['original_identity'][0] == r['original_identity'][1])
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'attempt_threshold': [5, 5], 'destination_exists': True, 'transfer_persisted': True, 'cycle_detection': ['q3', ['q1', 'q2']], 'original_identity': ['m1', 'm1']}
check('valid operation', solve(r), True)
check('A transient first failure is dead-lettered prematurely', solve(dict(r, **{'attempt_threshold': [4, 5]})), False)
check('The source is deleted without a dead-letter destination', solve(dict(r, **{'destination_exists': False})), False)
check('The source is removed before the target copy is durable', solve(dict(r, **{'transfer_persisted': False})), False)
check('Dead-letter forwarding revisits a queue in its own route', solve(dict(r, **{'cycle_detection': ['q1', ['q1', 'q2']]})), False)
check('Dead-letter transfer loses the original message identity', solve(dict(r, **{'original_identity': ['m2', 'm1']})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'attempt_threshold': [4, 5], 'destination_exists': False, 'transfer_persisted': False, 'cycle_detection': ['q1', ['q1', 'q2']], 'original_identity': ['m2', 'm1']}
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 |
| A transient first failure is dead-lettered prematurely | False | False | Passed |
| The source is deleted without a dead-letter destination | False | False | Passed |
| The source is removed before the target copy is durable | False | False | Passed |
| Dead-letter forwarding revisits a queue in its own route | False | False | Passed |
| Dead-letter transfer loses the original message identity | 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 / c2684659d9b84001b786c64005d69215df25bc44d993344f3450509e0477c8bf
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.063551+00:00.
Case digest / c5c235abfd51d041ad00e1a38c71faaba5bccdb1844c88dc334a97ef21b18f21