HTTP integration test: hybrid route cache tier isolation (#306) #797
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!797
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "cursor/gitlab-issue-workflow-1aaf"
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
Closes the regression gap from GitLab #283 / MR !751 by adding HTTP-level integration tests that seed
tradersrows with differenttier_idvalues and proveGET /api/v1/route/solvedoes not serve wrong-discount cached quotes across discount tiers.Related issue: https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/306
Changes
seed_traders_with_tierstest helper inindexer/tests/common/mod.rsstart_tier_aware_route_optimizer_mockinindexer/tests/common/lcd_mock.rs— distinct router/hybrid amounts keyed on discount subject (traderif set, elsesender)route_solve_get_cache_tier_isolation— tier-0 then tier-5 sequential GETs return differentestimated_amount_out; unknown sender resolves tier 0route_solve_get_cache_same_tier_reuses_lcd— two tier-5 senders share cache (wiremock call count stable)route_solve_invalid_sender_returns_400— sender validation smoke testskills/AGENTS_HYBRID_QUOTING.mdanddocs/indexer-invariants.mdAcceptance checklist
origin/main(conflict-free; #323 max 4 hops in docs)git merge origin/mainoncursor/gitlab-issue-workflow-1aafcargo test --test api_route_solve route_solve_get_cache_tier -j 1 -- --test-threads=1route_solve_get_cache_tier_isolationroute_solve_get_cache_same_tier_reuses_lcdroute_solve_get_cache_tier_isolation(unknown sender assertion)cargo test --test api_route_solve -j 1 -- --test-threads=1route_solve_get_cache_tierin AGENTS_HYBRID_QUOTING.md + indexer-invariants.mdcargo test hybrid_cache_key --lib0583223)Third-party verification
Requires Postgres at
TEST_DATABASE_URL(defaultdex_indexer_test).Closes #306
changed the description
changed the description
mentioned in issue #306
changed the description
Security review
Commit reviewed:
662cab65231b9c8f767f2e2a273180ab2db9c3f3Scope: 5 files — integration tests (
api_route_solve.rs), test helpers (lcd_mock.rs,mod.rs), and docs cross-links (indexer-invariants.md,AGENTS_HYBRID_QUOTING.md). No changes underindexer/src/,frontend-dapp/, orsmartcontracts/.Outcome:
FINDINGS: 0medium+Security review: no medium+ findings on this diff.
What was reviewed
indexer/tests/(wiremock LCD stubs, DB seed helpers, HTTP integration assertions). Test binaries are not shipped with the indexer service.seed_traders_with_tiersuses parameterizedsqlxbinds ($1,$2); no string concatenation into SQL.route_solve_invalid_sender_returns_400exercises existing sender validation (invalid address → 400); it does not weaken controls.Prior review threads
No prior security-review inline comments on this MR. Nothing to re-report.
Inline threads
None (no medium+ findings).
added 24 commits
main0583223a- merge: resolve main conflicts for MR !797 (#306)Compare with previous version
mentioned in commit
0583223a6achanged the description
Security review
Commit reviewed:
0583223a6af69ed46903d25ed5336eb9644b98ddScope: 6 files — integration tests (
api_route_solve.rs), test helpers (lcd_mock.rs,mod.rs), docs cross-links (indexer-invariants.md,AGENTS_HYBRID_QUOTING.md), and a cosmetic import-format change infrontend-dapp/src/utils/__tests__/indexerErrors.test.ts. No changes underindexer/src/orsmartcontracts/.Outcome:
FINDINGS: 0medium+Security review: no medium+ findings on this diff.
What was reviewed
indexer/tests/(wiremock LCD stubs, DB seed helpers, HTTP integration assertions). Test binaries are not shipped with the indexer service.seed_traders_with_tiersuses parameterizedsqlxbinds ($1,$2); no string concatenation into SQL.route_solve_invalid_sender_returns_400exercises existing sender validation (invalid address → 400); it does not weaken controls.main(commit0583223a…); diff unchanged in security-relevant terms — still test/docs only.Prior review threads
Prior top-level review on
662cab65231b9c8f767f2e2a273180ab2db9c3f3reached the same conclusion. No inline security threads to re-report; findings still do not apply.Inline threads
None (no medium+ findings).
changed the description
resolved all threads
mentioned in commit
1a2801a287