FAILURE MAP
← Case archive

FA-826 / Queues / Open access

Redrive a previously dead-lettered message: Poison messages circulate past the redrive allowance · case 01

The queue redrive operation is admitted even though poison messages circulate past the redrive allowance.

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

ROOT CAUSE

The admission path omits the redrive budget invariant while validating the other operation preconditions.

VERIFIED REPAIR

Require r['redrive_budget'][0] < r['redrive_budget'][1] together with every other stated precondition before accepting the operation.

Unsuccessful approach: Adding the redrive budget check repairs the reported defect, but replacing the adjacent source version check loses that independent invariant.

Case contract

Return a Boolean admission decision for redrive a previously dead-lettered message. The record r must satisfy all of: r['redrive_budget'][0] < r['redrive_budget'][1]; r['source_version'][0] == r['source_version'][1]; r['destination_schema'][0] in r['destination_schema'][1]; r['retention_remaining'][0] < r['retention_remaining'][1]; r['rate_tokens'][0] >= r['rate_tokens'][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['source_version'][0] == r['source_version'][1]) and (r['destination_schema'][0] in r['destination_schema'][1]) and (r['retention_remaining'][0] < r['retention_remaining'][1]) and (r['rate_tokens'][0] >= r['rate_tokens'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'redrive_budget': [2, 3], 'source_version': [7, 7], 'destination_schema': [2, [2, 3]], 'retention_remaining': [19, 20], 'rate_tokens': [3, 3]}
check('valid operation', solve(r), True)
check('Poison messages circulate past the redrive allowance', solve(dict(r, **{'redrive_budget': [3, 3]})), False)
check('Redrive races an updated dead-letter record', solve(dict(r, **{'source_version': [6, 7]})), False)
check('The target consumer cannot decode the original schema', solve(dict(r, **{'destination_schema': [1, [2, 3]]})), False)
check('Redrive revives a message past its absolute retention', solve(dict(r, **{'retention_remaining': [20, 20]})), False)
check('Redrive bypasses its recovery traffic budget', solve(dict(r, **{'rate_tokens': [2, 3]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'redrive_budget': [3, 3], 'source_version': [6, 7], 'destination_schema': [1, [2, 3]], 'retention_remaining': [20, 20], 'rate_tokens': [2, 3]}
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
Poison messages circulate past the redrive allowanceTrueFalseFailed
Redrive races an updated dead-letter recordFalseFalsePassed
The target consumer cannot decode the original schemaFalseFalsePassed
Redrive revives a message past its absolute retentionFalseFalsePassed
Redrive bypasses its recovery traffic budgetFalseFalsePassed
unrelated tracing metadataTrueTruePassed
repeat validation is pureTrueTruePassed
two independent violations in variantFalseFalsePassed

SHA-256 / 0af93c6d3b7535192801f137c381eba16d877c6ee1c1418902dac58972ba754b

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(r):
    return (r['redrive_budget'][0] < r['redrive_budget'][1]) and (r['destination_schema'][0] in r['destination_schema'][1]) and (r['retention_remaining'][0] < r['retention_remaining'][1]) and (r['rate_tokens'][0] >= r['rate_tokens'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'redrive_budget': [2, 3], 'source_version': [7, 7], 'destination_schema': [2, [2, 3]], 'retention_remaining': [19, 20], 'rate_tokens': [3, 3]}
check('valid operation', solve(r), True)
check('Poison messages circulate past the redrive allowance', solve(dict(r, **{'redrive_budget': [3, 3]})), False)
check('Redrive races an updated dead-letter record', solve(dict(r, **{'source_version': [6, 7]})), False)
check('The target consumer cannot decode the original schema', solve(dict(r, **{'destination_schema': [1, [2, 3]]})), False)
check('Redrive revives a message past its absolute retention', solve(dict(r, **{'retention_remaining': [20, 20]})), False)
check('Redrive bypasses its recovery traffic budget', solve(dict(r, **{'rate_tokens': [2, 3]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'redrive_budget': [3, 3], 'source_version': [6, 7], 'destination_schema': [1, [2, 3]], 'retention_remaining': [20, 20], 'rate_tokens': [2, 3]}
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
Poison messages circulate past the redrive allowanceFalseFalsePassed
Redrive races an updated dead-letter recordTrueFalseFailed
The target consumer cannot decode the original schemaFalseFalsePassed
Redrive revives a message past its absolute retentionFalseFalsePassed
Redrive bypasses its recovery traffic budgetFalseFalsePassed
unrelated tracing metadataTrueTruePassed
repeat validation is pureTrueTruePassed
two independent violations in variantFalseFalsePassed

SHA-256 / 0f36719aaa0b8108a1064ed59a21b1c56fc4f9aff201500a892f9932ddf2e49c

3 / The verified repair

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

N = 1
observations = []
def solve(r):
    return (r['redrive_budget'][0] < r['redrive_budget'][1]) and (r['source_version'][0] == r['source_version'][1]) and (r['destination_schema'][0] in r['destination_schema'][1]) and (r['retention_remaining'][0] < r['retention_remaining'][1]) and (r['rate_tokens'][0] >= r['rate_tokens'][1])
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'redrive_budget': [2, 3], 'source_version': [7, 7], 'destination_schema': [2, [2, 3]], 'retention_remaining': [19, 20], 'rate_tokens': [3, 3]}
check('valid operation', solve(r), True)
check('Poison messages circulate past the redrive allowance', solve(dict(r, **{'redrive_budget': [3, 3]})), False)
check('Redrive races an updated dead-letter record', solve(dict(r, **{'source_version': [6, 7]})), False)
check('The target consumer cannot decode the original schema', solve(dict(r, **{'destination_schema': [1, [2, 3]]})), False)
check('Redrive revives a message past its absolute retention', solve(dict(r, **{'retention_remaining': [20, 20]})), False)
check('Redrive bypasses its recovery traffic budget', solve(dict(r, **{'rate_tokens': [2, 3]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'redrive_budget': [3, 3], 'source_version': [6, 7], 'destination_schema': [1, [2, 3]], 'retention_remaining': [20, 20], 'rate_tokens': [2, 3]}
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
Poison messages circulate past the redrive allowanceFalseFalsePassed
Redrive races an updated dead-letter recordFalseFalsePassed
The target consumer cannot decode the original schemaFalseFalsePassed
Redrive revives a message past its absolute retentionFalseFalsePassed
Redrive bypasses its recovery traffic budgetFalseFalsePassed
unrelated tracing metadataTrueTruePassed
repeat validation is pureTrueTruePassed
two independent violations in variantFalseFalsePassed

SHA-256 / 09fa60df1708f7252fc6940f93fa9f61761b5dbc2bf134dc7399ccac9845b048

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

Case digest / 07a2d31ac1709b5f0649c14f62945d4bf6119aeb7324ead41741f50320b9ef69