Skip to content

Conversation

@zhukaihan
Copy link
Collaborator

Summary

Adding exposure service, deprecating assignment service, and adding tracksExposure to evaluate options.

Checklist

  • Does your PR title have the correct title format?
  • Does your PR have a breaking change?: no

@zhukaihan zhukaihan marked this pull request as ready for review November 13, 2025 17:00
@zhukaihan zhukaihan requested review from a team and Copilot November 13, 2025 17:00
Copilot finished reviewing on behalf of zhukaihan November 13, 2025 17:03
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 a new exposure service to track exposure events while deprecating the existing assignment service. The exposure service provides similar functionality to assignments but with a modernized API and improved structure.

  • Added new ExposureService interface and AmplitudeExposureService implementation for tracking exposure events
  • Deprecated AssignmentService and related classes in favor of the new exposure tracking system
  • Added tracksExposure option to EvaluateOptions to enable exposure event tracking

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/node/src/exposure/exposure.ts Defines core Exposure class and interfaces for the exposure tracking system
packages/node/src/exposure/exposure-service.ts Implements AmplitudeExposureService with event conversion logic
packages/node/src/exposure/exposure-filter.ts Implements in-memory caching filter to prevent duplicate exposure tracking
packages/node/src/types/config.ts Adds ExposureConfig type and deprecates AssignmentConfig
packages/node/src/local/client.ts Integrates exposure service and adds tracksExposure option to evaluate methods
packages/node/src/assignment/assignment.ts Adds deprecation notices to assignment tracking interfaces
packages/node/src/assignment/assignment-service.ts Adds deprecation notices to assignment service implementation
packages/node/src/assignment/assignment-filter.ts Adds deprecation notice to assignment filter
packages/node/test/local/exposure/exposure-service.test.ts Tests for exposure service event conversion and tracking
packages/node/test/local/exposure/exposure-filter.test.ts Tests for exposure filter deduplication logic
packages/node/test/local/client.test.ts Integration test for tracksExposure option

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

@promptless
Copy link

promptless bot commented Nov 13, 2025

📝 Documentation updates detected!

New suggestion: Document exposure tracking for Node.js Experiment SDK local evaluation

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