Skip to content

feat: Keep override-affected evaluations out of individual events - #2052

Open
kinyoklion wants to merge 1 commit into
rlamb/overrides-node-override-layerfrom
rlamb/overrides-node-events
Open

kinyoklion wants to merge 1 commit into
rlamb/overrides-node-override-layerfrom
rlamb/overrides-node-events

Conversation

@kinyoklion

@kinyoklion kinyoklion commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

Summary

This PR is based on the override store branch because it consumes the override marking that branch produces on evaluation results.

This change adds the analytics event behavior of the OVERRIDE specification to the shared event code and the Node.js server SDK.

An evaluation marked as override-affected produces no individual feature event and no debug event, even when the flag requests them. It is still counted in summary events like any other evaluation, in a separate counter that carries the overrideAffected marker. The marker is part of the summary aggregation key, so override-affected and other evaluations of the same flag, variation, and version accumulate into separate counters rather than collapsing together. The marker is present on a counter only when true, like the existing unknown marker.

The client hands the marking to the event processor as a scalar on the input event, taken from the evaluation result. Event generation does not read the evaluation reason. The record of a prerequisite evaluation carries the prerequisite's own marking, so an unaffected prerequisite inside a marked top-level evaluation still produces its individual event, while a marked prerequisite record produces none and is counted under the marked counter for the prerequisite flag.

The shared event summarizer and processor are also used by the client-side SDKs. The new field is optional and those SDKs never set it, so their output is unchanged.

The OVERRIDE test vector runner now also asserts the marking of the summary counter that each evaluation contributes to, by flushing the events and reading the summary payload.

SDK-3247


Note

Overview
Implements OVERRIDE-spec analytics behavior for evaluations affected by the override store.

Override-affected evaluations still roll into summary events, but no individual feature or debug events are emitted even when trackEvents / debug mode are on. Summaries use a separate counter bucket keyed by an optional overrideAffected: true marker (omitted when false, like unknown).

The server SDK passes evalRes.overrideAffected into event creation as a scalar—not derived from the evaluation reason. Prerequisite eval records use each prerequisite’s own marking, so unaffected siblings can still emit feature events while marked flags in the same tree only appear in marked summary counters.

Shared EventFactoryBase, InputEvalEvent, summarizer, and processor carry the new optional field; client SDKs that never set it are unchanged. Tests cover the shared pipeline, full client + override scenarios (including prereq trees), and OVERRIDE vector assertions for summaryOverrideAffected.

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

@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-override-layer branch from 9bc7846 to 0c00688 Compare September 28, 2026 20:28
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-events branch from f2a06ab to bab7cc6 Compare September 28, 2026 20:28
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-override-layer branch from 0c00688 to e42e2cb Compare September 28, 2026 21:20
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-events branch from bab7cc6 to c224cd1 Compare September 28, 2026 21:20
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-override-layer branch from e42e2cb to 8e9fd05 Compare September 29, 2026 15:20
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-events branch from c224cd1 to ed51797 Compare September 29, 2026 15:20
@kinyoklion
kinyoklion added this pull request to stack #2061 September 30, 2026 17:08
@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

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

@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-override-layer branch from 8e9fd05 to 71a1426 Compare September 30, 2026 18:17
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-events branch from ed51797 to 1f0e0c9 Compare September 30, 2026 18:17
@kinyoklion
kinyoklion removed this pull request from stack #2061 September 30, 2026 18:37
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-override-layer branch from 71a1426 to a9e83b1 Compare September 30, 2026 20:16
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-events branch from 1f0e0c9 to ee3c511 Compare September 30, 2026 20:16
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-override-layer branch from a9e83b1 to a5614f5 Compare September 30, 2026 20:23
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-events branch from ee3c511 to e4656e8 Compare September 30, 2026 20:23
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-override-layer branch from a5614f5 to d0ed461 Compare September 30, 2026 21:01
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-events branch from e4656e8 to cd8301d Compare September 30, 2026 21:01
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-override-layer branch from d0ed461 to 667c330 Compare September 30, 2026 21:04
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-events branch from cd8301d to f8bd9a5 Compare September 30, 2026 21:04
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-override-layer branch from 667c330 to 431c72b Compare September 30, 2026 22:23
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-events branch from f8bd9a5 to 3a6273a Compare September 30, 2026 22:23
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-override-layer branch from 431c72b to 980675a Compare September 30, 2026 22:27
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-events branch from 3a6273a to 5095497 Compare September 30, 2026 22:27
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-override-layer branch from 980675a to d3694fb Compare October 1, 2026 23:07
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-events branch from 5095497 to 7fdfeaf Compare October 1, 2026 23:07
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-override-layer branch from d3694fb to d1d703d Compare October 1, 2026 23:52
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-events branch 2 times, most recently from 1fe976f to 764637d Compare October 2, 2026 16:08
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-events branch from 21504bf to 41a072c Compare October 3, 2026 01:45
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-override-layer branch from e118410 to 34076af Compare October 5, 2026 17:36
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-events branch from 41a072c to 356d766 Compare October 5, 2026 17:36
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-override-layer branch from 34076af to 62c63e6 Compare October 5, 2026 22:32
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-events branch from 356d766 to 2b5eee2 Compare October 5, 2026 22:32
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-override-layer branch from 62c63e6 to b21f974 Compare October 5, 2026 22:45
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-events branch from 2b5eee2 to 8a237c5 Compare October 5, 2026 22:45
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-override-layer branch from b21f974 to 525a8ba Compare October 8, 2026 16:38
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-events branch from 8a237c5 to f4eec43 Compare October 8, 2026 16:38
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-override-layer branch from 525a8ba to 6e47ed9 Compare October 8, 2026 22:17
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-events branch from f4eec43 to 43b2f8b Compare October 8, 2026 22:17
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-override-layer branch from 6e47ed9 to e5a78d1 Compare October 8, 2026 22:19
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-events branch from 43b2f8b to a3129ff Compare October 8, 2026 22:19
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-override-layer branch from e5a78d1 to f045d43 Compare October 8, 2026 22:35
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-events branch from a3129ff to 95d102a Compare October 8, 2026 22:35
@kinyoklion
kinyoklion marked this pull request as ready for review October 8, 2026 22:50
@kinyoklion
kinyoklion requested a review from a team as a code owner October 8, 2026 22:50
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-override-layer branch from f045d43 to d29754c Compare October 9, 2026 18:49
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-events branch from 95d102a to 477a22f Compare October 9, 2026 18:49
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-override-layer branch from d29754c to 2533bdc Compare October 9, 2026 19:58
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-events branch from 477a22f to f88c789 Compare October 9, 2026 19:58
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-override-layer branch from 2533bdc to 754c0f6 Compare October 9, 2026 20:30
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-events branch 2 times, most recently from 40fb163 to e596425 Compare October 9, 2026 21:02
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-override-layer branch from fb16ec6 to dc6c2f8 Compare October 9, 2026 21:27
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-events branch 3 times, most recently from 2e95aa3 to 5202171 Compare October 9, 2026 22:41
Adds the analytics event behavior of the OVERRIDE specification.

An evaluation marked as override-affected produces no individual feature
event and no debug event, even when the flag requests them. It is counted in
summary events like any other evaluation, in a separate counter that carries
the overrideAffected marker. The marker is part of the summary aggregation key,
so override-affected and other evaluations of the same flag, variation, and
version accumulate into separate counters. The marker is present on a counter
only when true, like the unknown marker.

The client hands the marking to the event processor as a scalar on the input
event, taken from the evaluation result. Event generation does not read the
reason. The record of a prerequisite evaluation carries the prerequisite's own
marking, so an unaffected prerequisite inside a marked evaluation still
produces its individual event.

The OVERRIDE test vector runner now also asserts the marking of the summary
counter that each evaluation contributes to.
@kinyoklion
kinyoklion force-pushed the rlamb/overrides-node-events branch from 5202171 to 9b26b7e Compare October 9, 2026 23:18

This branch has not been deployed

No deployments
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.

1 participant