Repository navigation
Conversation
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This branch was successfully deployed
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.
Problem
POST /providers/{id}/resetneeds no authentication and setsnext_url_discovery_at/next_bms_test_atto now. Anyone can call it in a loop to keep re-queuing URL discovery and BMS bandwidth tests for any provider, which costs worker time and keeps load on that provider.I did not add a bearer token because I don't know whether the sp-tool frontend calls this from the browser; a token would break that.
Change
A given provider's schedule can be reset once per 15 minutes (
RESET_COOLDOWN). A repeat within that window returns429.url_discoverydoes not blockbms_test.allcounts as both.AppState, so there is no migration.Limits — your call
AUTH_TOKENwould be the stronger fix.Testing
cargo fmt --checkandcargo clippy --workspacepass. Theproviders_resetintegration tests pass locally (9, including two new ones for the cooldown and for unknown providers). The rest of the integration suite was not run locally; CI runs it.🤖 Generated with Claude Code