Repository navigation
fix: Commit everything held at a track or identify at immediate persistence - #419
Open
abelonogov-ld wants to merge 1 commit into
Conversation
…e again Writing only the tracked event left the evaluations before it to a commit queued on the commit executor, so a kill straight after the track, which is what immediate persistence is for, could take those exposures with it. With the summary split gone, the commit costs the caller a normal encode of the held run and the summaries, so the track commits it again before returning. This reverts 19afcec and 1200025. Co-authored-by: Cursor <cursoragent@cursor.com>
abelonogov-ld
marked this pull request as ready for review
November 3, 2026 17:36
2 of 3 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
At
IMMEDIATE,trackandidentifywrote only their own event before returning and left the evaluations held before them, and their summaries, to a commit queued on the commit executor. A kill straight after thetrack(the test app's "Eval+Kill now") could therefore lose the exposure on slower devices, where the kill wins the race against the commit executor.This goes back to committing everything held, under the commit lock, before the call returns. With oversized summaries no longer split (#408,
577261bb), that costs the caller a normal encode of the held run and the summaries.Reverts
19afcecband12000256from #408.Trade-off
A
trackon the main thread waits for any commit already in progress, including a delivery's commit and close; usually well under a millisecond.Tests
anImmediateTrackPutsTheEvaluationsBeforeItOnDiskBeforeItReturns: holds the commit executor and expects the feature, summary and custom events on disk whentrackreturns.Made with Cursor