Skip to content

Conversation

@joker23
Copy link
Contributor

@joker23 joker23 commented Nov 13, 2025

This PR will add in contract tests to the Oxygen SDK CI


Note

Adds a new Shopify Oxygen contract test service and updates CI to build/run it and execute the SDK contract tests.

  • Contract test service (packages/sdk/shopify-oxygen/contract-tests):
    • New Express-based service (src/index.ts) with basic endpoints to report capabilities, create/delete clients, and run evaluate commands via a simple ClientPool (src/utils/clientPool.ts).
    • Build/config: package.json (tsup build, start), tsconfig.json, tsup.config.ts, .gitignore, helper script run-test-harness.sh.
  • Monorepo:
    • Adds workspace packages/sdk/shopify-oxygen/contract-tests in root package.json.
  • CI (.github/workflows/shopify-oxygen.yml):
    • Installs, builds, and launches the contract test service, then runs launchdarkly/contract-tests action against it on port 8000 with specified skipped suites.

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

@joker23 joker23 requested a review from a team as a code owner November 13, 2025 19:01
@joker23 joker23 changed the title Szhang/sdk 1558/oxygen contract tests test: Oxygen SDK contract tests Nov 13, 2025
@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

@launchdarkly/js-sdk-common size report
This is the brotli compressed size of the ESM build.
Compressed size: 24988 bytes
Compressed size limit: 26000
Uncompressed size: 122411 bytes

@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

@launchdarkly/js-client-sdk size report
This is the brotli compressed size of the ESM build.
Compressed size: 21721 bytes
Compressed size limit: 25000
Uncompressed size: 74698 bytes

@joker23 joker23 force-pushed the szhang/SDK-1558/oxygen-contract-tests branch 2 times, most recently from de9db3b to c6e5776 Compare November 13, 2025 19:08
@joker23 joker23 force-pushed the szhang/SDK-1558/oxygen-contract-tests branch from c6e5776 to 93d37b8 Compare November 13, 2025 19:47
console.error(`Error creating client: ${err}`);
res.status(500);
res.send();
}
Copy link

Choose a reason for hiding this comment

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

Bug: Initialization errors leave resources unclosed.

If waitForInitialization throws an exception (timeout or error), the catch block doesn't close the client, causing a resource leak. The client was created on line 97 but won't be cleaned up, potentially leaving connections or other resources open.

Fix in Cursor Fix in Web

Copy link
Member

Choose a reason for hiding this comment

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

(I think this doesn't matter in this use-case).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yea it will just memory leak for a second :)

Copy link
Member

Choose a reason for hiding this comment

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

nit: Please add a newline to the end of the file.

@joker23 joker23 merged commit c2b1860 into main Nov 13, 2025
37 checks passed
@joker23 joker23 deleted the szhang/SDK-1558/oxygen-contract-tests branch November 13, 2025 23:34
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.

3 participants