# fix\(cost\): check the hourly refresh cooldown every minute \(\#407\) · lucenx/codexbar-plasma

[View on GitCafe](https://git.cafe/lucenx/codexbar-plasma/commit/d0a10ddd316a1e55d7dbace6eeccfaa3152b6503)

Repository: [lucenx/codexbar-plasma](https://git.cafe/lucenx/codexbar-plasma)

Visibility: public

Requested revision: d0a10ddd316a1e55d7dbace6eeccfaa3152b6503

Requested commit: d0a10ddd316a1e55d7dbace6eeccfaa3152b6503

Commit: d0a10ddd316a1e55d7dbace6eeccfaa3152b6503

Tree: 25f7cf0ee7585677e729074a21225a9929841c6c

Author: Simone

Committer: GitHub

## Message

```
fix(cost): check the hourly refresh cooldown every minute (#407)

The repeating cost timer ran at the full one-hour cooldown but started
before the first scan recorded its attempt. Its first tick therefore saw
an elapsed time just under an hour, kept the snapshot, and the first
automatic scan came after two hours. Any forced, visible, or range-change
scan shifted the next automatic one the same way, and timer jitter could
skip further hours.

The timer now polls every minute and CostRefreshPolicy still decides when
the hour has elapsed, so automatic scans start within a minute of it.

Documentation: usage guide says scans run about once an hour.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
```

## Parents

- [930d8699d4553ce8d7a1438cd252fd1c69f9b9b5](https://git.cafe/lucenx/codexbar-plasma/commit/930d8699d4553ce8d7a1438cd252fd1c69f9b9b5?format=markdown)

[Source at this commit](https://git.cafe/lucenx/codexbar-plasma/tree/d0a10ddd316a1e55d7dbace6eeccfaa3152b6503?format=markdown)
