Skip to content

ci(vue-sdk): add contract tests - #1790

Merged
joker23 merged 4 commits into
mainfrom
skz/sdk-2194/migrate-vue-sdk-contract-tests
Aug 12, 2026
Merged

ci(vue-sdk): add contract tests#1790
joker23 merged 4 commits into
mainfrom
skz/sdk-2194/migrate-vue-sdk-contract-tests

Conversation

@joker23

@joker23 joker23 commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

SDK-2194

Adding fdv1 and fdv2 contract tests to vue sdk


Note

Overview
Adds LaunchDarkly SDK contract test coverage for the Vue client SDK in CI, mirroring the browser SDK harness setup.

A new @launchdarkly/vue-contract-test-service workspace runs a Vite-built app that connects to the test adapter over WebSocket. ClientEntity maps harness config to Vue’s createClient / client.start() (including secure-mode hash and data-system connection modes) and implements harness commands (evaluate, identify, events, flag listeners). vue.yml builds the SDK and entity, serves static assets, opens headless Chromium via Playwright, and runs FDv1 and FDv2 harness passes with skip lists for known REPORT/tag header gaps.

Shared SDKConfigClientSideParams gains an optional hash field so secure-mode contract scenarios can be configured.

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

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 26360 bytes
Compressed size limit: 29000
Uncompressed size: 129188 bytes

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 39099 bytes
Compressed size limit: 39300
Uncompressed size: 213748 bytes

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/browser size report
This is the brotli compressed size of the ESM build.
Compressed size: 179980 bytes
Compressed size limit: 200000
Uncompressed size: 831788 bytes

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 32142 bytes
Compressed size limit: 34000
Uncompressed size: 114604 bytes

@joker23
joker23 force-pushed the skz/sdk-2194/migrate-vue-sdk-contract-tests branch 2 times, most recently from fcdf04a to ace72f4 Compare July 7, 2026 17:10
@joker23
joker23 marked this pull request as ready for review July 7, 2026 18:07
@joker23
joker23 requested a review from a team as a code owner July 7, 2026 18:07

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@joker23
joker23 force-pushed the skz/sdk-2194/migrate-vue-sdk-contract-tests branch from ace72f4 to d6bf95f Compare July 22, 2026 18:10
cursor[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

@joker23
joker23 force-pushed the skz/sdk-2194/migrate-vue-sdk-contract-tests branch from 1f32b99 to 7c1d476 Compare July 23, 2026 20:21

@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 7c1d476. Configure here.

tags/poll requests/{"applicationId":"________________________________________________________________","applicationVersion":"________________________________________________________________"}

# Disallowed characters in applicationId/applicationVersion: same underlying tag-validation gap.
tags/disallowed characters

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

FDv2 suppressions omit REPORT skips

Medium Severity

The FDv2 contract-test skip list only covers tag-related cases, while the FDv1 list and the browser SDK’s FDv2 suppressions also skip streaming and polling REPORT request tests (including evaluation-reason query variants). The Vue entity uses the same underlying client SDK and useReport wiring as the browser contract entity, so the v3 harness step is likely to hit failures that sibling SDKs already suppress.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 7c1d476. Configure here.

Comment thread packages/tooling/contract-test-utils/src/types/ConfigParams.ts
Comment thread .github/workflows/vue.yml
exit 1
fi
sleep 1
done

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Any better options than these chunky scripts. for detecting the port is ready?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

So this is the same thing we do for https://github.com/launchdarkly/js-core/blob/main/.github/workflows/browser.yml ... I think what we can do is make an executable script that does more or less the same thing in javascript in the shared contract test package?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Up to you, if there is precedent and it is consistent, I'm ok with it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I created a task for myself to revisit both CI implementation.

@joker23
joker23 merged commit 4d8040b into main Aug 12, 2026
56 checks passed
@joker23
joker23 deleted the skz/sdk-2194/migrate-vue-sdk-contract-tests branch August 12, 2026 14:40
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