Skip to content

Conversation

@gcharest
Copy link
Contributor

@gcharest gcharest commented Feb 6, 2026

Summary | Résumé

This pull request refactors how the SRE module's geolocation functionality is integrated and registered, moving away from a legacy command provider approach to a more unified, platform-agnostic command registration system. It also enhances the geolocation Slack output and improves platform provider initialization. The main changes are grouped below:

SRE Geolocation Command Refactoring

  • Removed the legacy GeolocateProvider class and its direct registration as a Slack subcommand, along with its helper module and related unit/integration tests. This eliminates the old, Slack-specific way of handling the /sre geolocate command and its associated test coverage. [1] [2] [3] [4] [5] [6]
  • Introduced a platform-agnostic command registration mechanism in modules/sre/__init__.py, using hooks to register commands for Slack, Teams, and Discord.

Command Dispatching and Routing

  • Added a _dispatch_platform_command function to the SRE module, which dynamically dispatches subcommands to the appropriate platform provider, improving extensibility and decoupling command handling from Slack-specific logic. The main /sre command handler now uses this dispatcher before falling back to the legacy router. [1] [2]

Platform Provider Initialization

  • Enhanced the server's lifespan startup to initialize all enabled platform providers, handle partial failures gracefully, and register platform commands for Slack, Teams, and Discord using a discovery function. [1] [2]

Geolocation Slack Output Improvement

  • Improved the formatting of geolocation results in Slack: country code and postal code fields are now included, and a fallback message is shown if no location data is available. [1] [2]

Minor Improvements

  • Minor import order fix in the Slack provider integration file for consistency.

These changes modernize the SRE module's command handling, improve maintainability, and enhance the user experience for geolocation commands across multiple platforms.

@gcharest gcharest requested a review from a team February 6, 2026 22:52
@gcharest gcharest self-assigned this Feb 6, 2026
@gcharest gcharest merged commit 499e241 into main Feb 10, 2026
9 checks passed
@gcharest gcharest deleted the feat/wire_platforms_geolocate branch February 10, 2026 18:03
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