Repository navigation
Poll activities in their own organization - #38
Merged
Merged
Conversation
The poll helpers called get_activity with only the activity ID, so the request used the client's default organization. A poll for an activity submitted to a sub-organization queried the wrong organization. The poll now sends the organizationId of the activity. It uses the client default only if the activity has no organizationId. This applies to the pending poll and to the MFA and consensus polls. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
figitaki
marked this pull request as ready for review
October 21, 2026 17:20
moeodeh3
approved these changes
Oct 21, 2026
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.
Problem
The client polls an activity until it reaches a terminal status. The poll called
get_activitywith only the activity ID. Thus the request used the client's default organization.If you submit an activity with a sub-organization
organizationId, the poll queried the parent organization. The poll then failed or returned the wrong result.Fix
_poll_bodyhelper. It buildsGetActivityBodywith theorganizationIdof the activity.organizationId.make generate-http.httpis added.Tests
New offline tests in
test_activity_errors.py:create_walletwith a sub-organization ID that is different from the client default. The first response isPENDING. The test checks that the poll body has the sub-organization ID.AUTHENTICATORS_NEEDED) and the consensus poll (CONSENSUS_NEEDED).The new tests fail on
mainand pass with this change.make format-checkandmake typecheckpass. The SDK has no async client, so there is no async path to test.Closes #30
🤖 Generated with Claude Code