Skip to content

Streak freeze - #126

Merged
Nabeelahh merged 2 commits into
Vaulty-X:mainfrom
CollinsC1O:streak_freeze
Aug 28, 2026
Merged

Streak freeze#126
Nabeelahh merged 2 commits into
Vaulty-X:mainfrom
CollinsC1O:streak_freeze

Conversation

@CollinsC1O

Copy link
Copy Markdown

Summary

  • Add MAX_FREEZES (10) as the configurable maximum freeze balance in streaks/src/state.rs
  • add_freezes now rejects (Error::InvalidAmount) any addition that would push a user's balance above MAX_FREEZES, instead of clamping or allowing unbounded growth
  • Manual freeze consumption (use_freeze) and the default INITIAL_FREEZES (3) are unchanged

Test plan

  • cargo test -p streaks --test test_streaks — new tests cover exact-limit addition, over-limit rejection (by one and by a large amount), and manual consumption still working at the cap
  • cargo build -p streaks -p shared --all-targets

Closes #100

Collins C Augustine and others added 2 commits August 24, 2026 01:53
Unlimited freeze accumulation via add_freezes weakened the streak
discipline mechanic. Reject additions that would push a user's
balance above MAX_FREEZES (10) while leaving manual consumption
(use_freeze) and the default starting balance untouched.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Nabeelahh
Nabeelahh merged commit 021248a into Vaulty-X:main Aug 28, 2026
1 check failed
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.

Cap the Number of Streak Freezes a User Can Hold

2 participants