fix: improve Socket Mode client stability and correctness#1854
Merged
WilliamBergamin merged 3 commits intomainfrom Apr 10, 2026
Merged
fix: improve Socket Mode client stability and correctness#1854WilliamBergamin merged 3 commits intomainfrom
WilliamBergamin merged 3 commits intomainfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1854 +/- ##
==========================================
+ Coverage 83.99% 84.01% +0.01%
==========================================
Files 117 117
Lines 13253 13256 +3
==========================================
+ Hits 11132 11137 +5
+ Misses 2121 2119 -2 ☔ View full report in Codecov by Sentry. |
srtaalej
approved these changes
Apr 9, 2026
Contributor
srtaalej
left a comment
There was a problem hiding this comment.
LGTM ⭐ but looks like you have some unit tests failing - i left a comment with a potench solution?
| def test_connect_to_new_endpoint_does_not_release_lock_on_acquisition_timeout(self): | ||
| client = BaseSocketModeClient.__new__(BaseSocketModeClient) | ||
| client.logger = self.logger | ||
| client.connect_operation_lock = create_autospec(Lock(), acquire=MagicMock(return_value=False)) |
Contributor
There was a problem hiding this comment.
looks like this is where unit tests are failing. this is the fix according to claude
Suggested change
| client.connect_operation_lock = create_autospec(Lock(), acquire=MagicMock(return_value=False)) | |
| mock_lock = create_autospec(Lock()) | |
| mock_lock.acquire.return_value = False | |
| client.connect_operation_lock = mock_lock |
Contributor
Author
There was a problem hiding this comment.
Thats spot on 💯 thanks for sharing the solution 🥇
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.
Summary
These changes aim to improve the stability and correctness of socket-mode client, the issues were mainly found using AI tools and confirmed by human to be legitimate.
This does not introduce any behavior change to the project
Testing
CI testing should be sufficient
Category
/docs(Documents)/tutorial(PythOnBoardingBot tutorial)tests/integration_tests(Automated tests for this library)Requirements
python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.shafter making the changes.