Repository navigation
remove: the spawn alerts path and the stranded self-hosted stack (#783) - #796
Merged
Merged
Conversation
BREAKING: `spawn alerts create|list|delete|history` is gone. Next release must bump MINOR. #783 asked whether two artifacts were prior art or dead ends. The answer turned out to be measurable rather than a matter of taste. ## Why remove alert-handler rather than deploy it Three facts, each checked: 1. Nothing emitted the event it handled. The handler is `handler(ctx, event SweepEvent)`, and sweep-orchestrator's only lambda.Invoke is reinvokeSelf — using its own identically-named type to re-invoke itself. So deploying the function would have changed nothing; you would also need an emission path and a scheduler for the long_running and cost_threshold triggers. "Deploy it" was a feature project, not a deployment. 2. Zero users. spawn-alerts: Count=0. Nobody has ever successfully created an alert, so the removal takes nothing from anyone. 3. Never developed. Every commit touching it since the initial one is mechanical — CVE bumps, a Go version bump, a test migration. The project also already has a live, differently-modelled alerting path: alert-evaluator reads spawn-alert-preferences and is untouched here. It has had nothing to do since 2026-02-20 either (#794), but that is a separate decision about a separate component. ## Why delete self-hosted-stack.yaml One commit — the initial one — never edited, never deployed in either account. 11 resources and NO functions, so deploying it produces half a control plane, and it declared a log group for the function removed above. Its informational value is superseded by docs/infra-account.md, which maps 103 resources measured from the live account rather than 11 imagined in February. #780 should start there. ## What is deliberately NOT removed - spawn-alerts / spawn-alert-history in AWS. Still deployed, still empty. Deleting live tables is control-plane reaping (#653) and not something to fold into a code change. - deployment/cloudformation/alerts-tables.yaml. Two of its four tables (spawn-cost-history, spawn-alert-preferences) are read by LIVE functions, so deleting it would strand deployed infrastructure. - pkg/aws.GenerateScopedDynamoDBPolicy's spawn-alerts ARNs. That generator has no production caller — only tests — so its grants are never created. Editing dead code is churn; recording the decision so it does not read as an oversight. ## The gate's exception list is now empty undeployedFunctions existed for exactly one entry, spawn-alert-handler. #783 resolved it by removal, so every Lambda name in Go source is now one that a deploy mechanism in this repo actually creates. Kept as an empty map with a note: an addition is a claim that something is referenced while nothing deploys it, which is a state to fix rather than record. ## Two stale-artifact gaps this surfaced - TestNoNewAWSSDKImportsInCmd failed with "allowlist references alerts.go, which no longer exists". The gate working as designed. - `make check-docs` PASSED while docs-gen/alerts.md survived for a deleted command: gen-docs writes but never prunes, so there was no diff to detect. Published reference docs would have kept describing a command that is gone. Fragment removed; filed #795 for the gate, which is one-way today (content matches) and needs to be two-way (the file set matches the command set). - #792 bit twice more. The Tier 0 coverage gate enumerated commands from a stale bin/spawn and demanded a decision for `alerts` after it was deleted — the inverse symptom of this morning's false PASS. ## Verification make check (all 11 nested modules — discovery picked up the drop from 12 without being told), check-docs, changelog and semgrep (0 findings) clean. Tier 0 e2e re-run with -count=1 against a freshly built bin/spawn, NOT the cached result: Go's test cache cannot see a binary read at runtime, so a cached PASS here proves nothing. 65.9s, green. Public API surface unchanged: neither pkg/alerts nor pkg/infrastructure is imported by another repo, confirmed against api/public-surface.txt before deleting.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #783
Closes #790
BREAKING:
spawn alerts create|list|delete|historyis gone. The next releasemust bump MINOR.
#783 asked whether two artifacts were prior art or dead ends. The answer turned
out to be measurable rather than a matter of taste.
Why remove
alert-handlerrather than deploy ithandler(ctx, event SweepEvent);sweep-orchestrator's onlylambda.InvokeisreinvokeSelf, using its own identically-named type to re-invoke itselfspawn-alerts:Count=0. Nobody has ever successfully created an alertSo "deploy it" was never a deployment: you would also need an emission path in
sweep-orchestratorand a scheduler for thelong_runningandcost_thresholdtriggers. That is a feature project, and the project already has a live,
differently-modelled alerting path —
alert-evaluator, readingspawn-alert-preferences, untouched here. It has had nothing to do since2026-02-20 either, but that is a separate component and a separate decision
(#794).
Why delete
self-hosted-stack.yamlOne commit — the initial one — never edited, never deployed in either account. It
declared 11 resources and no functions, so deploying it yields half a control
plane, and it named a log group for the function removed above. Its informational
value is superseded by
docs/infra-account.md: 103 resources measured from thelive account, versus 11 imagined in February. #780 should start from the measured
document.
#790 is fully closed too
Its last item was "the CLI must not accept alerts it cannot deliver", which #793
fixed, and its framing was "closes once #783 is decided". Verified live after
this change:
It began the day reporting two errors, one of them false, with remediation
pointing at a command that does not exist.
Deliberately NOT removed
Recording these so they do not read as oversights:
spawn-alerts/spawn-alert-historyin AWS. Still deployed, still empty.Deleting live tables is control-plane reaping (Leave no trace: nothing reaps the control plane — the lambdas, their roles/rules/alarms, or the buckets spawn auto-creates #653), not something to fold
into a code change.
deployment/cloudformation/alerts-tables.yaml. Two of its four tables —spawn-cost-history,spawn-alert-preferences— are read by livefunctions, so deleting it would strand deployed infrastructure.
pkg/aws.GenerateScopedDynamoDBPolicy'sspawn-alertsARNs. Thatgenerator has no production caller, only tests, so its grants are never
created. Editing dead code is churn.
The gate's exception list is now empty
undeployedFunctionsexisted for exactly one entry. #783 resolved it by removal,so every Lambda name in Go source is now one that a deploy mechanism in this repo
actually creates. Kept as an empty map with a note: an addition is a claim that
something is referenced while nothing deploys it — a state to fix, not record.
Stale-artifact gaps this surfaced
TestNoNewAWSSDKImportsInCmdfailed with "allowlist references alerts.go,which no longer exists". The gate working as designed.
make check-docsPASSED whiledocs-gen/alerts.mdsurvived a deletedcommand.
gen-docswrites but never prunes, so there was no diff to detect,and published reference docs would have kept describing a command that is gone.
Fragment removed; filed make check-docs passes with a stale reference fragment for a deleted command: gen-docs writes but never prunes #795 — the check is one-way (content matches) and
needs to be two-way (file set matches command set).
stale
bin/spawnand demanded a coverage decision foralertsafter deletion— the inverse symptom of this morning's false PASS.
Verification
make checkgreen across all 11 nested modules — discovery picked up thedrop from 12 without being told, which is the "discover, don't list" rule paying
for itself.
check-docs, changelog andsemgrep(0 findings) clean.Tier 0 e2e re-run with
-count=1against a freshly builtbin/spawn, notthe cached result: Go's test cache cannot see a binary read at runtime, so a
cached PASS here proves nothing. 65.9s, green.
Public API surface unchanged — neither
pkg/alertsnorpkg/infrastructureisimported by another repo, confirmed against
api/public-surface.txtbeforedeleting anything.
~3,170 lines removed.