Document the 1024-PAT limit of the disabled-user PAT warning bound
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 76/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Active
- Domain
- backend, documentation
Research direction
Read the PAT warning description in docs/user-manual.md around lines 3643–3646, then inspect server/orcaster_server/pats/service.py and server/orcaster_server/auth/rate_limit.py at the referenced lines. Find the existing rate-limit tests and their fake-clock setup, then add coverage rotating through more than 1024 PAT ids. Done means the manual explains eviction and immediate logging on return, and the test confirms the accepted behavior without changing code.
Written by the indexing model from the issue text.
Description
Problem
When a disabled user's personal access token (PAT) is used, the server logs a warning. It is rate-limited by a KeyedBoundedWarning keyed by PAT id, with a 5-minute window and at most 1024 remembered PATs (server/orcaster_server/pats/service.py:54-64).
When a 1025th key arrives, the least recently used key is evicted and its pending count is flushed (server/orcaster_server/auth/rate_limit.py:362-378). A key that comes back after eviction opens a new window and logs at once. So with more than 1024 PATs in use at the same time, requests that rotate through them can produce up to one log line per request. No events are lost and memory stays bounded. Only log volume grows.
The user manual states the bound without that condition: "a warning (WARNING) per token at most every 5 minutes (per server process)" (docs/user-manual.md:3643-3646). That is wrong above 1024 tracked PATs.
Decision
The limit is accepted as it is. This issue does not change the code. It fixes the documentation and pins the current behavior with a test.
Proposed change
- Fix the manual: the 5-minute maximum per token holds only while at most 1024 PATs are tracked per server process. Above that, a token that was evicted logs again at once when it is used.
- Add a test with a fake clock that rotates through more than 1024 PAT ids (for example 1025) and asserts the current behavior: memory stays at 1024 keys, an evicted key flushes its pending count, and a returning key logs at once. The test comment states that this behavior is accepted.
Acceptance criteria
-
docs/user-manual.mdsays that the per-token 5-minute bound holds only with at most 1024 PATs tracked per server process, and what happens above that. - A test rotates through more than 1024 PAT ids and asserts the accepted behavior described above.
- No code change: the warning text, its fields, the 1024 limit and the 401 response for a disabled user stay the same. Existing tokens keep working as before.
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 10
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from AInvirion/orcaster
-
enhancement P3 server
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
Maintainers usually reply within 1 day
-
enhancement good first issue P3 server
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
bug P2 server
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
bug P3 server
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
enhancement P3 server
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
All issues in AInvirion/orcaster
Similar issues
-
[Resource]: SpaicelyOpenresource-submission validation-passed
Difficulty 1/5 Under an hour Newbie friendliness 68/100
hesreallyhim/awesome-claude-code#3875 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
bvis/aegis-hass#725 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
datasektionen/cashflow#468 ·
-
dont call alembic upgrade until we check whether or not the cache DB has an alembic version stampOpen
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
Bug: AttributeError: 'GptOssConfig' object has no attribute 'rope_scaling_factor' with transformers >= 5.xPossibly taken @NimaVaziri claimed this today. OpenPytorch
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
NVIDIA/TensorRT-LLM#23406 ·
Maintainers usually reply within 1 day