refactor(proxy): extract sessionKeyFor helper for session-key construction#643
Conversation
…ction The per-session key (agent + "|" + clientIP, falling back to clientIP for anonymous or unnamed agents) was rebuilt inline across the fetch, forward, CONNECT, WebSocket, TLS-intercept, CEE, and admin/session paths. Route all of them through one sessionKeyFor helper so adaptive escalation, de-escalation, and audit correlation share a single source of truth. Mechanical extraction, no behavioral change.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughThis PR refactors session key construction across the proxy package by centralizing repeated conditional logic into a shared ChangesSession Key Construction Refactoring
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Dedups the per-session adaptive-enforcement key construction. The pattern (agent-namespaced client IP, falling back to client IP for anonymous or unnamed agents) was rebuilt inline across the fetch, forward, CONNECT, WebSocket, TLS-interception, CEE, and admin/session paths. All sites now route through one
sessionKeyForhelper, so adaptive escalation, de-escalation, and audit correlation share a single source of truth. Mechanical extraction, no behavioral change. 9 files, +112/-160.Summary by CodeRabbit
Refactor
Tests