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

cameri / nostream / 44171181460 / 1
78%
main: 79%

Build:
Build:
LAST BUILD BRANCH: rewrite/main
DEFAULT BRANCH: main
Ran 17 Nov 2026 08:43PM UTC
Files 321
Run time 4s
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

17 Nov 2026 08:36PM UTC coverage: 75.031%. Remained the same
44171181460.1

push

github

web-flow
fix(relay): dedupe and cap a deletion request's e ids (#1090) (#1164)

Opened on @AgrimTawani's behalf so the change is not re-authored: the
commit is his, cherry-picked with `-x` from
[`AgrimTawani:fix/1090-cap-delete-e-ids`](https://github.com/AgrimTawani/nostream/tree/fix/1090-cap-delete-e-ids).

Closes #1090.

## What it does

A kind-5 request's `e` arm handed every parseable id to
`delete_by_pubkey_and_ids`, unbounded and undeduplicated — ~7 180 ids at
the shipped `maxPayloadSize`, repeats included. The ids now go through
`event_ids()`, which keeps first-seen order, collapses repeats and stops
at the (cap + 1)th **distinct** id, and a request naming more than
`MAX_EVENT_IDS_PER_REQUEST` (100) is refused with `OK false` before
anything is deleted or stored — the same shape as the address arm's
refusal, because a partial delete answered `true` would claim deletions
that did not happen.

The cap is derived from its own measurement rather than copied from
`MAX_ADDRESSES_PER_REQUEST`: 100 hits cost 3.95 ms in one LMDB write
transaction (~0.008 ms per id at the margin, against ~0.010 ms per
address), so kind-5's 30/min per free key stays at ~120 ms of
single-writer time per minute, the same 0.2 % the address cap allows.
`docs/rewrite/nip-parity.md` §9 item 12 records the divergence from the
TypeScript target.

## Verified before opening

- The cherry-pick applied cleanly onto `rewrite/main` (`f971d6f3`) with
no conflicts; 4 files — the strategy, its tests, the parity note, one
changeset.
- No workflow, `package.json`, lockfile or script is touched. No hidden
or bidirectional characters in the added lines.
- Tests: 134 added lines in `tests/strategies.rs` covering the cap, cap
+ 1 and repeats, per the commit.

4353 of 6342 branches covered (68.64%)

Branch coverage included in aggregate %.

9470 of 12081 relevant lines covered (78.39%)

747.54 hits per line

Source Files on job Unit - 44171181460.1
  • Tree
  • List 321
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 44171181460
  • 239bee00 on github
  • Prev Job for on rewrite/main (#44151931707.1)
  • Next Job for on rewrite/main (#44215275298.1)
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