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

decentraland / comms-gatekeeper / 28303785699
85%

Build:
DEFAULT BRANCH: main
Ran 27 Jun 2026 10:32PM UTC
Jobs 1
Files 150
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

27 Jun 2026 10:30PM UTC coverage: 85.347% (+0.09%) from 85.255%
28303785699

push

github

web-flow
feat: record player IP/device on token requests and support device bans (#274)

* feat: record player IP/device on token requests and support device/IP bans

Capture each player's latest IP (Cloudflare cf-connecting-ip header) and
device id (deviceIdentifier from the signed-fetch auth metadata) into a new
player_connection_info table whenever a LiveKit token is requested on
/get-scene-adapter or /private-messages/token. Capture is best-effort and
never blocks token issuance.

Use that data for moderation: banning a player now always snapshots their
recorded device id, and optionally (banIp flag) their IP, onto the user_bans
record. Token endpoints reject (403) when the request's address, device id, or
IP matches an active ban, so a banned player is caught even under a different
wallet. The existing GET /bans listing now surfaces the banned device id/IP.

Empty IP/device values are normalized to null so they cannot become
unmatchable dead data. cf-connecting-ip is trusted because the service runs
strictly behind Cloudflare.

* test: cover banIp/device capture via ban endpoint and scene-adapter capture

Add end-to-end coverage for the headline ban behavior through POST
/users/:address/bans: seed player_connection_info, then assert a permanent ban
snapshots the recorded device id (IP left null), and that banIp:true also
snapshots the IP — and that a different wallet connecting from the banned
device/IP is reported as banned.

Also assert /get-scene-adapter records the player's IP and device id.

* test: cover address-only match and expired-ban cases for getActiveBanForConnection

Directly assert the two remaining branches: an address-only query (no device/IP)
matches an active ban, and an expired ban matches neither by address nor by the
recorded device id.

* refactor: drop IP banning, keep IP logging

Removes IP banning (the banIp opt-in flag, the user_bans.banned_ip column, and
IP matching in getActiveBanForConnection). Device-id banning is unchanged,... (continued)

1105 of 1419 branches covered (77.87%)

Branch coverage included in aggregate %.

65 of 73 new or added lines in 9 files covered. (89.04%)

3042 of 3440 relevant lines covered (88.43%)

75.54 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
88.3
-1.39% src/controllers/handlers/comms-scene-handler.ts
2
71.43
src/migrations/1782483861343_player-connection-info.ts
2
75.0
src/migrations/1782483862343_add-device-id-to-user-bans.ts
1
87.5
0.54% src/controllers/handlers/private-messages/get-token-handler.ts
Jobs
ID Job ID Ran Files Coverage
1 28303785699.1 27 Jun 2026 10:32PM UTC 300
86.59
GitHub Action Run
Source Files on build 28303785699
  • Tree
  • List 150
  • Changed 96
  • Source Changed 7
  • Coverage Changed 96
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #28303785699
  • 21f055b8 on github
  • Prev Build on main (#28047204770)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc