Repository navigation
feat: wall off chat-platform integrations for 1.0 (SPAWN_EXPERIMENTAL_CHAT) - #1570
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
This was referenced Nov 10, 2026
Merged
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.
Refs spore-host/spore-host#611, #644
Owner decision (2026-11-09): drop Slack/Teams/Discord for v1 and wall it off. This PR walls it off and removes nothing: no package is deleted, and the code still works behind an explicit opt-in so the feature can return after 1.0.
The opt-in
One name everywhere:
SPAWN_EXPERIMENTAL_CHAT=1. The same opt-in can live in~/.spawn/config.yamlasexperimental: {chat: true}. Precedence is env > file > off, soSPAWN_EXPERIMENTAL_CHAT=0turns a file opt-in off, and a value it doesn't recognise counts as off. The dashboard-api Lambda reads the same variable from its own environment.Without it, every gated entry point is hidden from
--help. It refuses, exits 1, makes no AWS call (no config load and no request), and writes no file:Entry points gated
spawn notifygroup (aliasspawn bot):register,deregister,enable,disable,list,workspace add|remove|list|destroy, the four hidden deprecatedworkspace-*shims, and a barespawn notify. The gate is the group'sPersistentPreRunE.spawn launch --slack-workspaceand--notify-platform. These are checked first inrunLaunch, ahead of every dispatch (single, sweep, batch queue).spawn defaults set slack-workspace.defaults unsetstays open, so a stored value can always be removed.buildLaunchConfigrefuses a chat setting without the opt-in. It is the one builder behind single, sweep, pipe and--dry-runlaunches, so a path that skips the flag gate still can't write chat settings.spawn sweep resumeof a checkpoint that recorded chat settings drops them, prints a notice, and resumes the rest./api/slack/*(oauth,oauth/callback,token/rotate) returns 404 with an explanation unless the function's environment setsSPAWN_EXPERIMENTAL_CHAT=1. The check runs before the AWS config loads. The hosted function has no such variable, and its deploys (deploy.sh, CI) leave the environment untouched, so its next deploy turns the endpoints off.No built-in bot endpoint (hosted spore-bot is gone)
awdzf7fbbsvqcrnrzusqjsuybm0iiyvf) behindSPORE_NOTIFY_URL, and the hostedspore-bot-roleprincipal behindSPORE_BOT_LAMBDA_ROLE_ARN(DefaultBotLambdaRoleARN,SporeBotRoleName, the per-environment maps).SPORE_NOTIFY_URLset to the operator's own bot (https).notify registerwithout--role-arnneedsSPORE_BOT_LAMBDA_ROLE_ARN. Each is refused before any AWS call when unset.g8iytgzrn8, and any*bot*role in 966362334030.bot-cross-account-role.yamlchanged in three ways:BotLambdaRoleArnhas no default.ExternalIdis required (MinLength: 16).${TagPrefix}-bot("spawn-bot") ExternalId fallback is removed. spore-bot hasn't presented it since Add resources.instance_type to TaskSpec for exact instance-type pinning #413.pkg/bot'ssharedBotExternalIDsstill listsspawn-bot/prism-bot. It is a deny-list (those values are treated as "not per-account"), not a use.bot_principal_test.gonow fails CI if the template gains a default principal or a shared ExternalId again, or if any file names a bot role in the infra account.Default launch path (no opt-in)
The launch config object (what spored reads at boot) gets no
notify-url,notify-command,notify-platformorslack-workspace-id. No chat tag is written either. spored builds its notifier only whenNotifyURLis set, so it starts none. A Spot replacement reads the same settings from the request, so it starts none either. User data never carried chat input. A storeddefaults.slack_workspaceis ignored with a one-line notice and does not fail the launch.TestDefaultLaunchConfiguresNoChatasserts all of this againstaws.LaunchConfigObject.Non-chat notifications: unaffected
--completion-webhook-urland--spot-webhook-urlkeep working. spored POSTs straight to the user's URL (postWebhook), and nothing goes through spore-bot.REAPER_NOTIFY_URLis unaffected. It posts a Slack-incoming-webhook-shaped{"text":…}body, but straight to the configured URL, with no spore-bot involved.Decision for the owner
lambda/spore-bot/sms_notify.go), on the same registrationsspawn notifywrites. Wallingnotifytherefore walls SMS too, and decommissioning the hosted bot ends it either way. I walled it rather than carving it out, because SMS is impossible without a bot. If SMS should survive 1.0 without the chat stack, it needs its own path.Docs
docs-genkeeps the chat reference:notify.md, the two launch flags and theslack-workspacedefault are rendered whatever the shell opts in to, each labelled experimental in its own text.gen-docsand the drift test share one generator, so they can't disagree.docs/reference/cli-iam-actions.mdkeeps the notify rows too, because a user who opts in needs those permissions. Its only change is aspawn notify | nonerow, since the bare group is now runnable.notifyis out of the command table, and a new "Experimental: chat-platform notifications" section points to the webhooks.docs/infra-account.md: the spore-bot section is marked experimental, the dashboard-api row notes the gate, and there is a new "Deploy notes" paragraph.spore-bot.yamlgets an "experimental, unsupported in 1.0" header and no functional change.Deploy checklist
scripts/deploychecklistnow collects// deploychecklist:note <text>lines from the files compiled into each Lambda at--to. Each one appears under that Lambda as a- [ ] note:checkbox, and in the JSON as an additivenotesfield (schema unchanged). dashboard-api carries a note to keepSPAWN_EXPERIMENTAL_CHATunset onspawn-dashboard-api, with theget-function-configurationcommand to check it.Not covered here (other repos)
slack-workspace/notify-platform(src/core/tags.ts,src/cli/commands.ts).docs-gen/notify.mdshould add its own "Experimental" heading.Tests
The gates were each seen to fail against a revert that compiles:
cmd/chat_gate_test.go. It discovers every runnable command undernotify(fails below 14), then checks:defaults setand thebotalias, refuses with zero AWS config loads, zero requests and no file written;0overrides it;pkg/config: opt-in precedence;defaults setkeeps the opt-in; dashboard-api uses the same variable name; no default bot endpoint; URL and ARN validation.lambda/dashboard-api/chat_gate_test.go: every/api/slackroute inmain.gois covered (discovered from the router). Each returns 404 with no AWS config load for unset,0,falseand an unrecognised value, and reaches its handler when opted in. Other routes are untouched.scripts/deploychecklist: notes come only from compiled files (not test files, not packages the Lambda doesn't compile, not prose or strings), and the real dashboard-api's note is discovered.TestSweepFlagRulesHoldAgainstTheCode,TestResumedMemberIsTheLaunchedMember,TestDetachedResumeRelaunchesFromParamsCarryingEveryFlag) now opt in, and set a self-hostedSPORE_NOTIFY_URL.Local:
make checksteps pass withGOTOOLCHAIN=go1.27.3and the AWS env stripped, except the two known~/.xtmppath-space failures (TestSetupAllRunsEveryStepFromAnyDirectory,check-build-tags).make cli-iam-actionsandmake gen-docswere run and committed.semgrep scan --config=auto --error .is clean, and so iscfn-linton both templates.