FA-841 / Queues / Open access
Redrive a previously dead-lettered message: Redrive revives a message past its absolute retention · case 01
The queue redrive operation is admitted even though redrive revives a message past its absolute retention.
ROOT CAUSE
The admission path omits the retention remaining invariant while validating the other operation preconditions.
VERIFIED REPAIR
Require r['retention_remaining'][0] < r['retention_remaining'][1] together with every other stated precondition before accepting the operation.
Unsuccessful approach: Adding the retention remaining check repairs the reported defect, but replacing the adjacent rate tokens 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['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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| valid operation | True | True | Passed |
| Poison messages circulate past the redrive allowance | False | False | Passed |
| Redrive races an updated dead-letter record | False | False | Passed |
| The target consumer cannot decode the original schema | False | False | Passed |
| Redrive revives a message past its absolute retention | True | False | Failed |
| Redrive bypasses its recovery traffic budget | 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 / cc076d2bd61cee405ae28f5c6727906e99c12082e7bd587aa91872f6f8c4c61f
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['retention_remaining'][0] < r['retention_remaining'][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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| valid operation | True | True | Passed |
| Poison messages circulate past the redrive allowance | False | False | Passed |
| Redrive races an updated dead-letter record | False | False | Passed |
| The target consumer cannot decode the original schema | False | False | Passed |
| Redrive revives a message past its absolute retention | False | False | Passed |
| Redrive bypasses its recovery traffic budget | 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 / 21d5c051f6c494b406ceec1320cdc454db6159a2516519d423ba4101a37a9042
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| valid operation | True | True | Passed |
| Poison messages circulate past the redrive allowance | False | False | Passed |
| Redrive races an updated dead-letter record | False | False | Passed |
| The target consumer cannot decode the original schema | False | False | Passed |
| Redrive revives a message past its absolute retention | False | False | Passed |
| Redrive bypasses its recovery traffic budget | 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 / 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.495869+00:00.
Case digest / fe081f86fce0847cb911837c99666df5940b7dd65bd3e7b3c6b92f2031073319