Repository navigation
Conversation
On each new event: - If no Redis state exists, create a new session. - If state exists and the gap from last_event_ts to this event is 30 minutes or less, reuse the same session. - If the gap is greater than 30 minutes, create a new session. - The Redis key TTL is also 30 minutes, matching the inactivity timeout, so inactive sessions naturally expire
ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughIntegrates Redis-backed session management into the event pipeline and updates main wiring to initialize Redis and pass a SessionManager into Pipeline. Pipeline processing now accepts a context and performs session stitching via SessionManager. User-agent parsing was replaced with an external library; tests and deps updated accordingly. Changes
Sequence Diagram(s)sequenceDiagram
participant E as Event Source
participant P as Pipeline
participant S as SessionManager
participant R as Redis
participant CH as ClickHouseWriter
E->>P: Send raw InternalEvent (with ctx)
P->>S: GetOrCreateSession(ctx, siteID, visitorID, ts)
S->>R: GET session:<siteID>:<visitorID>
alt found & valid
R-->>S: session JSON
S->>R: SET updated session JSON (expire 30m)
S-->>P: sessionID
else not found / expired / corrupt
S->>R: SET new session JSON (expire 30m)
S-->>P: new sessionID
end
P->>CH: Batch write ProcessedEvent (with SessionID)
CH-->>P: ack
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9376af4df7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b6eed62898
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".



Summary by CodeRabbit
New Features
Behavior Changes
Tests
Documentation