Repository navigation
Conversation
Sellers on Cloudflare Workers, or behind one NAT, reach the facilitator from one address and share one budget. On pubnet the limiter will count a caller by its API key (0105); on testnet a key is ignored, so the shared budget is accepted there. The task's first plan, a configured key, is 0105's now.
This branch has not been deployed
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.
Summary
Task 0060 (M1 Story 2.2, FR12) ends with a decision and no code: on testnet, sellers that reach the facilitator from one address keep sharing one rate-limit budget. The key the task was spawned to build went to pubnet in 0105, and testnet ignores a key, so this question was all that was left.
lore/1-tasks/active/0060_FEATURE_api-key-limiter.md): records the decision, drops the first plan (a configured key), and lists what was considered and not taken.apps/facilitator/README.md): says what a seller on a shared address sees, a 429 when another one uses the budget up, and that testnet accepts it.docs/planning/m1-epics.md): FR12 and Story 2.2 no longer promise a key in 0060; on testnet a key is ignored, on pubnet it is 0105.Reviewers, please confirm:
Please confirm
CF-Connecting-IP: 2a06:98c0:3600::103, so all sellers on Workers share 600/verifyand 600/settlerequests a minute, and one of them over the budget gets the others a 429 until the window ends. Testnet moves no real money, and on pubnet the limiter will count a caller by its API key (0105).RATE_LIMIT_VERIFYandRATE_LIMIT_SETTLEraise the budget for every client if testnet's sellers meet it.CF-Workerwas not measured. Cloudflare's reference does not say what the header holds for a Worker onworkers.dev, nor whether a Worker can overwrite it. The task keeps the option and its open questions, in case a testnet seller reports the limit.Testing
pnpm lint,pnpm typecheck,pnpm build→ passpnpm format:check→ the four changed files pass; the run flags 9 files, all in my git-ignored.vibe-wise/folder, which CI does not havepnpm test→ every package passes except the facilitator, where 19 files fail for want of PostgreSQL at127.0.0.1:15432(no Docker access on this machine); CI runs them on its Postgres service. The branch changes only Markdown