---
id: w3/m6/t007
title: Test coverage — promtool rule unit tests (else close n/a)
worker: worker3
status: todo
estimate: 20m
depends_on: [w3/m6/t005]
---

## Objective

Standing closing task, infra flavor: `promtool test rules` unit tests for the non-obvious expressions — backup-staleness age math (fires at >26h, not at 25h), the 5xx-rate ratio (no fire on tiny denominators), CrashLoop `for:` behavior — wired into CI or `scripts/gitops-validate.sh` so rule regressions fail loudly. If an expression is too trivial to test meaningfully, say so — never tautological tests.

## Acceptance criteria

- [ ] Rule unit tests exist for the age-math and ratio rules and run in validation; or explicit n/a notes per rule.
