Skip to content

remove: alert-evaluator and the dashboard's alert-preferences endpoints (#794) - #798

Merged
scttfrdmn merged 1 commit into
mainfrom
remove/794-alert-evaluator
Oct 11, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
remove/794-alert-evaluator

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

Closes #794

Completes the alerting removal #783 began. This half was deployed and
running
, which is the difference: alert-evaluator had been invoked hourly
since 2026-02-20 — roughly 5,500 times — reading spawn-alert-preferences, a
table that has never held a record.

Its SNS topic has zero confirmed subscriptions, so even a triggered alert had
nowhere to go. The path was dead at both ends, not just the input.

The dashboard half goes too, deliberately

POST /api/alert-preferences was the only writer of that table. Removing its
only reader while keeping the endpoint would leave a user-facing API that accepts
configuration nothing consumes — the #790 defect verbatim, recreated in the
dashboard on the same day it was fixed in the CLI.

spawn-cost-history is unaffected: cost-history-collector still writes it
and lambda/dashboard-api/cost_history.go still reads it. Only the evaluator's
read of it went away. Checked before removing, because an hourly collector
writing a table nothing reads would have been the same finding one component
over.

Live teardown

Hand-deployed, not CloudFormation, so per-resource. Deleted from
966362334030/us-east-1, each verified absent afterwards:

resource
spawn-alert-evaluator function
spawn-alert-evaluator-hourly rule — target removed first
/aws/lambda/spawn-alert-evaluator log group, 416 KB

Not deleted, and the snapshot is why:

Full descriptors were saved before deletion.

Counts re-measured, not decremented

docs/infra-account.md now says 100 resources, from
spawn footprint -o json: rules 5→4, functions 18→17, log groups 18→17.

The first version of that edit was hand-arithmetic and said 101 — wrong, because
it forgot the rule. Reverted and measured instead. That page's own rule
("measured, not recalled") exists for exactly this, and it caught me.

⚠️ Not in effect yet — #797

dashboard-api is hand-deployed and still serving the old code, so production
still accepts those writes
until it is redeployed. Filed #797 rather than
redeploying a live, in-use REST backend in the same change as retiring an idle
scheduled function — different risk classes, and doing the second unprompted is
how a clean teardown becomes an outage.

Verification

make check green across all 10 nested modules — down from 11, picked up by
discovery rather than a list. check-docs, changelog and semgrep (0 findings)
clean.

Tier 0 e2e with -count=1 against a freshly built bin/spawn, 66s. Go's
test cache cannot see a binary read at runtime, and #792 bit twice today, so a
cached PASS there is not evidence.

…ts (#794)

Completes the alerting removal #783 began. This half was DEPLOYED and
running, which is the difference: alert-evaluator had been invoked hourly
since 2026-02-20 — roughly 5,500 times — reading spawn-alert-preferences,
a table that has never held a record.

Its SNS topic has ZERO confirmed subscriptions, so even a triggered alert
had nowhere to go. The path was dead at both ends, not just the input.

## The dashboard half goes too, deliberately

POST /api/alert-preferences was the ONLY writer of that table. Removing
its only reader while keeping the endpoint would leave a user-facing API
that accepts configuration nothing consumes — the #790 defect verbatim,
recreated in the dashboard on the same day it was fixed in the CLI.

spawn-cost-history is unaffected: cost-history-collector still writes it
and lambda/dashboard-api/cost_history.go still reads it. Only the
evaluator's read of it went away. Checked before removing, because an
hourly collector writing a table nothing reads would have been the same
finding one component over.

## Live teardown, and what was deliberately NOT touched

Deleted from 966362334030/us-east-1, each verified absent afterwards:

  spawn-alert-evaluator                 (function)
  spawn-alert-evaluator-hourly          (rule, target removed first)
  /aws/lambda/spawn-alert-evaluator     (log group, 416 KB)

NOT deleted, and the snapshot is why:

  SpawnDashboardLambdaRole — shared by FIVE functions, four still live
      (dashboard-api, both websocket functions, cost-history-collector).
      Deleting "its" role alongside the function would have broken the
      dashboard. Verified intact, now with four dependants.

  spawn-cost-alerts topic, spawn-alert-preferences table — declared in
      alerts-tables.yaml alongside spawn-cost-history, which is live. Both
      belong to the control-plane reaping in #653.

It was hand-deployed, not CloudFormation, so teardown was per-resource.
Full descriptors saved before deletion.

## Counts re-measured, not decremented

docs/infra-account.md now says 100 resources, from
`spawn footprint -o json`: rules 5->4, functions 18->17, log groups 18->17.

The first version of that edit was hand-arithmetic and said 101 — wrong,
because it forgot the rule. Reverted and measured instead. The page's own
rule ("measured, not recalled") exists for this, and it caught me.

## Not in effect yet

dashboard-api is hand-deployed and still serving the old code, so
production still accepts those writes until it is redeployed. Filed #797
rather than redeploying a live, in-use REST backend in the same change as
retiring an idle scheduled function.

## Verification

make check green across all 10 nested modules (down from 11 — discovery,
not a list). check-docs, changelog and semgrep (0 findings) clean.
Tier 0 e2e with -count=1 against a freshly built bin/spawn, 66s: Go's
cache cannot see a binary read at runtime (#792 bit twice today).
@codecov

codecov Bot commented Oct 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@scttfrdmn
scttfrdmn merged commit d3a92a8 into main Oct 11, 2026
7 checks passed
@scttfrdmn
scttfrdmn deleted the remove/794-alert-evaluator branch October 11, 2026 01:29
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.

The entire alerting subsystem has zero users: alert-evaluator has run hourly for 232 days against an empty table

1 participant