FA-921 / Queues / Open access
Purge messages through a selected boundary: Purge ignores an explicit retention hold · case 01
The queue purge operation is admitted even though purge ignores an explicit retention hold.
ROOT CAUSE
The admission path omits the retention hold invariant while validating the other operation preconditions.
VERIFIED REPAIR
Require r['retention_hold'] is False together with every other stated precondition before accepting the operation.
Unsuccessful approach: Adding the retention hold check repairs the reported defect, but replacing the adjacent boundary fixed 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['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])
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| valid operation | True | True | Passed |
| A moving purge boundary consumes messages published after purge began | False | False | Passed |
| Purge deletes an actively reserved delivery | False | False | Passed |
| Purge crosses into another tenant queue | False | False | Passed |
| A delayed purge targets a recreated queue with the same name | False | False | Passed |
| Purge ignores an explicit retention hold | 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 / cd9649acf503d362623b0bd543a45aff968180ed16ca3ed31cd956f094f36f2b
2 / The unsuccessful fix
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| valid operation | True | True | Passed |
| A moving purge boundary consumes messages published after purge began | True | False | Failed |
| Purge deletes an actively reserved delivery | False | False | Passed |
| Purge crosses into another tenant queue | False | False | Passed |
| A delayed purge targets a recreated queue with the same name | False | False | Passed |
| Purge ignores an explicit retention hold | 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 / 1a8dff3dd470afad163591a65ece35219a4fa202ffb17920bee1f9f839634228
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 fixture | Actual | Expected | Outcome |
|---|---|---|---|
| valid operation | True | True | Passed |
| A moving purge boundary consumes messages published after purge began | False | False | Passed |
| Purge deletes an actively reserved delivery | False | False | Passed |
| Purge crosses into another tenant queue | False | False | Passed |
| A delayed purge targets a recreated queue with the same name | False | False | Passed |
| Purge ignores an explicit retention hold | 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 / 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:57.204496+00:00.
Case digest / cedd2d7c6234782ea48a057dde1c0513637cb31ac128a4b3d092af97bd6fe157