• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

cameri / nostream / 42048004265
78%

Build:
DEFAULT BRANCH: main
Ran 05 Nov 2026 02:49PM UTC
Jobs 2
Files 332
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

05 Nov 2026 02:44PM UTC coverage: 77.793% (+0.07%) from 77.725%
42048004265

push

github

web-flow
feat(peering): rate-limit on-demand requests from peers (#1053)

<!--- Provide a general summary of your changes in the Title above -->

## Description
<!--- Describe your changes in detail -->
This PR adds a per-peer request budget for on-demand `REQ`, `COUNT`, and
`NEG-OPEN` calls.
Authenticated peers can request events outside their standing feed while
remaining under peer subscription and NIP-77 limits. Requests are
additionally rate-limited by peer pubkey via
`limits.peer.request.rateLimits`, defaulting to 300 requests/minute
across all three request types. Refused reads receive `CLOSED` with a
`rate-limited:` retry hint; refused `NEG-OPEN` sessions receive
`NEG-ERR`. The limiter fails closed when its store is unavailable, and
non-peer traffic keeps existing client limits.
Per-peer request/event accounting and admin-console visibility are
deferred to the follow-up admin PR.
Tested with unit coverage for REQ/COUNT/NEG-OPEN refusal, non-peer
behavior, out-of-scope fetch by ID, fail-closed limiting, and settings
validation.

## Related Issue
<!--- This project only accepts pull requests related to open issues -->
<!--- If suggesting a new feature or change, please discuss it in an
issue first -->
<!--- If fixing a bug, there should be an issue describing it with steps
to reproduce -->
<!--- Please link to the issue here: -->
Part of #936 (will do admin console accounting and UI related stuff in a
follow up PR)
## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->

## How Has This Been Tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran
to -->
<!--- see how your change affects other areas of the code, etc. -->

## Screenshots (if appropriate):

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [ ] Non-functional change (docs, style, minor refactor)
- ... (continued)

4840 of 6809 branches covered (71.08%)

Branch coverage included in aggregate %.

64 of 64 new or added lines in 7 files covered. (100.0%)

10567 of 12996 relevant lines covered (81.31%)

707.95 hits per line

Jobs
ID Job ID Ran Files Coverage
1 Unit - 42048004265.1 05 Nov 2026 02:50PM UTC 332
75.49
GitHub Action Run
2 Integration - 42048004265.2 05 Nov 2026 02:49PM UTC 332
31.84
GitHub Action Run
Source Files on build 42048004265
  • Tree
  • List 332
  • Changed 8
  • Source Changed 7
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #42048004265
  • d075f6ae on github
  • Prev Build on main (#41765832236)
  • Next Build on main (#42069058395)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc