feat(driver): CloudDriver forwards X-Owner-Id (DRO-1682)#379
Merged
Conversation
Add optional owner_id param to CloudDriver.__init__; when set alongside user_id, include X-Owner-Id in default_headers so cloud calls carry the tenancy header devices-api now requires (#503). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
RasulOs
approved these changes
Jul 6, 2026
2 tasks
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
CloudDriver.__init__gains an optionalowner_id: str | None = Noneparameter.user_idis set andowner_idis provided,X-Owner-Idis added todefault_headersalongside the existingX-User-IDheader. Whenowner_idisNone, behavior is unchanged (header omitted).Release / rollout note (action required by a human)
0.6.0rc6) must be cut from this change, and tasks-api'spyproject.tomlpin (mobilerun[langfuse]==0.6.0rc5) must be bumped to that release, beforeowner_idcan actually be passed through and take effect.0.6.0rc5has noowner_idparam and wouldTypeErrorif called with one.Test plan
tests/test_cloud_driver_sdk.py:test_owner_id_forwarded_as_x_owner_id_header— constructsCloudDriver(device_id="d", user_id="u", owner_id="o")and asserts the client'sdefault_headerscontainsX-Owner-Id: o(no network call, mockedAsyncMobilerun).test_owner_id_omitted_when_not_provided— assertsX-Owner-Idis absent whenowner_idis not passed.uv run pytest— full suite green (220 passed).Part of DRO-1682