Skip to content

feat(sessions): expose session count in chain summaries - #131

Merged
mckaragoz merged 1 commit into
CodeBeamOrg:devfrom
mckaragoz:AddSessionCount
Oct 31, 2026
Merged

mckaragoz merged 1 commit into
CodeBeamOrg:devfrom
mckaragoz:AddSessionCount

Conversation

@mckaragoz

Copy link
Copy Markdown
Contributor

Summary

Closes #123.

Adds SessionCount to SessionChainSummary, allowing clients to display the total number of sessions associated with each chain, including historical and revoked sessions.

Changes

  • Add SessionCount to chain summary responses.
  • Implement batch session counting for InMemory and EF Core stores.
  • Avoid N+1 queries by counting sessions only for paginated chains.
  • Add regression tests covering multiple chains, rotation, and revocation.
  • Update session management documentation.

Notes

  • SessionCount is independent of RotationCount and active session status.
  • Backward-compatible API addition.
  • No database migration required.

@codecov

codecov Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 55.17241% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.88%. Comparing base (45dcfcd) to head (de6e8c1).

Files with missing lines Patch % Lines
...s.EntityFrameworkCore/Stores/EfCoreSessionStore.cs 0.00% 11 Missing ⚠️
...mateAuth.Sessions.InMemory/InMemorySessionStore.cs 77.77% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #131      +/-   ##
==========================================
- Coverage   86.94%   86.88%   -0.06%     
==========================================
  Files         682      682              
  Lines       19020    19044      +24     
  Branches     2316     2319       +3     
==========================================
+ Hits        16536    16547      +11     
- Misses       1734     1746      +12     
- Partials      750      751       +1     
Flag Coverage Δ
framework 86.88% <55.17%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mckaragoz
mckaragoz merged commit 7c66a0c into CodeBeamOrg:dev Oct 31, 2026
5 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Expose session count in SessionChainSummary

1 participant