Skip to content

feat: Reset manual topic changes in incident channels#260

Merged
spalmurray merged 5 commits into
mainfrom
spalmurray/slack-topic-guard
Jun 26, 2026
Merged

feat: Reset manual topic changes in incident channels#260
spalmurray merged 5 commits into
mainfrom
spalmurray/slack-topic-guard

Conversation

@spalmurray

@spalmurray spalmurray commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Adds a Slack event handler that reverts manual topic edits in incident channels back to the Firetower-managed topic and sends the editor an ephemeral explaining the reset, quoting what they tried to set, and pointing them to /ft subject, /ft severity, and /ft captain to change incident details instead. This is firetower's first Socket Mode event subscription (message.channels/message.groups), so a no-op catch-all suppresses unhandled-message log spam; a bot-author guard prevents reset loops; and an in-memory event-id cache dedups Slack redeliveries (correct as long as the firetower-slack-app service stays single-instance). User-supplied topic text is escaped before it goes into the ephemeral.

Tested in test env. Just need to update prod manifest for new events.

@spalmurray spalmurray force-pushed the spalmurray/slack-topic-guard branch from e42aca7 to eadf647 Compare June 25, 2026 16:48
Comment thread src/firetower/slack_app/handlers/topic_guard.py
@spalmurray spalmurray marked this pull request as ready for review June 25, 2026 18:04
@spalmurray spalmurray requested a review from a team as a code owner June 25, 2026 18:04

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit eadf647. Configure here.

Comment thread src/firetower/slack_app/handlers/topic_guard.py
Comment thread src/firetower/slack_app/handlers/topic_guard.py
Comment thread src/firetower/slack_app/handlers/topic_guard.py
@spalmurray spalmurray merged commit b106077 into main Jun 26, 2026
38 checks passed
@spalmurray spalmurray deleted the spalmurray/slack-topic-guard branch June 26, 2026 16:06
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.

2 participants