FAILURE MAP
← Case archive

FA-836 / Queues / Open access

Redrive a previously dead-lettered message: The target consumer cannot decode the original schema · case 01

The queue redrive operation is admitted even though the target consumer cannot decode the original schema.

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

ROOT CAUSE

The admission path omits the destination schema invariant while validating the other operation preconditions.

VERIFIED REPAIR

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

Unsuccessful approach: Adding the destination schema check repairs the reported defect, but replacing the adjacent retention remaining 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['redrive_budget'][0] < r['redrive_budget'][1]) and (r['source_version'][0] == r['source_version'][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 schemaTrueFalseFailed
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 / fa64b6790dcd7932d42a8bf7f1df909aa454faf1d6b96710e75892950e4b45bd

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['source_version'][0] == r['source_version'][1]) and (r['destination_schema'][0] in r['destination_schema'][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 retentionTrueFalseFailed
Redrive bypasses its recovery traffic budgetFalseFalsePassed
unrelated tracing metadataTrueTruePassed
repeat validation is pureTrueTruePassed
two independent violations in variantFalseFalsePassed

SHA-256 / cc076d2bd61cee405ae28f5c6727906e99c12082e7bd587aa91872f6f8c4c61f

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

Case digest / c45eee9b40d1e4afc866b9e7e35c48235c7b0f0b4f0bb940becf78bd9626cb53