FAILURE MAP
← Case archive

FA-901 / Queues / Open access

Purge messages through a selected boundary: A moving purge boundary consumes messages published after purge began · case 01

The queue purge operation is admitted even though a moving purge boundary consumes messages published after purge began.

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

ROOT CAUSE

The admission path omits the boundary fixed invariant while validating the other operation preconditions.

VERIFIED REPAIR

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

Unsuccessful approach: Adding the boundary fixed check repairs the reported defect, but replacing the adjacent reserved protected check loses that independent invariant.

Case contract

Return a Boolean admission decision for purge messages through a selected boundary. The record r must satisfy all of: r['boundary_fixed'][0] <= r['boundary_fixed'][1]; r['reserved_protected'] is False; r['namespace_match'][0] == r['namespace_match'][1]; r['queue_incarnation'][0] == r['queue_incarnation'][1]; r['retention_hold'] is False. 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['reserved_protected'] is False) and (r['namespace_match'][0] == r['namespace_match'][1]) and (r['queue_incarnation'][0] == r['queue_incarnation'][1]) and (r['retention_hold'] is False)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'boundary_fixed': [100, 100], 'reserved_protected': False, 'namespace_match': ['t1', 't1'], 'queue_incarnation': ['g2', 'g2'], 'retention_hold': False}
check('valid operation', solve(r), True)
check('A moving purge boundary consumes messages published after purge began', solve(dict(r, **{'boundary_fixed': [101, 100]})), False)
check('Purge deletes an actively reserved delivery', solve(dict(r, **{'reserved_protected': True})), False)
check('Purge crosses into another tenant queue', solve(dict(r, **{'namespace_match': ['t2', 't1']})), False)
check('A delayed purge targets a recreated queue with the same name', solve(dict(r, **{'queue_incarnation': ['g1', 'g2']})), False)
check('Purge ignores an explicit retention hold', solve(dict(r, **{'retention_hold': True})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'boundary_fixed': [101, 100], 'reserved_protected': True, 'namespace_match': ['t2', 't1'], 'queue_incarnation': ['g1', 'g2'], 'retention_hold': True}
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 moving purge boundary consumes messages published after purge beganTrueFalseFailed
Purge deletes an actively reserved deliveryFalseFalsePassed
Purge crosses into another tenant queueFalseFalsePassed
A delayed purge targets a recreated queue with the same nameFalseFalsePassed
Purge ignores an explicit retention holdFalseFalsePassed
unrelated tracing metadataTrueTruePassed
repeat validation is pureTrueTruePassed
two independent violations in variantFalseFalsePassed

SHA-256 / 1a8dff3dd470afad163591a65ece35219a4fa202ffb17920bee1f9f839634228

2 / The unsuccessful fix

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

N = 1
observations = []
def solve(r):
    return (r['boundary_fixed'][0] <= r['boundary_fixed'][1]) and (r['namespace_match'][0] == r['namespace_match'][1]) and (r['queue_incarnation'][0] == r['queue_incarnation'][1]) and (r['retention_hold'] is False)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'boundary_fixed': [100, 100], 'reserved_protected': False, 'namespace_match': ['t1', 't1'], 'queue_incarnation': ['g2', 'g2'], 'retention_hold': False}
check('valid operation', solve(r), True)
check('A moving purge boundary consumes messages published after purge began', solve(dict(r, **{'boundary_fixed': [101, 100]})), False)
check('Purge deletes an actively reserved delivery', solve(dict(r, **{'reserved_protected': True})), False)
check('Purge crosses into another tenant queue', solve(dict(r, **{'namespace_match': ['t2', 't1']})), False)
check('A delayed purge targets a recreated queue with the same name', solve(dict(r, **{'queue_incarnation': ['g1', 'g2']})), False)
check('Purge ignores an explicit retention hold', solve(dict(r, **{'retention_hold': True})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'boundary_fixed': [101, 100], 'reserved_protected': True, 'namespace_match': ['t2', 't1'], 'queue_incarnation': ['g1', 'g2'], 'retention_hold': True}
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 moving purge boundary consumes messages published after purge beganFalseFalsePassed
Purge deletes an actively reserved deliveryTrueFalseFailed
Purge crosses into another tenant queueFalseFalsePassed
A delayed purge targets a recreated queue with the same nameFalseFalsePassed
Purge ignores an explicit retention holdFalseFalsePassed
unrelated tracing metadataTrueTruePassed
repeat validation is pureTrueTruePassed
two independent violations in variantFalseFalsePassed

SHA-256 / 67a4cd09dac211bd011009477e7bcd65e7b650ef681d6612c5c68332c6c878ad

3 / The verified repair

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

N = 1
observations = []
def solve(r):
    return (r['boundary_fixed'][0] <= r['boundary_fixed'][1]) and (r['reserved_protected'] is False) and (r['namespace_match'][0] == r['namespace_match'][1]) and (r['queue_incarnation'][0] == r['queue_incarnation'][1]) and (r['retention_hold'] is False)
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
r = {'boundary_fixed': [100, 100], 'reserved_protected': False, 'namespace_match': ['t1', 't1'], 'queue_incarnation': ['g2', 'g2'], 'retention_hold': False}
check('valid operation', solve(r), True)
check('A moving purge boundary consumes messages published after purge began', solve(dict(r, **{'boundary_fixed': [101, 100]})), False)
check('Purge deletes an actively reserved delivery', solve(dict(r, **{'reserved_protected': True})), False)
check('Purge crosses into another tenant queue', solve(dict(r, **{'namespace_match': ['t2', 't1']})), False)
check('A delayed purge targets a recreated queue with the same name', solve(dict(r, **{'queue_incarnation': ['g1', 'g2']})), False)
check('Purge ignores an explicit retention hold', solve(dict(r, **{'retention_hold': True})), False)
check('unrelated tracing metadata', solve(dict(r, trace='run-'+str(N))), True)
check('repeat validation is pure', solve(r), True)
invalid = {'boundary_fixed': [101, 100], 'reserved_protected': True, 'namespace_match': ['t2', 't1'], 'queue_incarnation': ['g1', 'g2'], 'retention_hold': True}
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 moving purge boundary consumes messages published after purge beganFalseFalsePassed
Purge deletes an actively reserved deliveryFalseFalsePassed
Purge crosses into another tenant queueFalseFalsePassed
A delayed purge targets a recreated queue with the same nameFalseFalsePassed
Purge ignores an explicit retention holdFalseFalsePassed
unrelated tracing metadataTrueTruePassed
repeat validation is pureTrueTruePassed
two independent violations in variantFalseFalsePassed

SHA-256 / 92a93044fab07e3cf5b3b8b981676a14de9f32a82ff1a36cd30ad1d66b796108

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

Case digest / 0d9db47c10648d0ebb32285b43bf813228bc4d704146f94df2b62fb1398086e2