Skip to content

Fix bridge cache rewarm rate limiting - #345

Merged
ewlarson merged 1 commit into
developfrom
feature/fix-bridge-rewarm-rate-limit
Aug 21, 2026
Merged

Fix bridge cache rewarm rate limiting#345
ewlarson merged 1 commit into
developfrom
feature/fix-bridge-rewarm-rate-limit

Conversation

@ewlarson

Copy link
Copy Markdown
Contributor

Summary

  • authenticate in-process bridge cache rewarm requests with the configured server API key
  • retain an explicit warning fallback when no server key is configured
  • add regression coverage proving more than 10 rewarm requests avoid the anonymous rate limit

Production impact

Kithe bridge runs have failed since August 18 because cache rewarm requests were anonymous: the first 10 requests succeeded, then the remaining requests received HTTP 429 responses. Any rewarm error marks the bridge run failed and prevents its successful watermark from advancing. This change routes those requests through the existing unlimited server API-key tier without introducing a new secret or bypass.

Testing

  • make lint-check
  • pytest backend/tests/services/test_bridge_cache_refresh.py backend/tests/middleware/test_rate_limit_integration.py (13 passed)
  • pytest backend/tests/services/test_bridge_sync_service.py backend/tests/tasks/test_bridge_sync_task.py backend/tests/services/test_api_key_service.py (46 passed)
  • make test-fast PARALLEL_WORKERS=4 WALLCLOCK_TIMEOUT_SECONDS=900 (1,864 passed, 127 skipped, 1 xpassed; two Elasticsearch setup errors caused by the stopped local service)
  • pytest backend/tests/elasticsearch/test_client.py -q after starting Elasticsearch (4 passed, 2 skipped)

@ewlarson
ewlarson marked this pull request as ready for review August 21, 2026 19:57
@ewlarson
ewlarson merged commit 06a0cef into develop Aug 21, 2026
12 checks passed
@ewlarson
ewlarson deleted the feature/fix-bridge-rewarm-rate-limit branch August 21, 2026 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant