Skip to content

feat: Add flag overrides to the contract test service - #454

Draft
kinyoklion wants to merge 1 commit into
rlamb/overrides-ruby-file-sourcefrom
rlamb/overrides-ruby-contract-tests
Draft

kinyoklion wants to merge 1 commit into
rlamb/overrides-ruby-file-sourcefrom
rlamb/overrides-ruby-contract-tests

Conversation

@kinyoklion

@kinyoklion kinyoklion commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Summary

This PR is stacked on #453 because the test service configures the file-based override source that PR adds.

The contract test service now advertises the flag-overrides capability and accepts the overrides block of the SDK configuration described in the test harness service specification. filePaths, duplicateKeysHandling, changeDetection, and pollIntervalMs map to the options of LaunchDarkly::Integrations::FileData.override_source, which is set on the FDv2 data system builder. An overrides block without a dataSystem block is an error, as in the Go reference service.

The listen gem joins the contract test bundle so that the harness's watching change detection tests can run. The service port can be set with the PORT environment variable and still defaults to 9000, so the existing Makefile and CI steps are unchanged.

Verification against the prebuilt harness (sdk-test-harness branch rlamb/sdk-2657/flag-overrides-tests at 9ad082c, flag-overrides capability): -run 'flag overrides' ran 38 tests with 0 failures, and the full suite with no filter ran 4733 tests with 0 failures (13 skipped by pre-existing capability and long-running gates). The first run of the watching mode tests failed because the watcher relied on listen, which could not scan the system temporary directory where the harness writes its files; the watcher change in #449 corrects that, and both runs above were made with it in place.

The existing FDv1 and FDv2 file data sources keep their current behavior. This series does not change them; the override feature is additive.

SDK-3249


Note

Overview
The contract test harness service now supports flag overrides for FDv2 clients: it advertises the flag-overrides capability and maps an overrides config block (filePaths, duplicateKeysHandling, changeDetection, pollIntervalMs) onto LaunchDarkly::Integrations::FileData.override_source via data_system.overrides. Supplying overrides without dataSystem raises an error, matching the reference harness behavior.

The bundle adds the listen gem so watching-based change detection in override tests can run. The Sinatra service PORT can be set via ENV['PORT'] while still defaulting to 9000.

Reviewed by Cursor Bugbot for commit b98adec. Bugbot is set up for automated code reviews on this repo. Configure here.

@kinyoklion
kinyoklion force-pushed the rlamb/overrides-ruby-file-source branch from 605d0ab to 5bda436 Compare September 28, 2026 20:36
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-ruby-contract-tests branch from 63dd6c6 to 24a8d56 Compare September 28, 2026 20:36
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-ruby-file-source branch from 5bda436 to 4287523 Compare October 1, 2026 23:43
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-ruby-contract-tests branch from 24a8d56 to d04deb5 Compare October 1, 2026 23:43
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-ruby-file-source branch from 4287523 to 703e368 Compare October 3, 2026 00:46
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-ruby-contract-tests branch from d04deb5 to b98adec Compare October 3, 2026 00:46
@kinyoklion

Copy link
Copy Markdown
Member Author

bugbot review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit b98adec. Configure here.

The test service advertises the flag-overrides capability and accepts the
overrides block of the SDK configuration: filePaths, duplicateKeysHandling,
changeDetection, and pollIntervalMs map to the options of
LaunchDarkly::Integrations::FileData.override_source on the FDv2 data
system builder. Overrides without a data system configuration are an
error. The listen gem joins the contract test bundle so that the watching
change detection mode can run. The service port can be set with the PORT
environment variable and still defaults to 9000.
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-ruby-file-source branch from 703e368 to 18d4335 Compare October 3, 2026 01:54
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-ruby-contract-tests branch from b98adec to b249b70 Compare October 3, 2026 01:54

This branch has not been deployed

No deployments
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