Verify the VWS request rate limits against real Vuforia - #3579
Merged
Conversation
Observed against real Vuforia on 2026-09-08, by sending bursts to read-only endpoints: - GET /targets accepts two requests per fixed clock minute, not the documented one. DOCUMENTED_REQUEST_RATE_LIMITS now allows two. - The per-second limits are enforced roughly, by more than one Envoy layer, so the mock keeps the documented numbers with rolling windows. - A limit is keyed on the server access key and applied before the signature is checked. The mock now rate limits before authorization, so a bad-signature request counts and a request over the limit gets a 429 rather than a 401. - The 429 is Envoy's empty-bodied response with x-envoy-ratelimited, not a JSON TooManyRequests body. The mock now returns that shape. A test runs the GET /targets limit against every backend, with a fresh limited database for each mock. The never-attempted entry is removed and the differences document records what was observed but is not implemented: the clock-aligned window and the loose per-second limits. Closes #3572 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
adamtheturtle
temporarily deployed
to
vuforia
September 8, 2026 11:34 — with
GitHub Actions
Inactive
The fixture's match statement had no fall-through arm and the request loop always broke out, so branch coverage saw two arcs never taken. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3572.
What real Vuforia does (observed 2026-09-08)
Bursts were sent to read-only VWS endpoints, first from a CI database and then from older databases which CI does not use.
GET /targetsaccepts two requests per minute, not the documented one, and the window is a fixed clock minute: two requests at :40 passed, a third was rejected, and a request at :03 of the next minute passed.GET /summaryrequests saw 17 to 37 succeed against the documented 15; a burst of 120GET /targets/{id}saw 74 succeed against 45; a burst of 60GET /duplicates/{id}saw 11 succeed against 10. There are two Envoy layers, and either may reject.Authorizationheader and applied before the signature is checked: bad-secret requests count towards the limit, an unknown key gets its own bucket, and one database's burst does not affect another's. Requests with noAuthorizationheader were not rate limited.429with an empty body, noContent-Type,server: envoyandx-envoy-ratelimited: true.x-envoy-upstream-service-timeis present only when the inner layer rejected. TheTooManyRequestsresult code never appears.The test suite had not noticed because
pytest-retryand the fixtures retryTooManyRequestsError.Changes
DOCUMENTED_REQUEST_RATE_LIMITS.list_targetsis now two per minute.ValidatorContextno longer carries it.TestRateLimitintest_target_list.pyruns against every backend. Each mock gets a fresh database with the limits so the shared database stays unlimited. Passed against real Vuforia locally.unverified-behavior.rstdrops the never-attempted entry anddifferences-to-vws.rstrecords what is observed but not implemented: the clock-aligned window and the loose per-second enforcement.The pylint spelling failure on
subclassesintests/mock_vws/utils/retries.pyat the manual hook stage is pre-existing and not touched here.🤖 Generated with Claude Code