Skip to content

fix: ensure lifetime savings >= session savings#90

Merged
TannerTorrey3 merged 1 commit intomainfrom
fix/savings-lifetime-floor
Mar 29, 2026
Merged

fix: ensure lifetime savings >= session savings#90
TannerTorrey3 merged 1 commit intomainfrom
fix/savings-lifetime-floor

Conversation

@TannerTorrey3
Copy link
Copy Markdown
Contributor

Summary

  • Fixes bug where all-time savings could be reported as less than session savings
  • Some AQL UPSERTs fail silently under concurrent load (fire-and-forget middleware), causing the DB lifetime doc to lag behind the in-memory session
  • Adds SavingsData.atLeast(other) which floors lifetime to session values when returning the response

Test plan

  • Verified locally: lifetime is now always >= session
  • Backend compiles

🤖 Generated with Claude Code

Some AQL UPSERTs fail silently under concurrent load (fire-and-forget
middleware). Floor lifetime to session values when returning the
response so all-time is never less than this session.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@TannerTorrey3 TannerTorrey3 merged commit 7b811e0 into main Mar 29, 2026
10 checks passed
@TannerTorrey3 TannerTorrey3 deleted the fix/savings-lifetime-floor branch April 3, 2026 01:29
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.

1 participant