Skip to content

Handle revoked installations in status checks - #185

Merged
dblock merged 1 commit into
slack-ruby:masterfrom
dblock:fix/inactive-status
Oct 25, 2026
Merged

dblock merged 1 commit into
slack-ruby:masterfrom
dblock:fix/inactive-status

Conversation

@dblock

@dblock dblock commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator

Summary

Address the status-endpoint portion of #152. Select an active installation rather than pinging inactive credentials. When Slack returns account_inactive or invalid_auth, log the failure, deactivate through the existing service callbacks, and return HTTP 200 with an explicit ping: { ok: false, error: ... }. Compute the active-team count after the ping so it reflects deactivation. When no active installations remain, skip the Slack call. Other failures retain their error behavior and do not deactivate installations.

Document the changed monitoring contract in UPGRADING. This does not change general OAuth reinstall semantics or implement RTM socket teardown/restart; that part of #152 needs follow-up in the extracted RTM extension. The issue deliberately remains open.

Validation

Status and existing OAuth/reinstall specs pass with Mongoid 9.1 and Active Record 8.1 on Ruby 4.0.9 / Grape 4: 37 examples, 0 failures each. Lint passes. Cases cover selection among inactive records, both terminal credential errors, updated counts, service deactivation, unrelated errors, and no-active-team behavior.

Authored by Copilot (AI), on behalf of @dblock.

@dblock
dblock force-pushed the fix/inactive-status branch from d64fe4a to 6887a71 Compare October 25, 2026 19:59
@github-actions

Copy link
Copy Markdown

Danger Report

No issues found.

View run

@dblock
dblock merged commit 7563ee8 into slack-ruby:master Oct 25, 2026
24 checks passed
@dblock
dblock deleted the fix/inactive-status branch October 25, 2026 20:05
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