SEC-E07: Playwright E2E for swap route display vs on-chain hops (#428) #963
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!963
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-428-swap-route-alignment-e2e"
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
Adds strict LocalTerra Playwright coverage for SEC-E07 (#428): the Swap page Route row (
swap-route-summary) must match the wasmswaphop sequence actually executed on-chain.e2e/swap-route-alignment-tx.spec.ts— direct dual-CW20 swap (client pool-only path; 1 wasm hop) and multihop CORAL→IRON (≥2 hops, indexer hybrid).e2e/helpers/route-alignment-e2e.ts,txJsonWasmSwapHopsine2e/helpers/lcd.ts.skills/AGENTS_FRONTEND_SWAP_ROUTE_DISPLAY.md,frontend-dapp/e2e/README.md,docs/testing.md.Acceptance checklist
sg docker -c 'CI=1 bash scripts/with-node.sh --cwd frontend-dapp -- ./node_modules/.bin/playwright test e2e/swap-route-alignment-tx.spec.ts -g multihop --project=e2e-tx'(aftermake setup-cloud-localterra, indexer up)-g "direct pair"assertNoDuplicateRouteSegmentsin helpers + symbol sequence equality assertionVerification checklist (third parties)
Prerequisites: LocalTerra + deploy (
make setup-cloud-localterraormake deploy-local), indexer (bash scripts/e2e-start-indexer.sh), Playwright Chromium (bash scripts/with-node.sh --cwd frontend-dapp -- ./node_modules/.bin/playwright install chromium).Expected: 2 passed — direct pair (2 UI symbols, 1 wasm hop) and multihop (≥3 UI symbols, ≥2 wasm hops) with matching symbol sequences.
Agent playbook:
skills/AGENTS_FRONTEND_SWAP_ROUTE_DISPLAY.md§ On-chain route alignment (SEC-E07).Security review — MR !963
Commit reviewed:
36e322bf4975596de4645f4804d0abd030aa10d0Scope: SEC-E07 Playwright E2E for swap route display vs on-chain hops —
swap-route-alignment-tx.spec.ts,route-alignment-e2e.ts,txJsonWasmSwapHopsinlcd.ts,playwright.config.tstx glob, docs/skills cross-links.Outcome:
FINDINGS: 0medium+Summary
Reviewed all added/modified code in this diff. Changes are confined to E2E test helpers, a new Playwright tx spec, and documentation — no production frontend, indexer, or contract code paths are touched.
Traced candidate sinks:
resolveAssetSymbol/cw20Symbol)offer_asset/ask_assetfrom wasm swap events in the test's own submitted txlcdRequestGet→ LocalTerra LCD (127.0.0.1:1317/E2E_LCD_PROXY_URL)multihop-hybrid-e2e.ts; fixed LCD base URL;execFileSyncarray args prevent shell injectionfetchTxJson)/cosmos/tx/v1beta1/txs/${encodeURIComponent(h)}parseDisplayedRouteSymbols)textContentofswap-route-summarypage.route)No new dependencies, secrets, authn/authz changes, or production deserialization surfaces introduced.
Inline threads: none (no medium+ findings).
Security review: no medium+ findings on this diff.
mentioned in commit
de59858d9a