add: solvent rate-limit — inspect and manage per-user rate limits#47
Draft
ianalloway wants to merge 1 commit into
Draft
add: solvent rate-limit — inspect and manage per-user rate limits#47ianalloway wants to merge 1 commit into
ianalloway wants to merge 1 commit into
Conversation
Adds `solvent rate-limit` with sub-commands: stats, check, ban, unban, list-banned, cleanup. Reads burst/hourly/daily limits from config. Includes 18 tests and --json flag for machine-readable output. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SGjM79GJpSksy9wSSBa7e6
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
solvent rate-limitCLI command with six sub-commands:stats,check,ban,unban,list-banned,cleanupSolventConfigso limits stay in sync withsolvent config--jsonfor machine-readable output and--dbto target a non-default DBsolvent/__main__.pyTest plan
tests/test_rate_limit_cmd.pycovering all sub-commands, JSON mode, ban/unban lifecycle, expired-ban filtering, and CLI dispatchsolvent rate-limit stats telegram:12345shows burst/hourly/daily counterssolvent rate-limit ban telegram:12345 --duration 3600 --reason spambans and reports expiry timesolvent rate-limit list-bannedomits expired banssolvent rate-limit check <user>exits 1 when blocked, 0 when allowedsolvent rate-limit cleanup --jsonreturns{"removed_events": N, "removed_bans": M}🤖 Generated with Claude Code
https://claude.ai/code/session_01SGjM79GJpSksy9wSSBa7e6
Generated by Claude Code