HIGH: All 800+ tests blocked by conftest.py crash — slowapi rate_limit_auth() decorator breaks on token() function #56
Labels
No labels
agentic-osint
audit
blocked:commit-ready-failed
blocked:gate-fetch
blocked:gate-fetch
blocked:gate-lint
blocked:gate-plan
blocked:gate-research
blocked:needs-decision
blocked:needs-human
blocked:no-changes
blocked:preflight
blocked:verify-failed
bug
chore
deferred
enhancement
feature-request
in-progress
lint-baseline
lint-cleanup
needs-decompose
needs-triage
performance
quickfix
security/medium
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/osint-hub#56
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug
The entire test suite fails to load. Conftest.py at
backend/tests/conftest.py:31importsfrom app.main import app, which triggers the full FastAPI router chain. Theauth.pyrouter uses@rate_limit_auth()decorator on thetoken()function, but the decorator from slowapi requires the function to have arequestparameter — whichtoken()lacks, having onlyformandsession.Error
Impact
All 800+ tests are blocked — none can load or run. This is a silent CI pipeline failure.
Root Cause
backend/app/routers/auth.pyline 15:The
rate_limit_auth()returnslimiter.limit("5/minute")which wraps the function and inspects its signature forrequestorwebsocket. Since thetokenfunction doesn't have one, it raises.Related
Issue #908 already notes rate limiting is "completely disabled" — this is the root cause.
Fix Options
request: Requestparameter totoken()and other rate-limited functionsrate_limit_auth()to usekey_functhat doesn't need a request paramFixed in commit. Closing.