OE-6 remainder: client BFS fallback indicator, route-display skill, deploy fee guard (#329) #813

Merged
PlasticDigits merged 3 commits from cursor/gitlab-issue-workflow-e4aa into main 2026-06-05 14:20:56 +00:00
PlasticDigits commented 2026-06-05 13:56:42 +00:00 (Migrated from gitlab.com)

Summary

Implements GitLab #329 (OE-6 follow-up to #302):

  • Client BFS fallback label (Swap): When submit uses client multihop findRoute without indexer router_operations, a brief warning appears under swap-route-summary (data-testid="swap-route-source-client-fallback"). Logic mirrors swapMutation via deriveSwapSubmitRouteSource.
  • Skill cross-links: AGENTS_FRONTEND_SWAP_ROUTE_DISPLAY.md documents trade-market-route-summary / swap-route-summary and client-fallback regression steps.
  • Deploy fee guard (docs): Verified all script create_pair paths attach on-chain fee; noted in AGENTS_QA_DEPLOY_VERIFY.md (#318).

Acceptance checklist

Criterion Verification Result
Swap shows client-fallback label when submit uses client BFS without indexer ops make test-frontend — SwapPage.test.tsx multihop + indexer-down case; swapRouteDisplay.test.ts deriveSwapSubmitRouteSource PASS
No label when indexer path used SwapPage.test.tsx indexer multihop case PASS
AGENTS_FRONTEND_SWAP_ROUTE_DISPLAY.md trade-market testid cross-links Doc diff in MR PASS
All deploy create_pair txs attach fee grep -r create_pair scripts/ — deploy-dex-local.sh uses factory_create_pair; e2e-seed-wrap-pairs.sh attaches PAIR_CREATION_FEE_ULUNA PASS
make test-frontend green Local run (854 tests) PASS

Third-party verification

make test-frontend
grep -r create_pair scripts/

Manual (localnet): stop indexer → Swap multihop CW20→CW20 → confirm swap-route-source-client-fallback under route row.

Blockers

None.

Related: #302


Note

Low Risk
UX disclosure and shared routing helper with tests; swap submit logic is unchanged aside from the new warning label.

Overview
Swap now warns when the transaction will use client-side BFS multihop (findRoute) because indexer router_operations are absent—e.g. indexer down while LCD/router sim still works. deriveSwapSubmitRouteSource mirrors swapMutation precedence (indexer → direct → client BFS → native wrap); when the source is client_bfs, a warning line under swap-route-summary (swap-route-source-client-fallback) shows SWAP_CLIENT_BFS_FALLBACK_COPY (shortest path, not best execution).

Unit coverage adds deriveSwapSubmitRouteSource cases and two SwapPage tests (label on indexer failure + client multihop; no label when indexer multihop ops are present). Tests also mock preflightSwapRouteSpread.

AGENTS_FRONTEND_SWAP_ROUTE_DISPLAY.md documents the fallback invariant, testids, and manual regression steps. AGENTS_QA_DEPLOY_VERIFY.md notes pair-creation fee attachment on deploy create_pair paths (#318)—docs only, no script changes in this diff.

Reviewed by Cursor Bugbot for commit 4567b7d611. Bugbot is set up for automated code reviews on this repo. Configure here.

## Summary Implements [GitLab #329](https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/work_items/329) (OE-6 follow-up to #302): - **Client BFS fallback label (Swap):** When submit uses client multihop `findRoute` without indexer `router_operations`, a brief warning appears under `swap-route-summary` (`data-testid="swap-route-source-client-fallback"`). Logic mirrors `swapMutation` via `deriveSwapSubmitRouteSource`. - **Skill cross-links:** `AGENTS_FRONTEND_SWAP_ROUTE_DISPLAY.md` documents `trade-market-route-summary` / `swap-route-summary` and client-fallback regression steps. - **Deploy fee guard (docs):** Verified all script `create_pair` paths attach on-chain fee; noted in `AGENTS_QA_DEPLOY_VERIFY.md` (#318). ## Acceptance checklist | Criterion | Verification | Result | |-----------|----------------|--------| | Swap shows client-fallback label when submit uses client BFS without indexer ops | `make test-frontend` — `SwapPage.test.tsx` multihop + indexer-down case; `swapRouteDisplay.test.ts` `deriveSwapSubmitRouteSource` | PASS | | No label when indexer path used | `SwapPage.test.tsx` indexer multihop case | PASS | | `AGENTS_FRONTEND_SWAP_ROUTE_DISPLAY.md` trade-market testid cross-links | Doc diff in MR | PASS | | All deploy `create_pair` txs attach fee | `grep -r create_pair scripts/` — `deploy-dex-local.sh` uses `factory_create_pair`; `e2e-seed-wrap-pairs.sh` attaches `PAIR_CREATION_FEE_ULUNA` | PASS | | `make test-frontend` green | Local run (854 tests) | PASS | ## Third-party verification ```bash make test-frontend grep -r create_pair scripts/ ``` Manual (localnet): stop indexer → Swap multihop CW20→CW20 → confirm `swap-route-source-client-fallback` under route row. ## Blockers None. Related: #302 <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > UX disclosure and shared routing helper with tests; swap submit logic is unchanged aside from the new warning label. > > **Overview** > **Swap** now warns when the transaction will use **client-side BFS multihop** (`findRoute`) because indexer `router_operations` are absent—e.g. indexer down while LCD/router sim still works. **`deriveSwapSubmitRouteSource`** mirrors **`swapMutation`** precedence (indexer → direct → client BFS → native wrap); when the source is **`client_bfs`**, a warning line under **`swap-route-summary`** (`swap-route-source-client-fallback`) shows **`SWAP_CLIENT_BFS_FALLBACK_COPY`** (shortest path, not best execution). > > Unit coverage adds **`deriveSwapSubmitRouteSource`** cases and two **`SwapPage`** tests (label on indexer failure + client multihop; no label when indexer multihop ops are present). Tests also mock **`preflightSwapRouteSpread`**. > > **`AGENTS_FRONTEND_SWAP_ROUTE_DISPLAY.md`** documents the fallback invariant, testids, and manual regression steps. **`AGENTS_QA_DEPLOY_VERIFY.md`** notes pair-creation fee attachment on deploy **`create_pair`** paths (#318)—docs only, no script changes in this diff. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 4567b7d611c613e757b0ef01a89022096250f499. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
PlasticDigits commented 2026-06-05 13:56:48 +00:00 (Migrated from gitlab.com)

mentioned in issue #329

mentioned in issue #329
ghost1 commented 2026-06-05 13:56:51 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
ghost1 commented 2026-06-05 13:56:59 +00:00 (Migrated from gitlab.com)

changed the description

changed the description
PlasticDigits commented 2026-06-05 13:59:14 +00:00 (Migrated from gitlab.com)

Security review

Commit reviewed: 4567b7d611c613e757b0ef01a89022096250f499

Scope: MR !813 — client BFS fallback UI label (deriveSwapSubmitRouteSource, SwapPage warning copy), unit/integration tests, and agent skill/docs updates (AGENTS_FRONTEND_SWAP_ROUTE_DISPLAY.md, AGENTS_QA_DEPLOY_VERIFY.md).

Method: Diff-only review with attacker-path tracing on changed frontend paths. Prior MR security threads: none.

Outcome: FINDINGS: 0 medium+

Summary

No medium, high, or critical vulnerabilities identified in this diff.

  • Display-only change: New warning uses the static constant SWAP_CLIENT_BFS_FALLBACK_COPY; React text rendering (no dangerouslySetInnerHTML). No user-controlled or indexer-controlled strings are injected into the new label.
  • No execution-path change: swapMutation submit logic is unchanged. deriveSwapSubmitRouteSource mirrors existing branch precedence (native_wrap → indexer swapOpsRequireRouter → direct → client BFS) for disclosure only; a label/execution mismatch would affect UX, not authorization or transaction construction.
  • No new trust boundary: Indexer/client routing trust model is unchanged; this MR adds transparency when client BFS is used.
  • Docs/tests only elsewhere: Deploy fee notes are documentation; test mocks do not affect production code paths.
  • No secrets, SSRF, injection, authz, dependency, or supply-chain changes in the diff.

Inline threads: none (no findings to anchor).


Automated security review (Cursor Cloud Agent).

## Security review **Commit reviewed:** `4567b7d611c613e757b0ef01a89022096250f499` **Scope:** MR !813 — client BFS fallback UI label (`deriveSwapSubmitRouteSource`, `SwapPage` warning copy), unit/integration tests, and agent skill/docs updates (`AGENTS_FRONTEND_SWAP_ROUTE_DISPLAY.md`, `AGENTS_QA_DEPLOY_VERIFY.md`). **Method:** Diff-only review with attacker-path tracing on changed frontend paths. Prior MR security threads: none. **Outcome:** `FINDINGS: 0` medium+ ### Summary No medium, high, or critical vulnerabilities identified in this diff. - **Display-only change:** New warning uses the static constant `SWAP_CLIENT_BFS_FALLBACK_COPY`; React text rendering (no `dangerouslySetInnerHTML`). No user-controlled or indexer-controlled strings are injected into the new label. - **No execution-path change:** `swapMutation` submit logic is unchanged. `deriveSwapSubmitRouteSource` mirrors existing branch precedence (`native_wrap` → indexer `swapOpsRequireRouter` → direct → client BFS) for disclosure only; a label/execution mismatch would affect UX, not authorization or transaction construction. - **No new trust boundary:** Indexer/client routing trust model is unchanged; this MR adds transparency when client BFS is used. - **Docs/tests only elsewhere:** Deploy fee notes are documentation; test mocks do not affect production code paths. - **No secrets, SSRF, injection, authz, dependency, or supply-chain changes** in the diff. **Inline threads:** none (no findings to anchor). --- *Automated security review (Cursor Cloud Agent).*
PlasticDigits (Migrated from gitlab.com) merged commit 81e7eb4711 into main 2026-06-05 14:20:56 +00:00
PlasticDigits commented 2026-06-05 14:20:57 +00:00 (Migrated from gitlab.com)

mentioned in commit 81e7eb4711

mentioned in commit 81e7eb4711a906d8def795002308fae25e516c6a
PlasticDigits commented 2026-06-08 08:43:13 +00:00 (Migrated from gitlab.com)

mentioned in commit 103f34d433

mentioned in commit 103f34d433269bcc6f06f5b8856bb5eb91eb8187
PlasticDigits commented 2026-06-08 13:42:27 +00:00 (Migrated from gitlab.com)

mentioned in commit ab4488e2ec

mentioned in commit ab4488e2ec721d78398feace8e405a4535d5614e
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!813
No description provided.