Skip to content

chore(setup): add setup flag verifier - #752

Merged
ffantl-ld merged 2 commits into
setup-ldfrom
ffantl/setup-ld/4-verifier
Aug 5, 2026
Merged

chore(setup): add setup flag verifier#752
ffantl-ld merged 2 commits into
setup-ldfrom
ffantl/setup-ld/4-verifier

Conversation

@ffantl-ld

@ffantl-ld ffantl-ld commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Describe the solution you've provided

Fourth layer of the guided setup command: the verifier. Polls the LaunchDarkly API to confirm the newly configured SDK has evaluated a flag, so setup can report success (Verifier, DefaultVerifier). Uses the existing resources.Client.

Related issues

Part of the setup-ld feature. Stacked PR — base is ffantl/setup-ld/3-initializer.

Requirements

  • I have added test coverage for new or changed functionality

Note

Low Risk
New setup-only polling helper with mocked HTTP tests; no changes to auth, CLI command wiring, or production request paths beyond calling the existing client.

Overview
Adds the setup verifier layer: after init injects runnable SDK code, Verifier polls LaunchDarkly’s sdk-active API until the configured SDK shows as active or a timeout (default 120s / 5s interval), returning attempts and elapsed time in VerifyResult.

Requests are scoped with an sdk_name query mapped from setup SDK ids (e.g. node-servernode-server-sdk) so existing environment activity does not count as success; unknown SDK ids skip the filter. DefaultVerifier wires this through the existing resources.Client.

Tests cover success, timeout, filter behavior, and that every in-place-inject SDK has a reported name.

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

@ffantl-ld
ffantl-ld marked this pull request as ready for review July 27, 2026 17:23
@ffantl-ld
ffantl-ld requested review from Vadman97 and erangeles July 27, 2026 17:23

@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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 00ada35. Configure here.

Comment thread internal/setup/verifier.go Outdated
@ffantl-ld
ffantl-ld requested review from a team and removed request for Vadman97 July 28, 2026 16:38
@ffantl-ld
ffantl-ld force-pushed the ffantl/setup-ld/4-verifier branch from 00ada35 to eff8764 Compare July 31, 2026 17:48
@ffantl-ld
ffantl-ld force-pushed the ffantl/setup-ld/4-verifier branch from eff8764 to 8a8d586 Compare July 31, 2026 18:25
@ffantl-ld
ffantl-ld force-pushed the ffantl/setup-ld/4-verifier branch from 8a8d586 to 7fa9e73 Compare August 3, 2026 18:52
@ffantl-ld
ffantl-ld force-pushed the ffantl/setup-ld/4-verifier branch from 7fa9e73 to 0532976 Compare August 3, 2026 19:48
Base automatically changed from ffantl/setup-ld/3-initializer to setup-ld August 5, 2026 18:06
ffantl-ld and others added 2 commits August 5, 2026 14:06
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
sdk-active answers for any SDK that initialized in the environment in the past
seven days, so verification passed on unrelated traffic and a project already
using LaunchDarkly reported success without the new SDK ever connecting.

Filter on sdk_name, mapping the setup SDK id to the name the SDK reports
itself as. An unknown id sends no filter rather than one that can never match,
and VerifyResult records which name was used so an unnarrowed check cannot
present itself as narrowed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@ffantl-ld
ffantl-ld force-pushed the ffantl/setup-ld/4-verifier branch from 0532976 to a3d17ca Compare August 5, 2026 18:06
@ffantl-ld
ffantl-ld merged commit 4f07f2b into setup-ld Aug 5, 2026
6 checks passed
@ffantl-ld
ffantl-ld deleted the ffantl/setup-ld/4-verifier branch August 5, 2026 19:30
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