docs(indexer): verify #284 — document clamp(1,max) limit caps #766
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!766
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "cursor/verify-284-negative-limit-docs-f66a"
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
Verified GitLab #284 (negative
limitquery param → Postgres 500). The code fix is already onmainvia MR !749 (hooks.rs.clamp(1, 200)+ regression test). This MR only updatesdocs/indexer-invariants.mdso the numeric query caps invariant documents.clamp(1, max)(not the old.min(max)wording) and links the hooks negative/zero regression test.Verification checklist (issue acceptance criteria)
?limit=-1and?limit=0never return 500cd indexer && cargo test --test api_hooks hooks_negative_and_zero_limit_clamp_to_one_not_500 -j 1 -- --test-threads=1body.len() <= 1limitto[1, max]rg 'unwrap_or.*\.min\(' indexer/src/api(expect no matches);rg '\.clamp\(1,' indexer/src/api(15 list-limit sites incl. hooks.rs:61).min()limit clamps remain inapi/cd indexer && cargo test --test security -j 1 -- --test-threads=1cd indexer && cargo test --test api_hooks -j 1 -- --test-threads=1/api/v1/hooks)curl -s -o /dev/null -w '%{http_code}' 'http://127.0.0.1:3001/api/v1/hooks?limit=-1'200(not500) before indexer task halted on LCD block-1docs/indexer-invariants.mdnumeric query caps row.min(200)etc.Follow-ups
limitregression cases tosecurity.rs(and other*_limit_cappedtests) so the suite catches future.min()regressions beyond hooks — Brouie noted this gap in the issue thread.mentioned in issue #317
mentioned in commit
f331d38aa5