test(indexer): verify CG/CMC orderbook lcd-heavy rate limit (#278) #765
No reviewers
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-dex-terraclassic!765
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "cursor/verify-issue-278-docs-test-1678"
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?
Summary
Independent verification of GitLab #278 (CG/CMC orderbook endpoints under
lcd_heavy_router). The route move is already onmain(MR !996 /qa/278-cgcmc-orderbook-lcd-heavy). This MR adds regression coverage and doc cross-links from QA verification.Changes
indexer/tests/security.rs:cg_cmc_orderbook_lcd_heavy_rate_limit_returns_429— proves/cg/orderbookand/cmc/orderbook/*return 429 under the LCD-heavy governor when globalRATE_LIMIT_RPS=0.docs/indexer-invariants.md: list CG/CMC orderbook mirrors in rate-limit / LCD amplification rows; link #278.skills/AGENTS_INDEXER_API_LCD_SECURITY.md: document CG/CMC orderbook on the LCD-heavy route list.Verification checklist (acceptance → evidence)
/cg/orderbookand/cmc/orderbook/*use same per-IP LCD-heavy limit as native bookindexer/src/api/mod.rsroutes onlcd_heavy_router+apply_rate_limit_layer(..., rate_limit_lcd_heavy_rps). Test:cargo test --test security cg_cmc_orderbook_lcd_heavy_rate_limit_returns_429. Live: 25× hammer on/cg/orderbook?ticker_id=EMBER_CORAL→ 20× 200 then 429;/cmc/orderbook/EMBER_CORALshares drained heavy bucket (all 429 after CG burst);/api/v1/overviewstayed 200 (general limiter not gating).cargo test --test security lcd_heavy_route_rate_limit_returns_429/cg/orderbookpast heavy RPS/cmc/orderbook/{pair}Commands run
Follow-ups
x-ratelimit-limiton heavy 429 responses in tests if governor header semantics stabilize (live run showed120from layered governors).Security review (automated)
Commit reviewed:
9e47f4daf74f9cba057c9517056db3f3deb20e63Scope: 3 files —
indexer/tests/security.rs(new integration test),docs/indexer-invariants.md,skills/AGENTS_INDEXER_API_LCD_SECURITY.mdOutcome:
FINDINGS: 0medium+Security review: no medium+ findings on this diff.
Summary
This MR adds regression coverage and documentation cross-links for GitLab #278 (CG/CMC orderbook routes on
lcd_heavy_router). The route move andapply_rate_limit_layer(..., rate_limit_lcd_heavy_rps)wiring are already onmain; this change does not modify production indexer code.Reviewed paths
cg_cmc_orderbook_lcd_heavy_rate_limit_returns_429lcd_mock, seeded DB, andTestServerpatterns identical tolcd_heavy_route_rate_limit_returns_429. No secrets, no attacker-controlled sinks, no new HTTP surface.Attack-surface check (diff-limited)
RATE_LIMIT_LCD_HEAVY_RPSwith global limit disabled.Inline threads
None (no findings to anchor).
Reviewer: Cursor security automation · branch
cursor/verify-issue-278-docs-test-1678mentioned in commit
bd90d82902