|
Ran
|
Jobs
2
|
Files
320
|
Run time
1min
|
Badge
README BADGES
|
push
github
chore: release new version ๐ (#1013) This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## nostream@3.10.1 ### Patch Changes - [#1011](https://github.com/cameri/nostream/pull/1011) [`fd7679b`](https://github.com/cameri/nostream/commit/fd7679bed) Thanks [@chappie-daemon](https://github.com/chappie-daemon)! - fix(rate-limit): send the backoff the strategy actually means, name an outage as an error, and bucket messages by type Three defects on one wire path, from the spike in [#1004](https://github.com/cameri/nostream/issues/1004). **The EWMA backoff was a half-life, sent as a delay.** `RateLimit.period` is the decay half-life under `ewma`, so the time until a limit lifts is `period ยท log2(R_new / rate)`, not `period`. With `rate: 6, period: 60000`, a client four times over the limit was told to wait 60 s and needed 120 s. The Lua script now returns its score instead of a yes/no, and the limiter returns `period ยท log2(score / rate)`. It was only accidentally safe before: the hash carried a TTL of exactly `period`, so a quiet client's state expired anyway โ an unstated coupling that would break the moment anyone lengthened the TTL to keep state warm. **A limiter outage was announced as `rate-limited`.** A failing backend made every connected client back off for a fault on this side. It now answers `error: rate limiter unavailable` and still rejects the event; fail-closed behaviour is unchanged. **The message bucket ignored the message type.** One bucket per client meant a `REQ` could be refused because its `EVENT`s had filled it โ the wrong message throttled, and the wrong one told to back off. The bucket key now carries the type... (continued)
4418 of 6240 branches covered (70.8%)
Branch coverage included in aggregate %.
9591 of 11855 relevant lines covered (80.9%)
772.04 hits per line
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | Unit - 41250750917.1 | 320 |
74.82
|
GitHub Action Run | |
| 2 | Integration - 41250750917.2 | 320 |
33.36
|
GitHub Action Run |
| Coverage | โ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
|---|