Skip to content

Add allowlist for elevated device limits#387

Merged
DJAndries merged 4 commits intomasterfrom
high-limit-client-ids
Dec 8, 2025
Merged

Add allowlist for elevated device limits#387
DJAndries merged 4 commits intomasterfrom
high-limit-client-ids

Conversation

@DJAndries
Copy link
Collaborator

@DJAndries DJAndries commented Dec 4, 2025

Resolves #383

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for an allowlist of client IDs that can have elevated device limits (100 instead of 50 active devices). The allowlist is configured via the HIGH_DEVICE_LIMIT_CLIENT_IDS environment variable with a comma-separated list of client IDs.

  • Introduces a new device_limit.go file with device limit management functionality
  • Refactors the hard-coded device limit check to support dynamic limits based on client ID allowlist
  • Adds comprehensive test coverage for both normal and elevated device limits

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.

File Description
command/device_limit.go New file implementing device limit logic with allowlist support for elevated limits
command/command.go Removes hard-coded maxActiveDevices constant and uses new checkDeviceLimit function
command/command_test.go Adds test helper for device info entities and comprehensive test for device limit enforcement with allowlist

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mschfh
Copy link
Contributor

mschfh commented Dec 4, 2025

lint fix: #388

@mihaiplesa mihaiplesa force-pushed the high-limit-client-ids branch from af5c631 to 5bf0fef Compare December 4, 2025 09:33
@mihaiplesa mihaiplesa force-pushed the high-limit-client-ids branch from 5bf0fef to a13b9bc Compare December 4, 2025 10:09
@github-actions
Copy link

github-actions bot commented Dec 4, 2025

The following commits were not verified:
a13b9bc (unsigned)

@DJAndries DJAndries force-pushed the high-limit-client-ids branch from 8338651 to 87a3951 Compare December 4, 2025 20:32
Copy link
Collaborator

@AlexeyBarabash AlexeyBarabash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@DJAndries DJAndries merged commit e263736 into master Dec 8, 2025
8 checks passed
@DJAndries DJAndries deleted the high-limit-client-ids branch December 8, 2025 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

THROTTLED, exceed limit of active devices in a chain

5 participants