Skip to content

fix(ttl-reaper): add alarm for the reaper not being invoked at all - #504

Merged
scttfrdmn merged 1 commit into
mainfrom
fix/475-reaper-not-running-alarm
Aug 18, 2026
Merged

fix(ttl-reaper): add alarm for the reaper not being invoked at all#504
scttfrdmn merged 1 commit into
mainfrom
fix/475-reaper-not-running-alarm

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

Summary

The four alarms added by #469 (…-reached-no-accounts, …-account-unreachable, …-fsx-unreachable, …-invocation-errors) all correctly use TreatMissingData: notBreaching — no sentinel datapoint genuinely is good news. But that means a reaper that never runs at all — the EventBridge rule disabled, its schedule deleted or target detached, reserved concurrency set to 0, or the function deleted outright — produces zero breaching datapoints across all four, so they all sit contentedly in OK while nothing is being enforced. …-invocation-errors doesn't cover it either: AWS/Lambda Errors requires an invocation to produce a datapoint at all — no invocation, no error, no alarm.

This is #469's own thesis one level up, and #65's two levels up: spored can die silently → the reaper could fail silently (#469) → the reaper can be absent silently (this).

Fix: new NotInvokedAlarm on AWS/Lambda Invocations, Sum, Period: 1800 (~3 missed ticks at the default rate(10 minutes)), ComparisonOperator: LessThanThreshold, Threshold: 1, and — the one alarm in this template where it's correct — TreatMissingData: breaching, since absence of data is exactly the failure this alarm exists to detect. Documented in the README's sentinel/alarm table alongside the other four, with a comment explaining why this alarm's TreatMissingData differs from its neighbors (per the issue's own request, so nobody "fixes" the inconsistency later).

Fixes #475.

Test plan

  • sam validate --template-file template.yaml --lint — clean
  • go build ./..., go vet ./..., go test ./... in lambda/ttl-reaper — clean
  • Manually verified the template parses and the new NotInvokedAlarm resource is present via a Python YAML-with-CFN-tags parse
  • CHANGELOG.md updated under ## [Unreleased]

Acceptance from the issue (deploy-time verification, not done in this PR):

  • Disabling the EventBridge rule causes an alarm within ~30 min
  • A normal healthy run keeps it in OK

@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

)

The four alarms from #469 all correctly use TreatMissingData: notBreaching
-- no sentinel datapoint genuinely is good news. But that means a reaper
that never runs (disabled EventBridge rule, deleted schedule, reserved
concurrency 0, or the function deleted) produces zero breaching datapoints
across all four, so nothing pages while nothing is being enforced. The
existing invocation-errors alarm doesn't cover it either: AWS/Lambda Errors
requires an invocation to produce a datapoint at all.

New NotInvokedAlarm on AWS/Lambda Invocations, 30-minute window (~3 missed
ticks at rate(10 minutes)), the one alarm in this stack that intentionally
uses TreatMissingData: breaching, since absence of data is exactly the
failure being detected here.

Fixes #475
@scttfrdmn
scttfrdmn force-pushed the fix/475-reaper-not-running-alarm branch from 0d91d3d to 4a8c7b3 Compare August 18, 2026 03:53
@scttfrdmn
scttfrdmn merged commit c7a0506 into main Aug 18, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ttl-reaper: no alarm detects the reaper NOT RUNNING — all four #469 alarms are notBreaching, so absence is silent

1 participant