`/status?network=mainnet` is rate limited although `/status` is exempt
Maintainers usually reply within 3 days
@Joyful12-tech is already working on this.
Since Nov 20, 2026.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 84/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
Research direction
Start with the probe exemption in src/app.ts and compare its URL check with the routed path check in src/middleware/globalRateLimit.ts. Read src/__tests__/rateLimitContract.test.ts and tests/healthProbes.test.ts for test patterns. Add coverage showing query-string probe requests remain exempt and a normal route still receives 429 when the limit is low; finish when those cases pass with the existing rate limits unchanged.
Written by the indexing model from the issue text.
Description
Background
Health probes must never be throttled. src/app.ts says so at lines 55 to 62 and exempts them at line 174:
allowList: (req) => PROBE_PATHS.has(req.url),
req.url includes the query string. /status takes a network parameter (it reports per network), so a monitor that polls /status?network=mainnet does not match '/status', is counted against the shared per-IP limit of 100 a minute, and can be answered 429 during an incident. That is the exact failure the comment warns about.
The global ceiling next door does it right: src/middleware/globalRateLimit.ts line 44 compares the routed path, not the raw URL.
What to build
- Make the exemption match the route, not the raw URL, so any query string on
/status,/liveand/readyis still exempt. The/v1/...forms must be exempt too. - Do not exempt anything else. Do not change any limit value.
- Add tests that set a very low
RATE_LIMIT_IP_MAX, call/status?network=testnetmore times than the limit, and get no429; and that a normal route still gets429.
Where to look
src/app.tslines 62 and 168 to 186src/middleware/globalRateLimit.tsline 44src/__tests__/rateLimitContract.test.ts,tests/healthProbes.test.ts
Done when
-
/status,/liveand/readyare exempt with and without a query string, on bare and/v1paths - A non-probe route is still limited, proved by a test
- No rate limit, scope or CORS rule was removed or loosened
-
npm testpasses
Drips Wave · Complexity: Easy · 100 points
Repo: Divinity-Labs/Lens. Install with npm ci, typecheck with npx tsc --noEmit, test with npm test. Tests are vitest. Do not run jest: it reports zero tests and proves nothing.
You cannot reach the production service. Prove your change with local tests and fixtures. Mock the database (pgPool, prisma) the way the existing tests in src/__tests__/ and tests/ do.
Generated files are checked byte for byte by CI. If you add or change a route, edit openapi.yaml by hand and then regenerate the generated files and commit them: npm run openapi:gen (writes openapi.json and the README sections), npm run client:gen (the TypeScript client schema) and, if you touched the GraphQL schema, npm run graphql:schema:gen (writes schema.graphql). The full list is in the scripts section of package.json; also read CONTRIBUTING.md. If a check fails and the diff looks empty, it is line endings: commit with LF.
Prices are high-precision decimals. Do not add a new place where a price or amount goes through parseFloat, Number() or ::float before it reaches the caller.
MCP tools must return exactly the fields the matching REST route returns (tests/mcp-lens.test.ts asserts equality), and the MCP tool modules must not import the database driver directly. Reads are injected.
Do not remove or loosen an existing API-key scope, CORS rule or rate limit, and do not replace src/app.ts wholesale. Past pull requests did both by accident.
Do not weaken a test to make it pass. No real user data, wallet addresses of real users, keys, tokens or connection strings in code, tests or fixtures. Never shorten a Stellar address or contract id; copy it in full from the file that defines it.
Required: Before submitting, join the contributor Telegram so your work can be tracked and counted toward the Stellar Wave: https://t.me/+fxHXq8f1SwlkZDBk
- Dominant language
- TypeScript
- Stars
- 4
- Forks
- 71
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 24
Getting set up
- Ships a 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 Divinity-Labs/Lens
-
area:database difficulty:easy help wanted points:100 Stellar Wave
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Divinity-Labs/Lens#688 · 1 comment ·
Maintainers usually reply within 3 days
-
`/price/:assetA/:assetB/history` turns a bad `limit` into a 500 and an unknown pair into an empty 200Possibly taken @I-frenzy claimed this today. Openarea:api difficulty:easy help wanted points:100 Stellar Wave
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Divinity-Labs/Lens#664 ·
Maintainers usually reply within 3 days
-
area:reliability difficulty:easy help wanted points:100 Stellar Wave
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Divinity-Labs/Lens#663 · 1 comment ·
Maintainers usually reply within 3 days
-
area:ingest difficulty:easy help wanted points:100 Stellar Wave
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Divinity-Labs/Lens#633 ·
Maintainers usually reply within 3 days
-
Webhook retries have no jitter, so failures synchronisePossibly taken @Richard-tobi claimed this 35 days ago. Openarea:reliability difficulty:easy help wanted points:100 Stellar Wave
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Divinity-Labs/Lens#341 · 2 comments · 1 assignee ·
Maintainers usually reply within 3 days
All issues in Divinity-Labs/Lens
Similar issues
-
[功能请求] 设置选项语言调整Open功能请求
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
antithesishq/bombadil#473 ·
Maintainers usually reply within 2 days
-
The structured output reference promises null results for refusals that carry validation detailsOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
mattermost/mattermost-mobile#10358 ·
Maintainers usually reply within 1 day
-
ready-for-agent
Difficulty 1/5 Under an hour Newbie friendliness 86/100
LucasSantana-Dev/Lucky#3257 ·
Maintainers usually reply within 1 day