Skip to content

Add rate limiting with Bottleneck #5

Description

@burner-agent

Summary

Integrate SGrondin/bottleneck (2k stars) for robust rate limiting across Discord API calls, Claude CLI invocations, and webhook dispatches.

Motivation

During busy RALPH loops, Burner can hit Discord rate limits. The current src/queue.ts handles basic queuing, but Bottleneck provides battle-tested rate limiting with priorities, clustering support, and reservoir-based throttling that would prevent API abuse and enable better resource allocation.

Proposal

  • Add bottleneck as a dependency
  • Wrap Discord API calls with a Bottleneck limiter matching Discord's rate limits
  • Wrap Claude CLI spawns with a concurrency limiter to prevent resource exhaustion
  • Add priority levels so operator commands bypass queue during high load

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions