Skip to content

fix: correct CaptureIntegrationSpecificIds.V2 feature flag string#1250

Merged
rmi22186 merged 3 commits intodevelopmentfrom
fix/captureIntegrationSpecificIdsV2-key-mismatch
Apr 16, 2026
Merged

fix: correct CaptureIntegrationSpecificIds.V2 feature flag string#1250
rmi22186 merged 3 commits intodevelopmentfrom
fix/captureIntegrationSpecificIdsV2-key-mismatch

Conversation

@rmi22186
Copy link
Copy Markdown
Member

@rmi22186 rmi22186 commented Apr 16, 2026

Background

  • The server sends the V2 integration capture feature flag as captureIntegrationSpecificIds.V2 (with a dot), but the SDK constant was defined as captureIntegrationSpecificIdsV2 (no dot)
  • This key mismatch caused processFlags() in store.ts to return undefined for the V2 flag, which then defaulted to 'none' — silently disabling IntegrationCapture for any customer relying on V2
  • Customers with the legacy V1 flag (captureIntegrationSpecificIds: "True") were unaffected because the V1 path bypassed V2 entirely, but they ran in 'all' mode instead of the intended 'roktonly' mode

What Has Changed

  • Updated CaptureIntegrationSpecificIdsV2 constant in src/constants.ts from 'captureIntegrationSpecificIdsV2' to 'captureIntegrationSpecificIds.V2' to match the server-sent key and associated tests

Screenshot showing the . sent down from the server
image

Checklist

  • I have performed a self-review of my own code.
  • I have made corresponding changes to the documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have tested this locally.

rmi22186 and others added 2 commits April 16, 2026 11:05
…h server

The server sends the V2 feature flag as `captureIntegrationSpecificIds.V2`
(with a dot), but the SDK was looking up `captureIntegrationSpecificIdsV2`
(no dot). This caused the V2 value to silently fall back to 'none',
preventing IntegrationCapture from initializing for customers whose
legacy V1 flag is set to False.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ests

Tests were using the SDK constant value as the flag key, which matched
the (incorrect) constant and always passed. Updated all test configs to
use the literal server key 'captureIntegrationSpecificIds.V2' so tests
will catch key mismatches in the future.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@rmi22186 rmi22186 requested a review from a team as a code owner April 16, 2026 15:05
@cursor
Copy link
Copy Markdown

cursor Bot commented Apr 16, 2026

PR Summary

Low Risk
Small, targeted change to a single feature-flag key plus test updates; primary risk is compatibility if any consumers still set the legacy undotted key.

Overview
Fixes a server/SDK feature-flag key mismatch by renaming the Integration Capture V2 flag from captureIntegrationSpecificIdsV2 to captureIntegrationSpecificIds.V2, ensuring processFlags() reads the server-provided value instead of silently defaulting to 'none'.

Updates the IFeatureFlags type and all affected tests to use the dotted key so Integration Capture V2 modes (e.g. all, none, roktonly) are exercised consistently.

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

@rmi22186 rmi22186 requested a review from jaissica12 April 16, 2026 15:06
Copy link
Copy Markdown

@cursor cursor Bot left a comment

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 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 bc1f166. Configure here.

Comment thread src/constants.ts
Update the interface property to 'captureIntegrationSpecificIds.V2' so
the type definition matches the runtime key shape.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

@rmi22186 rmi22186 changed the title Fix/capture integration specific ids v2 key mismatch fix: correct CaptureIntegrationSpecificIdsV2 feature flag key Apr 16, 2026
@rmi22186 rmi22186 changed the title fix: correct CaptureIntegrationSpecificIdsV2 feature flag key fix: correct CaptureIntegrationSpecificIds.V2 feature flag string Apr 16, 2026
Copy link
Copy Markdown
Contributor

@jaissica12 jaissica12 left a comment

Choose a reason for hiding this comment

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

lgtm

@rmi22186 rmi22186 merged commit 50c2e29 into development Apr 16, 2026
71 of 77 checks passed
github-actions Bot pushed a commit that referenced this pull request Apr 16, 2026
## [2.64.1](v2.64.0...v2.64.1) (2026-04-16)

### Bug Fixes

* correct CaptureIntegrationSpecificIds.V2 feature flag string ([#1250](#1250)) ([50c2e29](50c2e29))
@mparticle-automation
Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 2.64.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants