refactor(server): drop unused permission helpers - #687
Closed
staging-devin-ai-integration[bot] wants to merge 1 commit into
Closed
staging-devin-ai-integration[bot] wants to merge 1 commit into
staging-devin-ai-integration[bot] wants to merge 1 commit into
Conversation
get_default had no callers and can_accept_oneshot was never consulted; the oneshot limit is enforced by the tower ConcurrencyLimitLayer. Signed-off-by: streamkit-devin <devin@streamkit.dev>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #687 +/- ##
==========================================
+ Coverage 85.26% 85.28% +0.01%
==========================================
Files 251 251
Lines 76246 76232 -14
Branches 2485 2485
==========================================
+ Hits 65014 65017 +3
+ Misses 11226 11209 -17
Partials 6 6
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PermissionsConfig::get_defaulthad no callers at all, andcan_accept_oneshotwas never consulted at runtime — oneshot concurrency is enforced by the towerConcurrencyLimitLayerbuilt frommax_concurrent_oneshotsinserver/mod.rs. Both were kept alive only by rationale-free#[allow(dead_code)].can_accept_oneshot's unit test, which gave false confidence that production consults the helper). Keeping a lookalike of the actively usedcan_accept_sessioninvites a future change to the helper that silently never takes effect.max_concurrent_oneshotsis still enforced exactly as before by the tower layer.Review & Validation
rg 'can_accept_oneshot|get_default' apps/skit/srccargo test -p streamkit-server --lib permissionsandjust lint-skitLink to Devin session: https://staging.itsdev.in/sessions/f69e65121de248df9cc95587ea8f4361
Open in Devin Desktop: https://staging.itsdev.in/desktop/session/f69e65121de248df9cc95587ea8f4361?variant=devin-insiders
Requested by: @streamer45
Devin Review
fd1ec6a