FAILURE MAP
← Case archive

FA-816 / Queues / Open access

Move a poison message to a dead-letter queue: Dead-letter forwarding revisits a queue in its own route · case 01

The queue dead letter operation is admitted even though dead-letter forwarding revisits a queue in its own route.

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

ROOT CAUSE

The admission path omits the cycle detection invariant while validating the other operation preconditions.

THE FAILURE

The admission path omits the cycle detection invariant while validating the other operation preconditions.

Unsuccessful approach: Adding the cycle detection check repairs the reported defect, but replacing the adjacent original identity 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['destination_exists'] is True) and (r['transfer_persisted'] is True) 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 fixtureActualExpectedOutcome
valid operationTrueTruePassed
A transient first failure is dead-lettered prematurelyFalseFalsePassed
The source is deleted without a dead-letter destinationFalseFalsePassed
The source is removed before the target copy is durableFalseFalsePassed
Dead-letter forwarding revisits a queue in its own routeTrueFalseFailed
Dead-letter transfer loses the original message identityFalseFalsePassed
unrelated tracing metadataTrueTruePassed
repeat validation is pureTrueTruePassed
two independent violations in variantFalseFalsePassed

SHA-256 / 3f2fcf0cb6cf0370aed956e1599d82f3371fb9c42578cea08ed8b311bbebae39

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['transfer_persisted'] is True) and (r['cycle_detection'][0] not in r['cycle_detection'][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 fixtureActualExpectedOutcome
valid operationTrueTruePassed
A transient first failure is dead-lettered prematurelyFalseFalsePassed
The source is deleted without a dead-letter destinationFalseFalsePassed
The source is removed before the target copy is durableFalseFalsePassed
Dead-letter forwarding revisits a queue in its own routeFalseFalsePassed
Dead-letter transfer loses the original message identityTrueFalseFailed
unrelated tracing metadataTrueTruePassed
repeat validation is pureTrueTruePassed
two independent violations in variantFalseFalsePassed

SHA-256 / f735dba7b855ee017ce09714ade76604df2b927e7a6e8f4a0fd9519ccf162694

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:36:56.107705+00:00.

Case digest / 2d47e271f2508d6ad16feb483393e8a00133d7926fd92af045dc3e0dbcae49f6