Skip to content

Remove sendToExperiment from evaluation events - #31

Merged
deleteLater merged 2 commits into
masterfrom
fix/remove-send-to-experiment
Nov 4, 2026
Merged

deleteLater merged 2 commits into
masterfrom
fix/remove-send-to-experiment

Conversation

@deleteLater

@deleteLater deleteLater commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Align with featbit/sdk-spec#3 by removing sendToExperiment from evaluation events and deleting the associated experiment sampling logic and data model fields. Older flag payloads with these fields still deserialize successfully.

Summary by CodeRabbit

  • Changes
    • Feature evaluation results no longer include experiment participation information.
    • Serialized variation events no longer include the experiment-routing field.
    • Experiment inclusion and rollout assignment details are no longer available in evaluation data.

RetriggerView in GreptileConfidence Score: 4/5

The PR appears safe to merge, with a non-blocking gap in tests for the changed event JSON.

Findings

  1. P2 Event fields lack test coverage ▶
Fix with agent prompt
### Issue 1
src/main/java/co/featbit/server/InsightTypes.java:222
The change to `FlagEventSerializer` has no test that checks the JSON it produces. Existing event tests check delivery or event counts, so they would not catch `sendToExperiment` returning or another required field disappearing. Add a serialization test that checks `sendToExperiment` is absent and `featureFlagKey`, `timestamp`, and `variation` remain intact.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

Removes sendToExperiment from evaluation events and deletes the experiment fields and sampling code that supplied it.

  • Flag evaluation events now report variations without experiment membership.

Reviews (1) · Last reviewed commit: "Restore original evaluation test" · Reviewed by Greptile

@coderabbitai

coderabbitai Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The data model and evaluator no longer track experiment-inclusion metadata or assignment status. Evaluation results and serialized flag variations no longer expose that status.

Changes: Experiment metadata removal

Layer / File(s) Summary
Remove experiment fields from data models
src/main/java/co/featbit/server/DataModel.java
Feature flags, target rules, rollout variations, and fallthroughs no longer store or expose experiment-inclusion fields.
Remove experiment assignment from evaluation results
src/main/java/co/featbit/server/Evaluator.java, src/main/java/co/featbit/server/EvaluatorImp.java, src/main/java/co/featbit/server/InsightTypes.java
The evaluator no longer calculates or returns experiment assignment. Serialized flag variations no longer include the sendToExperiment property.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Suggested reviewers: dsun0720

Merge Risk: Minimal · up to 11659

No actionable merge-blocking risk is established for removing experiment metadata. Merge after normal checks pass.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the primary change: removing sendToExperiment from evaluation events.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 2 files.

Finishing Touches
Generate docstrings
  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share
Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 92c02aba-bc63-4037-ac38-4dd90ff8dbc8
Commits

Reviewing files that changed from the base of the PR and between 52e173e and 116590f.

Files selected for processing: 4
  • src/main/java/co/featbit/server/DataModel.java
  • src/main/java/co/featbit/server/Evaluator.java
  • src/main/java/co/featbit/server/EvaluatorImp.java
  • src/main/java/co/featbit/server/InsightTypes.java

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@deleteLater
deleteLater marked this pull request as ready for review November 4, 2026 10:55
@deleteLater
deleteLater merged commit bd9d513 into master Nov 4, 2026
3 checks passed
@deleteLater
deleteLater deleted the fix/remove-send-to-experiment branch November 4, 2026 12:10
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