[brouie][qa][dev] Review indexer hardening commit 1f80d72 #40
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#40
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Scope
Review all changes in commit
1f80d72onmain(indexer hardening, tests, docs, and any co-located edits in that commit).Pre-merge / environment
cd indexer && cargo test --libpasses (proptest + unit tests, no Postgres).cd indexer && cargo test --testspasses with Postgres (e.g.make start,TEST_DATABASE_URLif non-default); integration tests fail fast if DB is missing.cargo clippy/cargo fmtclean for touched crates as required by CI.Security and API behavior
internal_err(no raw SQL/DB strings).RATE_LIMIT_RPS > 0(429 + headers).typequery: onlybuy,sell, or omit; invalid → 400.BASE_TARGET(two non-empty segments); injection-style strings rejected (seesecurity.rs+ proptest).Indexing and data integrity
docs/indexer-invariants.md).wasm_attr_last).Tests and docs
api_health,api_hooks,api_orderbook_lcd_mock,candle_skip_zero_price,position_tracker_clamp, expandedsecurity.rs/api_*.docs/indexer-invariants.mdmatches implemented behavior; links fromdocs/README.mdanddocs/testing.mdwork.tests/common/lcd_mock.rs) matches realSmartQueryResponse+PoolResponseshape.Product / QA (Brouie)
/swagger-uistill loads and documents new/changed query params.Sign-off
#40 Review complete.
Pre-merge:
[x] cargo test --lib — 27/27 pass
[x] cargo test --tests — 125/125 pass (single-threaded with Postgres)
[x] cargo clippy — clean (warnings only, no errors)
Security and API:
[x] Hooks return generic 500 via internal_err (no raw SQL/DB strings)
[x] Rate limiting wired (tower_governor, configurable rate_limit_rps)
[x] CORS allowlist from config, invalid origins warned
[x] CG type filter: buy/sell/omit valid, invalid -> 400
[x] Ticker shape: invalid format -> 400 (proptest + security.rs)
[x] Numeric caps: pairs limit capped at 100, candles/trades at 1000
[x] Pairs API returns { items, total, limit, offset } with pagination
[x] Search (q=) works, asset filter works, sort/order works
[x] Invalid sort -> 400
[x] Single pair GET works (200)
[x] CG pairs/tickers -> 200, invalid ticker -> 400, invalid type -> 400
[x] CMC summary/ticker/assets -> 200
[x] Swagger /swagger-ui/ui/ loads (200)
Docs:
[x] docs/indexer-invariants.md matches behavior, links from README.md and testing.md work
[x] Wiremock LCD stub matches PoolResponse shape
Product/QA:
[x] CG + CMC endpoints verified
[x] Swagger loads
[x] Oracle/pairs/tokens happy paths verified
Sign-off: @Brouie 2026-03-25
@Brouie Issue #40 QA review is complete and signed off (2026-03-25). Closing.