You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
usage refresher: an old failure streak never expires; one backoff boundary untested (#341 follow-ups) #347
Follow-ups from the tests lens on #341 (comment #341 (comment)). Neither blocked #341; both are in code from #335.
An old failure streak never expires. A Claude instance on a 10-minute interval: one refresh fails, then it is skipped as signed out every hour for 72 hours, then it comes back signed in and the refresh fails again. Result: calls=2 warnings=1: the new outage three days later counts as failure 2 of the old streak, gives no new warning, and retries after 40 minutes. Cause: the skip path (apps/server/src/usage/HeadlessUsageRefresher.ts ~184-190) with the failure count (~149-152). Fix: a streak older than some limit (for example a few intervals past its retry time) starts fresh, with a test for the long gap; or a test that pins today's behaviour as intended, if that is the choice.
Nit: one backoff mutation survives.retryAtMs - nowMs <= waitMs -> < (~200) stays green; it only matters for a sweep in the same millisecond as the failed attempt started. Add a boundary test or leave it.
Activity
usage: test the thinning gap check; end a failure streak once its ret…
usage: test the thinning gap check; end a failure streak once its ret…
usage: test the thinning gap check; end a failure streak once its ret…
usage: test the thinning gap check; end a failure streak once its ret…