Skip to content

Conversation

@keelerm84
Copy link
Member

@keelerm84 keelerm84 commented Nov 7, 2025

Note

Propagates environment_id from X-LD-EnvID and handles FDv1 fallback from X-LD-FD-Fallback across polling/streaming, with failures now carrying headers for accurate update states.

  • Datasource v2:
    • Polling: Read environment_id and FDv1 fallback from response headers using _LD_ENVID_HEADER/_LD_FD_FALLBACK_HEADER; include environment_id in all Updates; pass headers through _Fail; requesters attach headers on errors.
    • Streaming: Capture headers on Start/Fault; pass environment_id through message processing and error handling; use standard header constants for fallback; include environment_id on all relevant Updates.
  • Util:
    • Add _LD_ENVID_HEADER/_LD_FD_FALLBACK_HEADER constants; _Fail now includes headers; remove headers from UnsuccessfulResponseException and related callers; minor typing updates.
  • Config/Test Utilities:
    • Clean up unused TODOs; update TestDataV2 usage docs to show datasystem_config integration and builder callables.

Written by Cursor Bugbot for commit cc6e742. This will update automatically on new commits. Configure here.

@keelerm84 keelerm84 requested a review from a team as a code owner November 7, 2025 20:41

try:
update = self._process_message(action, change_set_builder)
update = self._process_message(action, change_set_builder, envid)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Environment ID Fails to Persist

The envid variable is reset to None at the start of each loop iteration, causing all Event actions to lose the environment ID that was captured from the initial Start action. The environment ID should persist across the stream session, but resetting it means only the Start action itself retains the correct envid, while all subsequent events processed by _process_message receive None instead of the actual environment ID.

Fix in Cursor Fix in Web

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