FA-736 / Queues / Open access
Accept a durable queue publication: A mandatory message has no matching queue · case 01
The queue publish operation is admitted even though a mandatory message has no matching queue.
ROOT CAUSE
The admission path omits the routing target invariant while validating the other operation preconditions.
VERIFIED REPAIR
Require bool(r['routing_target']) together with every other stated precondition before accepting the operation.
Unsuccessful approach: Adding the routing target check repairs the reported defect, but replacing the adjacent producer epoch check loses that independent invariant.
Case contract
Return a Boolean admission decision for accept a durable queue publication. The record r must satisfy all of: len(r['message_size'][0]) <= r['message_size'][1]; r['queue_capacity'][0]+r['queue_capacity'][1] <= r['queue_capacity'][2]; bool(r['routing_target']); r['producer_epoch'][0] == r['producer_epoch'][1]; r['sequence_next'][0] == r['sequence_next'][1]+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 (len(r['message_size'][0]) <= r['message_size'][1]) and (r['queue_capacity'][0]+r['queue_capacity'][1] <= r['queue_capacity'][2]) and (r['producer_epoch'][0] == r['producer_epoch'][1]) and (r['sequence_next'][0] == r['sequence_next'][1]+1)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'message_size': ['abc', 3], 'queue_capacity': [8, 2, 10], 'routing_target': ['orders'], 'producer_epoch': [4, 4], 'sequence_next': [8, 7]}
check('valid operation', solve(r), True)
check('An oversized message bypasses broker frame limits', solve(dict(r, **{'message_size': ['abcd', 3]})), False)
check('Admission exceeds the queue retained-byte budget', solve(dict(r, **{'queue_capacity': [8, 3, 10]})), False)
check('A mandatory message has no matching queue', solve(dict(r, **{'routing_target': []})), False)
check('A fenced producer continues publishing', solve(dict(r, **{'producer_epoch': [3, 4]})), False)
check('A producer sequence gap is accepted as contiguous', solve(dict(r, **{'sequence_next': [9, 7]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'message_size': ['abcd', 3], 'queue_capacity': [8, 3, 10], 'routing_target': [], 'producer_epoch': [3, 4], 'sequence_next': [9, 7]}
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 |
| An oversized message bypasses broker frame limits | False | False | Passed |
| Admission exceeds the queue retained-byte budget | False | False | Passed |
| A mandatory message has no matching queue | True | False | Failed |
| A fenced producer continues publishing | False | False | Passed |
| A producer sequence gap is accepted as contiguous | 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 / bcaa6e529cfd5df5c0f5ce34ab018eea4ef069ed909d191a68365a712e1b5dca
2 / The unsuccessful fix
Exit 1"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(r):
return (len(r['message_size'][0]) <= r['message_size'][1]) and (r['queue_capacity'][0]+r['queue_capacity'][1] <= r['queue_capacity'][2]) and (bool(r['routing_target'])) and (r['sequence_next'][0] == r['sequence_next'][1]+1)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'message_size': ['abc', 3], 'queue_capacity': [8, 2, 10], 'routing_target': ['orders'], 'producer_epoch': [4, 4], 'sequence_next': [8, 7]}
check('valid operation', solve(r), True)
check('An oversized message bypasses broker frame limits', solve(dict(r, **{'message_size': ['abcd', 3]})), False)
check('Admission exceeds the queue retained-byte budget', solve(dict(r, **{'queue_capacity': [8, 3, 10]})), False)
check('A mandatory message has no matching queue', solve(dict(r, **{'routing_target': []})), False)
check('A fenced producer continues publishing', solve(dict(r, **{'producer_epoch': [3, 4]})), False)
check('A producer sequence gap is accepted as contiguous', solve(dict(r, **{'sequence_next': [9, 7]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'message_size': ['abcd', 3], 'queue_capacity': [8, 3, 10], 'routing_target': [], 'producer_epoch': [3, 4], 'sequence_next': [9, 7]}
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 |
| An oversized message bypasses broker frame limits | False | False | Passed |
| Admission exceeds the queue retained-byte budget | False | False | Passed |
| A mandatory message has no matching queue | False | False | Passed |
| A fenced producer continues publishing | True | False | Failed |
| A producer sequence gap is accepted as contiguous | 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 / 2fcef26b36129adc030a07730d013773b8e58b8ca888e33c5c458df7efb32479
3 / The verified repair
Exit 0"""Failure Map reference implementation. Python standard library only."""
import json
N = 1
observations = []
def solve(r):
return (len(r['message_size'][0]) <= r['message_size'][1]) and (r['queue_capacity'][0]+r['queue_capacity'][1] <= r['queue_capacity'][2]) and (bool(r['routing_target'])) and (r['producer_epoch'][0] == r['producer_epoch'][1]) and (r['sequence_next'][0] == r['sequence_next'][1]+1)
def check(label, actual, expected):
observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'message_size': ['abc', 3], 'queue_capacity': [8, 2, 10], 'routing_target': ['orders'], 'producer_epoch': [4, 4], 'sequence_next': [8, 7]}
check('valid operation', solve(r), True)
check('An oversized message bypasses broker frame limits', solve(dict(r, **{'message_size': ['abcd', 3]})), False)
check('Admission exceeds the queue retained-byte budget', solve(dict(r, **{'queue_capacity': [8, 3, 10]})), False)
check('A mandatory message has no matching queue', solve(dict(r, **{'routing_target': []})), False)
check('A fenced producer continues publishing', solve(dict(r, **{'producer_epoch': [3, 4]})), False)
check('A producer sequence gap is accepted as contiguous', solve(dict(r, **{'sequence_next': [9, 7]})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'message_size': ['abcd', 3], 'queue_capacity': [8, 3, 10], 'routing_target': [], 'producer_epoch': [3, 4], 'sequence_next': [9, 7]}
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 |
| An oversized message bypasses broker frame limits | False | False | Passed |
| Admission exceeds the queue retained-byte budget | False | False | Passed |
| A mandatory message has no matching queue | False | False | Passed |
| A fenced producer continues publishing | False | False | Passed |
| A producer sequence gap is accepted as contiguous | 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 / 8ea93560e997352f0b1e768d5f01062994be9096bf0b28345ab9c60c3fe81bc2
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:55.566440+00:00.
Case digest / dbd9f0bfd9446907fade807d75f6726b90bc75b1ca78942b5b8644fd1455bc49