anyshift-io/sre-skills / skills/sqs-queue-auditor
sqs-queue-auditor
Verifiedtests/replay_01_no_dlq.py
View on GitHub"""
Replay test for examples/01-no-dlq.md.
Stdlib only. Run with: `python tests/replay_01_no_dlq.py`.
"""
from __future__ import annotations
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).parent))
from _audit import run_audit # noqa: E402
from _replay import report # noqa: E402
FIXTURE_DIR = Path(__file__).parent.parent / "fixtures" / "01-no-dlq"
def main() -> int:
audit = run_audit(FIXTURE_DIR, is_processing_queue=True)
assertions = [
(audit.queue_arn.endswith(":payments-capture"), f"unexpected queue arn {audit.queue_arn}"),
(audit.has_dlq is False, "queue has no RedrivePolicy, has_dlq should be False"),
# R1 is the finding: no DLQ on a processing queue.
("R1" in audit.codes(), f"expected R1 (no DLQ), got {sorted(audit.codes())}"),
(next(f.severity for f in audit.findings if f.code == "R1") == "high", "R1 should be high severity"),
# The queue sets a deliberate visibility timeout (120) and the default retention,
# so R5 / R6 must NOT fire: R1 is the only finding.
(audit.codes() == {"R1"}, f"expected exactly {{R1}}, got {sorted(audit.codes())}"),
# The wall is always named.
(any("consumer" in b.lower() for b in audit.boundary), "boundary must name the consumer join"),
(len(audit.boundary) >= 4, f"expected >=4 boundary notes, got {len(audit.boundary)}"),
]
return report("replay_01_no_dlq", audit, assertions)
if __name__ == "__main__":
sys.exit(main())
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |