~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

Rate limits can't be lifted for one account: a bot past the write limit means turning them all off

Open
Open chadtmiller.com opened this issue 0 comments

What happened

runner.knotless.dev (did:plc:4bocpkn5zkwe4wuu4plrj5kt), knotless's CI runner, has its account on monolith.chadtmiller.com. It writes a dev.knotless.check record per workflow per run and rewrites it as the run goes (putRecord, 2 points each). On a busy afternoon (two repositories' merge queues and a review bot catching up) it went past the writes limit, 5000 points an hour, and every check it reported was refused 429 RateLimitExceeded, though each check's steps had passed. Pulls were ejected from the merge queue for checks that never failed.

The only way out today is PDS_RATE_LIMITS_ENABLED=false, which lifts every limit for every account and address. That is what monolith.chadtmiller.com now runs (hetzner-infra, branch monolith/no-rate-limits), since it holds only the owner's accounts and bots; a server with other people's accounts can't do that.

What you expected

A way to exempt trusted callers while the limits stay on for everyone else, for example:

  • By account: PDS_RATE_LIMIT_EXEMPT_DIDS, DIDs whose token-keyed limits (writes, uploads, handle) charge nothing. Covers a runner or a bot on the server.
  • By address: as the reference's PDS_RATE_LIMIT_BYPASS_IPS, for limits keyed by client address (global, sync, signup), from a known service.
  • By key: as the reference's PDS_RATE_LIMIT_BYPASS_KEY and its x-ratelimit-bypass header, so a trusted service needn't have a fixed address.

The reference has the last two; matching them keeps spec/LIMITS.md comparable, and the first is this server's own, for the bot accounts it hosts. A charge skipped this way would answer no RateLimit-* headers, or say so, as spec/LIMITS.md decides. The admin's _stats could count exempt calls apart.

How to see it

Run with the limits on and have one account putRecord more than 2500 times in an hour (crates/pds-server/src/limits.rs, charge): every write after is 429, and nothing but PDS_RATE_LIMITS_ENABLED=false lets that account through.

Where

monolith.chadtmiller.com, 0.5.1 (/xrpc/_health), 2026-11-18 around 23:00 UTC.