Add support for parsing raw events using custom transform in PushInputAdapter#678
Merged
arhamchopra merged 4 commits intomainfrom Feb 17, 2026
Merged
Add support for parsing raw events using custom transform in PushInputAdapter#678arhamchopra merged 4 commits intomainfrom
arhamchopra merged 4 commits intomainfrom
Conversation
Signed-off-by: Arham Chopra <arham.chopra@cubistsystematic.com>
robambalu
reviewed
Feb 13, 2026
Signed-off-by: Arham Chopra <arham.chopra@cubistsystematic.com>
Signed-off-by: Arham Chopra <arham.chopra@cubistsystematic.com>
b6188c3 to
cfb0384
Compare
robambalu
reviewed
Feb 17, 2026
Signed-off-by: Arham Chopra <arham.chopra@cubistsystematic.com>
Collaborator
|
gtg if you want to remove it from draft |
robambalu
approved these changes
Feb 17, 2026
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
transformRawEventvirtual hook toPushInputAdapterthat allows subclasses to apply arbitrary transformations to pushed events on the engine thread before they are consumed by the csp engine.consumeEventreturn type frombooltoPushEvent *(nullptr= consumed, non-null = defer to next cycle) and add areconsumingflag to skip transformation on events already transformed in a prior pass.CallablePyPushInputAdapter) and Python tests demonstrating the feature, including reconsume correctness for both ungrouped and grouped adapters.Design
A new
transformEventsflag onPushInputAdapter(set via constructor) routes events through a single virtual hook inconsumeEvent:transformRawEvent(PushEvent * raw_event)— transform the pushed event into a new parsed event for the engine. The subclass implementation must:isGroupEndflag) on the new eventThe transform runs before the group LOCKED check in
consumeEvent, so events stored inPendingPushEventsare always already-transformed. On reconsuming (second pass),consumeEventreceivesreconsuming=trueand skipstransformRawEventto avoid double-transformation.Return value of
consumeEventchanged frombooltoPushEvent *:nullptr— event was consumedPendingPushEventsfor the next engine cycle