Skip to content

fix: honor before-hook user in cloud evaluation - #212

Open
pcbeingused33 wants to merge 1 commit into
DevCycleHQ:mainfrom
pcbeingused33:fix/c7933-cloud-hook-user
Open

pcbeingused33 wants to merge 1 commit into
DevCycleHQ:mainfrom
pcbeingused33:fix/c7933-cloud-hook-user

Conversation

@pcbeingused33

Copy link
Copy Markdown

Cloud variable evaluation merges the context returned by before hooks, but the Retrofit call still passes the original user. Targeting therefore evaluates the original attributes even when a hook replaces the user.

Use the user from the merged hook context for the cloud variable request.

This mirrors the before-hook user fix in DevCycleHQ/python-server-sdk#126.

The regression test runs against a local HTTP server that returns a variation based on the request's country. It checks that the serialized request contains the replacement user's ID and country and that the client returns the corresponding variation.

AI assistance was used to prepare the code and regression test.

@pcbeingused33
pcbeingused33 requested a review from a team as a code owner December 1, 2026 09:19
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