Fix cosmes patch, db_orderbook_sim, and add #293 indexer integration tests #943
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!943
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-420-cosmes-db-sim-slippage-tests"
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
Addresses GitLab #420 (parent #411 recommendation 13):
@goblinhunt/cosmes@0.0.71-ghunt.22to matchpackage-lock.json; pinnedpackage.jsonto^0.0.71-ghunt.22. SHA inpatches/.cosmes-patch-sha256unchanged (same patch content).db_orderbook_sim:zero_reserve_mirror_returns_no_outputnow usesMirrorFreshness::EmptyPool(production semantics for zero reserves) sosimulate_pool_only_from_mirrorreturnsInsufficientLiquidityas intended.seed_route_slippage_293fixture androute_solve_slippage_percent_enrichment_293inapi_route_solve.rs— assertsslippage_percent,spot_amount_out, and symmetric deviation math onGET /route/solvewithpool_only=true.limit_book_lcdcan map wasm "key not found" 500s to 400 (fixeslimit_book_invalid_cursor_lcd_not_found_400).Docs:
docs/testing.md,skills/AGENTS_LOCAL_POSTGRES_DEV.md.Acceptance checklist
make test-frontend1040/1040 incl.cosmesPatch127.test.tsmake test-frontendmake test-indexer-integrationcompletes (lib + integration)make setup-indexer-postgres && make test-indexer-integrationslippage_percent(#293)cd indexer && cargo test --test api_route_solve route_solve_slippage_percent_enrichment_293 -- --test-threads=1db_orderbook_sim::zero_reserve_mirror_returns_no_outputpassescd indexer && cargo test --lib api::db_orderbook_sim::tests::zero_reserve_mirror_returns_no_outputVerification for third parties
Follow-ups
verify-issue-293.sh[3c] was not re-run in this session (requires full LocalTerra stack + swarm warmup); Postgres integration test now covers the sameslippage_percentfields and symmetric math.Security review — MR !943
Commit reviewed:
4ad0ae1440043ea0a5d741217c44ac4b0e9a89cdScope: Cosmes patch rename (
0.0.71-ghunt.21→0.0.71-ghunt.22, unchanged SHA),db_orderbook_simtest fix, LCD errorbody_snippetin internalAllEndpointsFailedmessages, #293 slippage integration test + fixture seed, docs.Outcome:
FINDINGS: 0medium+Summary
Security review: no medium+ findings on this diff.
Areas reviewed
body_snippetinLcdError::AllEndpointsFailedlcd_query_missing_key(msg.contains("not found")) for wasmd 500 bodies. Client responses remain sanitized vialcd_gateway_err→ generic502/"Upstream LCD query failed"(indexer/src/api/errors.rs); covered bylcd_failure_returns_sanitized_502_bodyinsecurity.rs. Snippet is operator-trusted LCD content, capped at 200 chars; not attacker-controlled via API params..cosmes-patch-sha256identical). Fee undershoot guard is LocalTerra-only and hardens signing; no new supply-chain surface beyond existing patch-package flow.db_orderbook_simtestMirrorFreshness::EmptyPoolproduction semantics.seed_route_slippage_293/ integration test$1binds); test harness only, no new HTTP surface.Inline threads
None — no medium+ findings to anchor on diff lines.
Automated security review (CosmWasm / Terra / DeFi). Re-review if the diff changes materially.
mentioned in commit
2f26b71d6c