test(indexer): limit-book LCD negative/zero limit/depth (#317) #806
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!806
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "cursor/gitlab-issue-workflow-9373"
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
Follow-up to https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/317 (closes the gap after MR !773).
PlasticDigits asked for limit-book and limit-book-shallow lower-bound coverage in addition to the SQL list sweep already merged in !773.
Changes (tests + docs only):
api_limit_book_lcd_mock.rs:limit_book_negative_and_zero_limit_depth_clamp_not_500— wiremock LCD harness assertsGET .../limit-book-shallow?depth=-1|0andGET .../limit-book?limit=-1|0return 200 (never 500) withorders.len() <= 1.docs/indexer-invariants.md: numeric caps + on-chain book rows reference the new test.No handler changes.
Acceptance checklist
limit=-1/0cargo test --test api_limit_lower_bound(!773)cargo test --test api_orderbook_lcd_mock(!773)cargo test --test api_limit_book_lcd_mock limit_book_negativecargo test --test limit_clamp_guardraildocs/indexer-invariants.mdCloses #317 when merged.
changed the description
mentioned in issue #317
changed the description
Security review
Commit reviewed:
1538ea855007381c10c5affe95bdbaa9f45bb4b1Scope: 3 files —
indexer/tests/api_limit_book_lcd_mock.rs(new regression test),indexer/tests/api_limit_lower_bound.rs(module doc),docs/indexer-invariants.md(documentation). No production handler or dependency changes.Method: Inspected MR diff; traced query parameters
limit/depthon LCD-backedlimit-bookandlimit-book-shallowroutes to existing.clamp(1, max)inindexer/src/api/pairs.rs(unchanged in this MR). New test asserts HTTP 200 and bounded order count forlimit=-1|0/depth=-1|0via wiremock harness only.Outcome:
FINDINGS: 0medium+Security review: no medium+ findings on this diff.
No inline threads — nothing to flag at specific lines.
mentioned in commit
c90c83b0bcmentioned in commit
2c1302c377