Skip to content

fix: list shows shutting-down; footprint sees Scheduler schedules; reaper counts failed group deletes; monitoring doc tag route - #1309

Merged
scttfrdmn merged 1 commit into
mainfrom
fix/accuracy-1167-1219-1211-1244
Oct 26, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
fix/accuracy-1167-1219-1211-1244

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

Four accuracy fixes for spawn v0.146.0.

Fixes #1167
Fixes #1219
Fixes #1211
Fixes #1244

#1167: spawn list shows shutting-down instances

  • The default (and new --state live) is pending, running, stopping, stopped and shutting-down. It asks for every state and drops terminated in cmd/list.go. The table colours shutting-down and adds a stderr note that those instances are still billed. --state active gives the old listing.
  • The shared ListInstances("") default is unchanged. It is now instanceStateFilterValues (unexported) so it can be pinned by a test; about 15 callers depend on it.
  • Gates: TestListDefaultShowsShuttingDown (seam listInstancesForList, with a fake that filters the way EC2 does), TestInstanceLookupKeepsTheSharedStateDefault (resolveInstance still asks for ""), TestInstanceStateFilterValues_DefaultExcludesShuttingDown.

#1219: spawn footprint lists EventBridge Scheduler schedules

  • scanSchedules runs ListSchedules with no GroupName, so it covers every group. A schedule counts as spawn's if its target is a spore.host Lambda (scheduler-handler), its name or group carries a spore.host prefix, or it has spawn's sched-YYYYMMDD-HHMMSS shape and spawn's Description. For that last check it calls GetSchedule, and only for those candidates. The description prefix is now the constant pkg/scheduler.ScheduleDescriptionPrefix, which both CreateSchedule and footprint use.
  • Permissions: needs scheduler:ListSchedules, plus scheduler:GetSchedule for the description check. No documented CLI-user policy in spawn or the umbrella repo grants these, and none grants the lambda/logs/events reads footprint already makes. When a call is denied, the scan adds a "Could not read" note that names the permission. It never aborts.
  • The test captures the real CreateSchedule request through a fake HTTP transport (no network). It checks the identification against what spawn actually sends, not against a copy.
  • lambda/sweep-orchestrator/go.mod gets the scheduler SDK as an indirect dependency, because it imports pkg/aws.

#1211: ttl-reaper counts a failed SG/PG delete as an error

#1244: monitoring doc

  • docs/self-hosted-monitoring.md and the alertmanager.yaml comment now show the route that works: aws ec2 create-tags (adding metrics-bind=0.0.0.0), then restart spored, because spored reads these tags only at startup. New gate TestDocumentedLaunchTagsAreAccepted runs every documented --tag on launch, snapshot create and capacity-block purchase through parseKVTags. Launch flags are follow-up No launch path can set spored's metrics/tracing/idle-cpu tags (launch flags or --tag allow-list) #1308, and the tag-contract allow-list reasons now point to it.

Each gate was watched failing against a revert that compiles. make check passes up to check-build-tags, which fails the same way on unmodified main (/private/tmp paths). semgrep is clean, lint reports 0 issues, check-docs passes.

…aper counts failed group deletes, monitoring doc tag route

- spawn list default (and --state live) includes shutting-down; --state active
  is the old listing; the shared ListInstances default is unchanged (#1167)
- spawn footprint lists EventBridge Scheduler schedules across groups,
  identified by target, name/group, or spawn's description (#1219)
- ttl-reaper counts a failed SG/PG delete as an operational error; enable
  nilnesserr (#1211)
- self-hosted monitoring doc: spawn: tags are reserved, show the
  create-tags + spored restart route; launch flag tracked in #1308 (#1244)
@codecov

codecov Bot commented Oct 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 82.29167% with 17 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/list.go 75.75% 6 Missing and 2 partials ⚠️
pkg/aws/footprint.go 84.31% 6 Missing and 2 partials ⚠️
cmd/footprint.go 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@scttfrdmn
scttfrdmn merged commit ae59b0a into main Oct 26, 2026
9 checks passed
@scttfrdmn
scttfrdmn deleted the fix/accuracy-1167-1219-1211-1244 branch October 26, 2026 03:40
@scttfrdmn scttfrdmn mentioned this pull request Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment