d2caa9824880110710b7bf09927c10acf6975c4a
extendUserTier called setUserTier, which unconditionally zeroed monthly_consumed and re-anchored the cycle. A user who renewed mid-cycle (or a webhook double-firing across a restart) got their full monthly allotment back for free. The monthly cycle already rolls on its own anniversary via ensureRenewalRollover, so renewal must not reset it. Add resetCycle to setUserTier (default true, preserving operator-grant behavior); extendUserTier passes false for an in-force subscription and true only for a brand-new or lapsed one. Add regression tests.
Description
No description provided
Languages
JavaScript
58.2%
HTML
23.6%
TypeScript
17%
Shell
0.7%
Makefile
0.3%
Other
0.2%