feat: new session management#393
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (32)
📝 WalkthroughWalkthroughThis PR implements a comprehensive session lifecycle management system with boundary-aware session buffer, reaper/vacuum cron jobs for cleanup, idempotent session-end emission via Redis claims and v2 jobIds, device resolution using session liveness checks, and extensive E2E testing harness to validate end-to-end behavior. ChangesSession Lifecycle Refactor
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Resolve the single conflict in track.controller.ts caused by upstream's new session management (Openpanel-dev#393): - Adopt the PR's shared `dispatchEvent(validatedBody, context)` call in `handler` (keeps single-event and batch paths from drifting). - Fold main's `replay` session-id backcompat into `dispatchEvent`'s replay case: prefer the SDK-echoed `payload.sessionId`, else the server-derived `context.sessionId` — mirroring the single-event /track behaviour main introduced. The merge also adopts main's getDeviceId(eventTimeMs) + getOverrideDeviceId into buildEventContext (no batch behaviour change). getTimestamp is identical to main; no 5-day floor reintroduced (this PR remains transport-only). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary by CodeRabbit
New Features
Bug Fixes
Documentation