Skip to content

feat: Discord lifecycle notifications — spawn side (Phase 1 of #2) - #169

Merged
scttfrdmn merged 1 commit into
mainfrom
feat/2-discord-notifications
Jun 14, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
feat/2-discord-notifications

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

Phase 1 of #2 (Discord support), spawn-repo half. Pairs with the umbrella PR adding the Discord embed sender to lambda/spore-bot.

What

Discord becomes a third notification platform alongside Slack/Teams, for outbound lifecycle notifications (TTL/idle/spot/completion). Slash commands are Phase 2.

  • spored notifier (pkg/agent/notifier.go): platform was hardcoded "slack"; now from cfg.NotifyPlatform, defaulting to slack when unset (existing launches unchanged).
  • Tag plumbing: new spawn:notify-platform tag — read in pkg/provider/ec2.go, written by buildTags (pkg/aws/client.go), set by the launch flag.
  • spawn launch --notify-platform slack|teams|discord.
  • spawn notify workspace-add --platform discord: Discord verifies interactions with an Ed25519 public key, not a signing secret, so --signing-secret isn't required for discord — added --public-key (required for discord; used by Phase 2) and --webhook-url (channel webhook). New PublicKey + IncomingWebhookURL fields on the stored workspace; --platform help + errors now say slack, teams, or discord.

Where the rest lives

The Discord embed builder + the /notify Discord branch are in spore-host/spore-host lambda/spore-bot/ (separate PR), since that's the hosted service that does platform-specific delivery. spored just POSTs a generic event with platform: discord.

Tests

pkg/agent/notifier_test.go: platform comes from config; defaults to slack; nil Notifier when no URL. make check green.

Phase 2 (interactions endpoint: Ed25519 verify, PING/PONG, /spore slash commands) tracked on #2.

Adds Discord as a third notification platform alongside Slack/Teams. spored's
notifier no longer hardcodes "slack": platform comes from a new
spawn:notify-platform tag (default slack, so existing launches are unchanged),
set by `spawn launch --notify-platform discord`.

`spawn notify workspace-add --platform discord` accepts --public-key (Discord's
Ed25519 application key — there's no signing secret, so --signing-secret isn't
required for discord) and --webhook-url for the channel webhook. New PublicKey
+ IncomingWebhookURL fields on the stored workspace.

The Discord embed sender and the /notify branch live in the spore-host umbrella
(lambda/spore-bot); this is the spawn-side CLI + spored wiring. Slash commands
are Phase 2.
@codecov

codecov Bot commented Jun 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 40.74074% with 16 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cmd/bot.go 38.46% 8 Missing ⚠️
cmd/launch.go 25.00% 2 Missing and 1 partial ⚠️
pkg/aws/client.go 0.00% 2 Missing and 1 partial ⚠️
pkg/provider/ec2.go 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@scttfrdmn
scttfrdmn merged commit 8a28d0d into main Jun 14, 2026
3 checks passed
@scttfrdmn
scttfrdmn deleted the feat/2-discord-notifications branch June 14, 2026 18:31
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.

1 participant