Skip to content

Conversation

@aarsilv
Copy link
Contributor

@aarsilv aarsilv commented Jan 20, 2026

Summary

  • Adds round-trip tests verifying export/import workflow
  • Tests that configurations exported via getFlagsConfiguration() and getBanditsConfiguration() can be successfully imported via offlineInit()
  • Round-trip tests use the shared test cases from sdk-test-data repository (UFC and Bandit test suites) to ensure offline-initialized clients produce identical assignment results to online-initialized clients

Stacked PRs

Test plan

  • Verify exported flags configuration can be used with offlineInit
  • Verify flag assignments match between online and offline initialized clients using shared UFC test cases
  • Verify bandit configurations round-trip correctly using shared Bandit test cases

🤖 Generated with Claude Code

@aarsilv aarsilv force-pushed the aarsilv/ffesupport-461-offline-init-part3-offline-init branch from b1eab56 to c6bb75d Compare January 20, 2026 03:04
@aarsilv aarsilv force-pushed the aarsilv/ffesupport-461-offline-init-part4-shared-roundtrip-tests branch from ca3c73a to 94440d2 Compare January 20, 2026 03:04
@aarsilv aarsilv force-pushed the aarsilv/ffesupport-461-offline-init-part3-offline-init branch from c6bb75d to a769852 Compare January 20, 2026 03:08
@aarsilv aarsilv force-pushed the aarsilv/ffesupport-461-offline-init-part4-shared-roundtrip-tests branch from 94440d2 to 1379067 Compare January 20, 2026 03:08
@aarsilv aarsilv force-pushed the aarsilv/ffesupport-461-offline-init-part3-offline-init branch from a769852 to b9221c2 Compare January 20, 2026 03:10
@aarsilv aarsilv force-pushed the aarsilv/ffesupport-461-offline-init-part4-shared-roundtrip-tests branch from 1379067 to af1b3d2 Compare January 20, 2026 03:10
@aarsilv aarsilv changed the title Add shared test data round-trip tests for offline initialization Offline Init Part 4 of 4: Add shared test data round-trip tests for offline initialization Jan 20, 2026
@aarsilv aarsilv force-pushed the aarsilv/ffesupport-461-offline-init-part3-offline-init branch from b9221c2 to 7cc0255 Compare January 20, 2026 03:20
@aarsilv aarsilv force-pushed the aarsilv/ffesupport-461-offline-init-part4-shared-roundtrip-tests branch from cd66e3e to 97f3542 Compare January 20, 2026 03:20
@aarsilv aarsilv force-pushed the aarsilv/ffesupport-461-offline-init-part3-offline-init branch from 7cc0255 to 0466712 Compare January 20, 2026 03:24
@aarsilv aarsilv force-pushed the aarsilv/ffesupport-461-offline-init-part4-shared-roundtrip-tests branch from 97f3542 to ea6a7ce Compare January 20, 2026 03:24
@aarsilv aarsilv force-pushed the aarsilv/ffesupport-461-offline-init-part3-offline-init branch from 0466712 to 065c1b6 Compare January 20, 2026 03:41
@aarsilv aarsilv force-pushed the aarsilv/ffesupport-461-offline-init-part4-shared-roundtrip-tests branch from ea6a7ce to 71aac8b Compare January 20, 2026 03:41
@aarsilv aarsilv force-pushed the aarsilv/ffesupport-461-offline-init-part3-offline-init branch from 065c1b6 to 3b021c2 Compare January 20, 2026 03:48
@aarsilv aarsilv force-pushed the aarsilv/ffesupport-461-offline-init-part4-shared-roundtrip-tests branch from 71aac8b to 765ae90 Compare January 20, 2026 03:48
aarsilv and others added 3 commits January 19, 2026 23:13
Validates offline initialization using the shared UFC and bandit test data:
- Initializes SDK via API, exports configuration
- Resets module state and re-initializes using offlineInit
- Runs all shared test cases against offline-initialized client

This ensures exported configurations can be successfully used to bootstrap
new SDK instances with identical behavior.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fixes test isolation issue where tests ran after API server was closed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…ests

Move offlineInit describe block inside the main 'EppoClient E2E test' block
so that round-trip tests have access to the mock API server started in
beforeAll. Also fix indentation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@aarsilv aarsilv force-pushed the aarsilv/ffesupport-461-offline-init-part4-shared-roundtrip-tests branch from 765ae90 to 0f2cf90 Compare January 20, 2026 04:17
},
],
doLog: true,
describe('offlineInit', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is now pulled in to the parent E2E block so we can reuse the mock API server later on for offline init round-trip tests.

For some reason this really tripped up GitHub's diff

});
});

describe('Shared UFC Test Cases via Offline Round-Trip', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the meat of the change: using our shared test data to init normally, export the config, then offline init and run the shared test cases 💪

);
});

describe('Shared Bandit Test Cases via Offline Round-Trip', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

And the bandit meat 💪

@aarsilv aarsilv marked this pull request as ready for review January 20, 2026 04:24
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds round-trip tests that validate the offline initialization workflow by exporting configurations from an online-initialized client and re-importing them via offlineInit(). The tests verify that offline-initialized clients produce identical assignment results to online-initialized clients using shared test cases from the sdk-test-data repository.

Changes:

  • Removed an extra closing brace that was causing a structural error
  • Added round-trip tests for UFC (Universal Feature Configuration) test cases
  • Added round-trip tests for Bandit test cases

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@greghuels greghuels left a comment

Choose a reason for hiding this comment

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

Nice!

@greghuels greghuels assigned aarsilv and unassigned sameerank Jan 21, 2026
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.

4 participants