Verify #418: hybrid quote E2E helpers and limit-orders docs #947

Merged
PlasticDigits merged 1 commit from verify-issue-418-hybrid-quote-e2e-docs into main 2026-06-26 07:57:08 +00:00
PlasticDigits commented 2026-06-26 06:50:18 +00:00 (Migrated from gitlab.com)

Summary

Verification of GitLab #418 (align hybrid swap quotes with hybrid on-chain execution) on main found the product implementation already complete (directHybridQuote.ts, hybrid defaults on, mismatch UI removed). This MR fixes verification gaps:

  • docs/limit-orders.md — remove stale receiveQuoteIsPoolOnlyWithConfiguredBookLeg invariant; document hybrid quote=execute (#418).
  • e2e/helpers/swap-ui.ts — expand Advanced settings via swap-indexer-route-check test id (React-controlled <details> no longer exposes native open reliably).
  • e2e/hybrid-swap.spec.ts — close Settings after book-leg setup, enable Expert Mode for high-slippage LocalTerra seed, attach pre-submit hybrid quote screenshot.

Verification checklist (#418)

Acceptance item Result Command / evidence
Hybrid-enabled swap/trade quotes include book leg in simulation PASS make test-frontend (1084 tests); directHybridQuote.test.ts; SwapPage.test.tsx #418 case
No pool-only quote / hybrid execution mismatch on default paths PASS No hybridQuoteMismatch / receiveQuoteIsPoolOnlyWithConfiguredBookLeg in frontend; SwapPage.test.tsx asserts no pool-only simulation copy
quoteDisclosure reflects actual sim path PASS TradeMarketOrderPanel.submitSnapshot.test.tsx retail disclosure; quoteDisclosureForIndexerKind unit tests
Indexer + frontend agree on hop-level hybrid split PASS make test-indexer-integration (all route solve hybrid cases); multihop-hybrid-tx.spec.ts quote vs execute
Screenshot: Swap hybrid book leg — receive matches pre-submit summary PASS hybrid-swap.spec.ts attaches hybrid-swap-quote-before-submit; pre-submit summary shows same receive est.
Screenshot: Trade market hybrid routing on PASS TradeMarketOrderPanel default useHybridBook: true; unit test shows retail-friendly disclosure on the market quote card
make test-frontend PASS 184 files / 1084 tests
make test-indexer-integration PASS Serialized integration suite green
e2e/hybrid-swap.spec.ts + fee-discount-quote-245.spec.ts + multihop-hybrid-tx.spec.ts PASS 6/6 on LocalTerra (--project=e2e-tx)
Stale mirror must not over-quote PASS directHybridQuote throws on hybrid sim failure (no silent pool fallback); indexer integration tests
hybridQuoteMismatch removed PASS Grep clean in frontend-dapp/

Follow-ups

  • Extend fee-discount-quote-245.spec.ts with a hybrid-on Trade market quote=execute tx case (currently pool-only for #245 tier parity; multihop hybrid tx covers quote=execute for router path).
## Summary Verification of GitLab #418 (align hybrid swap quotes with hybrid on-chain execution) on `main` found the product implementation already complete (`directHybridQuote.ts`, hybrid defaults on, mismatch UI removed). This MR fixes verification gaps: - **`docs/limit-orders.md`** — remove stale `receiveQuoteIsPoolOnlyWithConfiguredBookLeg` invariant; document hybrid quote=execute (#418). - **`e2e/helpers/swap-ui.ts`** — expand Advanced settings via `swap-indexer-route-check` test id (React-controlled `<details>` no longer exposes native `open` reliably). - **`e2e/hybrid-swap.spec.ts`** — close Settings after book-leg setup, enable Expert Mode for high-slippage LocalTerra seed, attach pre-submit hybrid quote screenshot. ## Verification checklist (#418) | Acceptance item | Result | Command / evidence | |-----------------|--------|-------------------| | Hybrid-enabled swap/trade quotes include book leg in simulation | **PASS** | `make test-frontend` (1084 tests); `directHybridQuote.test.ts`; `SwapPage.test.tsx` #418 case | | No pool-only quote / hybrid execution mismatch on default paths | **PASS** | No `hybridQuoteMismatch` / `receiveQuoteIsPoolOnlyWithConfiguredBookLeg` in frontend; `SwapPage.test.tsx` asserts no pool-only simulation copy | | `quoteDisclosure` reflects actual sim path | **PASS** | `TradeMarketOrderPanel.submitSnapshot.test.tsx` retail disclosure; `quoteDisclosureForIndexerKind` unit tests | | Indexer + frontend agree on hop-level hybrid split | **PASS** | `make test-indexer-integration` (all route solve hybrid cases); `multihop-hybrid-tx.spec.ts` quote vs execute | | Screenshot: Swap hybrid book leg — receive matches pre-submit summary | **PASS** | `hybrid-swap.spec.ts` attaches `hybrid-swap-quote-before-submit`; pre-submit summary shows same receive est. | | Screenshot: Trade market hybrid routing on | **PASS** | `TradeMarketOrderPanel` default `useHybridBook: true`; unit test `shows retail-friendly disclosure on the market quote card` | | `make test-frontend` | **PASS** | 184 files / 1084 tests | | `make test-indexer-integration` | **PASS** | Serialized integration suite green | | `e2e/hybrid-swap.spec.ts` + `fee-discount-quote-245.spec.ts` + `multihop-hybrid-tx.spec.ts` | **PASS** | 6/6 on LocalTerra (`--project=e2e-tx`) | | Stale mirror must not over-quote | **PASS** | `directHybridQuote` throws on hybrid sim failure (no silent pool fallback); indexer integration tests | | `hybridQuoteMismatch` removed | **PASS** | Grep clean in `frontend-dapp/` | ## Follow-ups - Extend `fee-discount-quote-245.spec.ts` with a **hybrid-on** Trade market quote=execute tx case (currently pool-only for #245 tier parity; multihop hybrid tx covers quote=execute for router path).
PlasticDigits commented 2026-06-26 06:52:53 +00:00 (Migrated from gitlab.com)

Security review — MR !947

Commit reviewed: a58948b6cbd6ea74a485f3d369cab2253aa4327d
Scope: docs/limit-orders.md, frontend-dapp/e2e/helpers/swap-ui.ts, frontend-dapp/e2e/hybrid-swap.spec.ts (verification / E2E / docs only; no production frontend, indexer, or contract code in this diff).

Method: Full MR diff review; traced attacker-controlled input to sinks on changed lines; checked prior MR discussions (none).

Outcome: FINDINGS: 0 medium+

Summary

This MR aligns limit-order documentation with #418 (hybrid quote = execute) and hardens Playwright hybrid-swap E2E helpers (Advanced settings expansion via swap-indexer-route-check, expert-mode setup for LocalTerra slippage, pre-submit screenshot attachment). All changes are non-shipping test automation or documentation.

Area Assessment
Injection (SQL/command/template) N/A — no new runtime parsers or query builders
Authn/authz bypass N/A — E2E enables expert mode only in LocalTerra test fixtures with hardcoded confirmation text; not exposed to end users
XSS / DOM injection N/A — Playwright selectors and fixed fill strings; no user-controlled HTML rendering
SSRF / unsafe HTTP N/A — unchanged fetchTxJson / LCD helpers; no new outbound URL construction
Secret leakage / logging N/A — screenshot is a local swap UI capture in CI; no credentials or mnemonics added
Permission boundaries Docs reinforce invariant that hybrid submit must not use pool-only receive quotes (security-positive documentation)

No inline threads opened (no medium+ findings).

Security review: no medium+ findings on this diff.

## Security review — MR !947 **Commit reviewed:** `a58948b6cbd6ea74a485f3d369cab2253aa4327d` **Scope:** `docs/limit-orders.md`, `frontend-dapp/e2e/helpers/swap-ui.ts`, `frontend-dapp/e2e/hybrid-swap.spec.ts` (verification / E2E / docs only; no production frontend, indexer, or contract code in this diff). **Method:** Full MR diff review; traced attacker-controlled input to sinks on changed lines; checked prior MR discussions (none). **Outcome:** `FINDINGS: 0` medium+ ### Summary This MR aligns limit-order documentation with #418 (hybrid quote = execute) and hardens Playwright hybrid-swap E2E helpers (Advanced settings expansion via `swap-indexer-route-check`, expert-mode setup for LocalTerra slippage, pre-submit screenshot attachment). All changes are non-shipping test automation or documentation. | Area | Assessment | |------|------------| | Injection (SQL/command/template) | N/A — no new runtime parsers or query builders | | Authn/authz bypass | N/A — E2E enables expert mode only in LocalTerra test fixtures with hardcoded confirmation text; not exposed to end users | | XSS / DOM injection | N/A — Playwright selectors and fixed fill strings; no user-controlled HTML rendering | | SSRF / unsafe HTTP | N/A — unchanged `fetchTxJson` / LCD helpers; no new outbound URL construction | | Secret leakage / logging | N/A — screenshot is a local swap UI capture in CI; no credentials or mnemonics added | | Permission boundaries | Docs reinforce invariant that hybrid submit must not use pool-only receive quotes (security-positive documentation) | No inline threads opened (no medium+ findings). **Security review: no medium+ findings on this diff.**
PlasticDigits (Migrated from gitlab.com) merged commit 3de656052a into main 2026-06-26 07:57:08 +00:00
PlasticDigits commented 2026-06-26 07:57:09 +00:00 (Migrated from gitlab.com)

mentioned in commit 3de656052a

mentioned in commit 3de656052a3a34d35eb10f86fc02abee291cc761
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-dex-terraclassic!947
No description provided.