bug(trade): restore advanced trading entry instead of redirecting /trade to Swap #1497

Closed
opened 2026-10-14 02:31:04 +00:00 by PlasticDigits · 4 comments
Owner

Problem and why this change is needed

Entering Trade should open the advanced trading workspace (pair selector, chart, order book, and Market/Limit ticket). Currently, bare /trade automatically replaces the route with the Swap entry. The desktop, compact-header, and mobile Trade links all target /trade, so the primary entry to advanced trading sends visitors to a different product surface.

Restore a dependable Trade entry and its navigation/history behavior. Keep the native USTC → configured CL8Y default on Swap. Do not implement this correction by inventing a native factory pair, relabeling cUSTC, weakening execution checks, or changing quote economics.

Bundle the entry fix, its route/default documentation, and regression coverage in this issue. This is a focused follow-up to #1473 and PR #1474; it supersedes the permission to redirect bare /trade in TQ1473-8/P534-5/P562-4. Other quote/default protections remain applicable.

Investigation and current codebase

Source reviewed: efb5fba29d3dc401d0d026d8b683db8054458920, 2026-10-14 UTC, clean tracked source.

  • frontend-dapp/src/App.tsx already maps /trade and /trade/:pairAddr to lazy-loaded TradePage. Swap is /; /swap is an alias. This report is not caused by a missing Trade route registration.
  • components/common/navItems.ts defines Trade as /trade in both primary navigation and the mobile bottom bar; compact desktop navigation uses the same item. AppShellNavLink.tsx navigates to that path.
  • pages/TradePage.tsx:218–275 runs an entry-selection effect after eligible pairs become available. It first honors a unique factory pair from query parameters. Otherwise it builds the Swap token catalog, selects defaultRetailSwapTokenPair(tokens) when location.search is empty, and calls navigate('/?' + search, { replace: true }). Explicit native query links can also use this branch. The bare-entry redirect is confirmed by code and was introduced in commit bf13b04e2 on 2026-10-11.
  • utils/pairCatalogRank.ts contains separate concepts: defaultRetailSwapTokenPair() for native uusd → exact configured CL8Y identity, and the still-existing firstCatalogPairAddress() for a retail-filtered, catalog-sorted genuine factory market.
  • utils/tradePairRoute.ts protects valid deep links, pending resolution, and invalid/unknown notices from default selection. tradeQueryResolve.ts resolves unique genuine factory identities and bounded ticket prefills. Preserve those protections.
  • pages/TradePage.test.tsx explicitly asserts that a fresh bare /trade renders the native-swap-entry and has pathname /. That test encodes the reported defect under the earlier default contract; changing only production code will leave the contract inconsistent.
  • skills/AGENTS_TRADING_QUOTE_OUTCOMES.md TQ1473-8, docs/frontend.md P534-5/P562-4 and the #1473 section, and docs/qa/issue-1473/README.md AC4 currently permit or require the bare Trade redirect. Other Trade documentation still describes factory auto-selection. Reconcile these statements in the fix.

Read-only production evidence

On 2026-10-14 UTC, a fresh disconnected desktop Chromium session requested https://dex.cl8y.com/trade and settled at https://dex.cl8y.com/?from=uusd&to=terra16wtml2q66g82fdkx66tap0qjkahqwp4lwq3ngtygacg5q0kzycgqvhpax3. Two Trade links still targeted /trade. This confirms the redirect even before acknowledging the first-visit risk dialog; it does not claim the ticket's execution readiness.

The /trade document returned HTTP 200, rather than an HTTP redirect. Its served entry asset was /assets/index-DpQNfH3h.js; the served Trade asset was /assets/TradePage-CKwev5eT.js, SHA-256 70fe3aced7796a3e1c0bc704699ea337bf98bddfee83cf1954266a4f2822c22d. That asset contains the same empty-search default and replace:true navigation to /?.... Served-asset evidence establishes the deployed branch; it does not independently attest the entire deployment's source revision.

An initial browser navigation waiting for domcontentloaded timed out. A separate bounded retry waiting for document commit completed and reproduced the redirect. Keep these observations distinct; the timeout is not the inferred cause of the redirect.

Relevant files

Paths below are relative to the repository root:

  • frontend-dapp/src/pages/TradePage.tsx, TradePage.test.tsx, and SwapPage.tsx.
  • frontend-dapp/src/utils/pairCatalogRank.ts, __tests__/pairCatalogRank.test.ts, __tests__/pairCatalogRank.issue562.test.ts.
  • frontend-dapp/src/utils/tradePairRoute.ts, tradeQueryResolve.ts, and their tests under utils/__tests__/.
  • frontend-dapp/src/App.tsx; components/common/navItems.ts, AppShellNavLink.tsx, Layout.tsx, LazyRoute.tsx, ErrorBoundary.tsx; relevant tests under components/common/__tests__/.
  • frontend-dapp/e2e/trade-page-initial-load.spec.ts, trade-page-responsive.spec.ts, trade-indexer-outage.spec.ts; add a dedicated Trade-entry/navigation regression suite if useful.
  • skills/AGENTS_TRADING_QUOTE_OUTCOMES.md, skills/AGENTS_FRONTEND_SWAP_URL_SYNC.md, docs/frontend.md, docs/qa/issue-1473/README.md, AGENTS.md, scripts/verify-issue-1473.sh, scripts/qa/browser-trading-quotes-1473.cjs, scripts/qa/verify-issue-713.sh, and Makefile.
  1. Separate the bare Trade entry policy from Swap's funding/default policy. Remove the automatic bare /trade → Swap branch. Prefer reusing firstCatalogPairAddress() with existing retail filtering and deep-link guards to select a deterministic genuine factory market and replace only to /trade/<pairAddr>. If no eligible market exists, retain the Trade heading and an actionable pair selector/empty state at /trade.
  2. Preserve explicit /trade/:pairAddr identity and uniquely resolvable factory query links, including amount/side prefills. Never overwrite a deliberate pair selection or a link while its catalog is still resolving. Invalid, unknown, ambiguous, or unresolved links need truthful Trade-local states without a surprise fallback into Swap or an unrelated market.
  3. Preserve the established explicit native-query compatibility when no unique factory market represents its real funding; scope it to validated explicit funding intent. Bare Trade navigation must never invoke that compatibility path. Do not fabricate an order book or promise native limit-order support. Any additional Swap action on the Trade entry must be an explicit user action with accurate labels.
  4. Replace the regression test that expects the bare redirect, add real router/navigation tests, and update the conflicting documentation and agent instructions together. Update the controlled browser helper's /trade default assertions to check advanced trading rather than expecting Swap inputs; keep its Swap quote matrix intact. Avoid broad router, backend, economic-ranking, or contract rewrites.

Constraints and guardrails

  • Swap continues to default to native uusd → exact configured CL8Y. Genuine native USTC and cUSTC remain distinct execution identities; display symbols do not admit assets or select a default.
  • Use eligible genuine factory markets and existing production gem/retail filters. Listing-only/virtual market IDs cannot become economic pairs. Missing or ambiguous identities fail safely.
  • Preserve original address validation, pair membership, pending/unknown/invalid notice handling, canonical query construction, bounded amount parsing, and bid/ask orientation. Navigation/prefill never submits, connects a wallet, requests signing, or broadcasts.
  • Preserve quote expiry, exact amount/actor/generation binding, authoritative rejection handling, supported tax/gross debit, positive receive floors, protections, launch guards, and offline signing budgets. This issue changes entry navigation, not those safeguards.
  • Do not add quote-triggered chain polling, bypass legal/wallet gates, weaken CSP, or add external redirect destinations. Keep existing lazy-chunk recovery bounded and on the current same-origin route.
  • Public evidence must omit reporter identity, conversations, wallet/session identifiers, credentials, private endpoints, and operator details. Use synthetic fixtures and public contract identities only.
  • Unavailable workflow checks must not prevent implementing or filing this fix. Record unavailable scope explicitly; executed failures remain failures and cannot establish acceptance.

Acceptance criteria

  • AC1: Direct visit, bookmark, reload, and a fresh Trade click keep the visitor in advanced trading: /trade or /trade/<genuine eligible pair>, never an automatic Swap redirect.
  • AC2: Desktop primary navigation, compact-header More, and mobile bottom navigation all expose the same working Trade entry. Advanced controls render for a resolved market; no eligible-market state remains usable and truthful.
  • AC3: Valid deep links and unique factory from/to links preserve pair identity, ticket direction, and bounded amount/side prefills. Pending, invalid, unknown, ambiguous, and disconnected states cannot select a surprise market or bounce into Swap.
  • AC4: Shuffled/late/refreshed catalogs and rapid navigation cannot override a deliberate selection. Back/Forward and repeated Trade clicks behave predictably without redirect loops or history spam.
  • AC5: Swap's native USTC → configured CL8Y default and validated explicit native-link compatibility continue to work, with actual funding identities and no automatic order/signing side effects.
  • AC6: First-visit risk acknowledgement, disconnected/connected wallets, indexer outage/recovery, and offline/stale chunk recovery preserve the Trade destination. All execution/quote controls remain enforced.
  • AC7: Tests, docs, playbooks, and QA checklists agree on the corrected Trade entry contract. The deployed entry and deep links pass browser checks on desktop and phone with artifact provenance recorded.

Test plan: functional paths

  1. Unit/RTL with a real memory router: bare /trade, /trade/, valid pair routes, valid unique query links in both directions, prefills with bid/ask and exact-input/output intent, explicit native queries, and malformed/unknown/ambiguous queries. Assert final pathname and rendered advanced workspace together, not just a skeleton or heading.
  2. Catalog cases: empty/loading/error/recovery; missing configured defaults; gem-only catalogs; native/wrapped identities; duplicate/spoofed entries; changed ordering; genuine multiple markets. Exercise default selection before/after asynchronous catalog arrival and preserve user selection through refresh.
  3. Browser cases at desktop, compact tablet, and phone widths: open Trade from Swap/Pool/Charts/Limits; direct URL and new-tab/modifier click; refresh selected Trade market; Back/Forward; repeated Trade clicks; fast pair switches. Confirm chart/book/ticket access and correct Market/Limit tabs. Cover first-visit acknowledgement and connected/disconnected state using isolated fixtures.
  4. Failure cases: indexer/API timeout and recovery, empty discovery, missing/stale pair data, offline lazy import, stale asset 404 with bounded one-shot reload, and repeated load failure with retry. Retain Trade-local loading/error/empty states and no automatic Swap navigation.
  5. Run make verify-issue-713, make verify-issue-1473, focused navigation/lazy/chunk tests, frontend type/build/lint checks appropriate to changed files, and affected Trade browser suites. Use owned disposable DB/LocalTerra fixtures for any funded checks; navigation verification itself requires no real wallet or transaction.

Test plan: attack, hack, and abuse vectors

  • Supply invalid/checksum-bad Terra addresses, encoded separators, overlong path/query values, javascript:/data:/external/protocol-relative destinations, repeated query keys, HTML/script payloads, unsupported side/exact-field values, negative/huge/precision-invalid amounts, and forged router state. Expect bounded parsing, escaped display, same-origin canonical navigation, and no unintended RPC/signing.
  • Spoof token symbols as CL8Y/USTC, duplicate configured identities, relabel cUSTC, insert production-hidden gems or listing-only IDs, and use showGems/mode/protection flags. Preserve identity/retail filtering and all execution restrictions.
  • Delay/reorder catalog responses while selecting a different pair, switching routes, changing query intent, or hitting Back/Forward. Stale completions cannot redirect, restore obsolete amounts/sides, leak previous account context, or submit anything.
  • Rapidly repeat Trade clicks/pair changes, flood malformed routes, and exercise offline/stale-chunk retries. Assert bounded requests/retries/cache behavior, no redirect/reload loop, no history amplification, and no unbounded memory/listener growth.
  • Spy on wallet connect, signing, broadcast, and transaction mutations during every navigation/prefill case: expect zero automatic calls. Use stale/expired/unsupported quote and funding fixtures to prove entry restoration cannot authorize signing or bypass positive floors/amount/actor/guard checks.

Verification criteria and investigation results

Record exact final source SHA, UTC, dirty-patch status, test commands, first/retest results, and explicit unavailable scopes. Publish only sanitized findings. Tests of the old redirect passing are reproduction evidence, not acceptance of the corrected behavior. Keep pre-existing failures visible and resolve their cause or document their separate scope without weakening assertions.

Investigation verification on the reviewed source:

  • make verify-issue-713: executable source checks passed (8 verifier steps; 137 tests passed across the selected suites). Its LocalTerra browser step was unavailable. That script labels the skipped step as PASS internally; it is recorded here as unavailable, not deployed/funded acceptance.
  • Focused AppShellNavLink, LazyRoute, SwapAliasRedirect, and chunkLoadError tests: 4 files, 27 tests passed.
  • make verify-issue-1473: first and retest indexer library checks each passed 824 tests, with 1 ignored. Shared safety harness (16 tests) and browser-helper DOM/verdict checks (11 tests) passed on both runs. The frontend suite passed 480 tests but failed 2 pairCatalogRank.issue562.test.ts default assertions on both runs: they expected native USTC/configured CL8Y and received undefined. These are baseline failures, not evidence that the proposed fix is accepted; a separate rerun with the fixture's public VITE_CL8Y_TOKEN_ADDRESS explicitly pinned passed all 16 tests in that file, confirming configuration/fixture isolation affects those expectations. Retain the missing-identity fail-closed behavior and make test inputs explicit rather than weakening it. Disposable socket checks could not run because the dedicated QA database capability was absent. The verifier records that unavailable prerequisite as a failed step; do not relabel its aggregate as PASS. Its broad controlled quote-economics browser matrix was stopped outside the entry-navigation investigation scope. The incomplete receipt contains 1,335 scenarios and 9 failures, including interruption-related browser closure; it is not a full-matrix or latency acceptance pass. The independently completed production entry reproduction above is the live evidence for this defect. Final aggregate: 12 PASS / 5 FAIL / 2 SKIP, overall FAIL. Frontend types, Rust formatting, shell syntax, invariant crosslinks, whitespace, and stable-source checks passed. The failures comprise both database-prerequisite steps, both frontend runs, and the incomplete controlled browser step. The public-identity-pinned catalog rerun is a separate successful diagnostic, not a rewrite of these verdicts. Live post-fix acceptance must separately identify served frontend artifacts; backend health and issue closure do not prove frontend deployment. No conversations or user identifiers are included in this issue.
## Problem and why this change is needed Entering **Trade** should open the advanced trading workspace (pair selector, chart, order book, and Market/Limit ticket). Currently, bare `/trade` automatically replaces the route with the Swap entry. The desktop, compact-header, and mobile Trade links all target `/trade`, so the primary entry to advanced trading sends visitors to a different product surface. Restore a dependable Trade entry and its navigation/history behavior. Keep the native USTC → configured CL8Y default on Swap. Do not implement this correction by inventing a native factory pair, relabeling cUSTC, weakening execution checks, or changing quote economics. Bundle the entry fix, its route/default documentation, and regression coverage in this issue. This is a focused follow-up to [#1473](https://git.cl8y.com/code/cl8y-dex-terraclassic/issues/1473) and [PR #1474](https://git.cl8y.com/code/cl8y-dex-terraclassic/pulls/1474); it supersedes the permission to redirect **bare** `/trade` in TQ1473-8/P534-5/P562-4. Other quote/default protections remain applicable. ## Investigation and current codebase Source reviewed: [`efb5fba29d3dc401d0d026d8b683db8054458920`](https://git.cl8y.com/code/cl8y-dex-terraclassic/commit/efb5fba29d3dc401d0d026d8b683db8054458920), 2026-10-14 UTC, clean tracked source. - `frontend-dapp/src/App.tsx` already maps `/trade` and `/trade/:pairAddr` to lazy-loaded `TradePage`. Swap is `/`; `/swap` is an alias. This report is not caused by a missing Trade route registration. - `components/common/navItems.ts` defines Trade as `/trade` in both primary navigation and the mobile bottom bar; compact desktop navigation uses the same item. `AppShellNavLink.tsx` navigates to that path. - `pages/TradePage.tsx:218–275` runs an entry-selection effect after eligible pairs become available. It first honors a unique factory pair from query parameters. Otherwise it builds the Swap token catalog, selects `defaultRetailSwapTokenPair(tokens)` when `location.search` is empty, and calls `navigate('/?' + search, { replace: true })`. Explicit native query links can also use this branch. The bare-entry redirect is confirmed by code and was introduced in commit `bf13b04e2` on 2026-10-11. - `utils/pairCatalogRank.ts` contains separate concepts: `defaultRetailSwapTokenPair()` for native `uusd` → exact configured CL8Y identity, and the still-existing `firstCatalogPairAddress()` for a retail-filtered, catalog-sorted genuine factory market. - `utils/tradePairRoute.ts` protects valid deep links, pending resolution, and invalid/unknown notices from default selection. `tradeQueryResolve.ts` resolves unique genuine factory identities and bounded ticket prefills. Preserve those protections. - `pages/TradePage.test.tsx` explicitly asserts that a fresh bare `/trade` renders the `native-swap-entry` and has pathname `/`. That test encodes the reported defect under the earlier default contract; changing only production code will leave the contract inconsistent. - `skills/AGENTS_TRADING_QUOTE_OUTCOMES.md` TQ1473-8, `docs/frontend.md` P534-5/P562-4 and the #1473 section, and `docs/qa/issue-1473/README.md` AC4 currently permit or require the bare Trade redirect. Other Trade documentation still describes factory auto-selection. Reconcile these statements in the fix. ### Read-only production evidence On 2026-10-14 UTC, a fresh disconnected desktop Chromium session requested `https://dex.cl8y.com/trade` and settled at `https://dex.cl8y.com/?from=uusd&to=terra16wtml2q66g82fdkx66tap0qjkahqwp4lwq3ngtygacg5q0kzycgqvhpax3`. Two Trade links still targeted `/trade`. This confirms the redirect even before acknowledging the first-visit risk dialog; it does not claim the ticket's execution readiness. The `/trade` document returned HTTP 200, rather than an HTTP redirect. Its served entry asset was `/assets/index-DpQNfH3h.js`; the served Trade asset was `/assets/TradePage-CKwev5eT.js`, SHA-256 `70fe3aced7796a3e1c0bc704699ea337bf98bddfee83cf1954266a4f2822c22d`. That asset contains the same empty-search default and `replace:true` navigation to `/?...`. Served-asset evidence establishes the deployed branch; it does not independently attest the entire deployment's source revision. An initial browser navigation waiting for `domcontentloaded` timed out. A separate bounded retry waiting for document commit completed and reproduced the redirect. Keep these observations distinct; the timeout is not the inferred cause of the redirect. ## Relevant files Paths below are relative to the repository root: - `frontend-dapp/src/pages/TradePage.tsx`, `TradePage.test.tsx`, and `SwapPage.tsx`. - `frontend-dapp/src/utils/pairCatalogRank.ts`, `__tests__/pairCatalogRank.test.ts`, `__tests__/pairCatalogRank.issue562.test.ts`. - `frontend-dapp/src/utils/tradePairRoute.ts`, `tradeQueryResolve.ts`, and their tests under `utils/__tests__/`. - `frontend-dapp/src/App.tsx`; `components/common/navItems.ts`, `AppShellNavLink.tsx`, `Layout.tsx`, `LazyRoute.tsx`, `ErrorBoundary.tsx`; relevant tests under `components/common/__tests__/`. - `frontend-dapp/e2e/trade-page-initial-load.spec.ts`, `trade-page-responsive.spec.ts`, `trade-indexer-outage.spec.ts`; add a dedicated Trade-entry/navigation regression suite if useful. - `skills/AGENTS_TRADING_QUOTE_OUTCOMES.md`, `skills/AGENTS_FRONTEND_SWAP_URL_SYNC.md`, `docs/frontend.md`, `docs/qa/issue-1473/README.md`, `AGENTS.md`, `scripts/verify-issue-1473.sh`, `scripts/qa/browser-trading-quotes-1473.cjs`, `scripts/qa/verify-issue-713.sh`, and `Makefile`. ## Recommended direction 1. Separate the bare Trade entry policy from Swap's funding/default policy. Remove the automatic bare `/trade` → Swap branch. Prefer reusing `firstCatalogPairAddress()` with existing retail filtering and deep-link guards to select a deterministic genuine factory market and replace only to `/trade/<pairAddr>`. If no eligible market exists, retain the Trade heading and an actionable pair selector/empty state at `/trade`. 2. Preserve explicit `/trade/:pairAddr` identity and uniquely resolvable factory query links, including amount/side prefills. Never overwrite a deliberate pair selection or a link while its catalog is still resolving. Invalid, unknown, ambiguous, or unresolved links need truthful Trade-local states without a surprise fallback into Swap or an unrelated market. 3. Preserve the established explicit native-query compatibility when no unique factory market represents its real funding; scope it to validated explicit funding intent. Bare Trade navigation must never invoke that compatibility path. Do not fabricate an order book or promise native limit-order support. Any additional Swap action on the Trade entry must be an explicit user action with accurate labels. 4. Replace the regression test that expects the bare redirect, add real router/navigation tests, and update the conflicting documentation and agent instructions together. Update the controlled browser helper's `/trade` default assertions to check advanced trading rather than expecting Swap inputs; keep its Swap quote matrix intact. Avoid broad router, backend, economic-ranking, or contract rewrites. ## Constraints and guardrails - Swap continues to default to native `uusd` → exact configured CL8Y. Genuine native USTC and cUSTC remain distinct execution identities; display symbols do not admit assets or select a default. - Use eligible genuine factory markets and existing production gem/retail filters. Listing-only/virtual market IDs cannot become economic pairs. Missing or ambiguous identities fail safely. - Preserve original address validation, pair membership, pending/unknown/invalid notice handling, canonical query construction, bounded amount parsing, and bid/ask orientation. Navigation/prefill never submits, connects a wallet, requests signing, or broadcasts. - Preserve quote expiry, exact amount/actor/generation binding, authoritative rejection handling, supported tax/gross debit, positive receive floors, protections, launch guards, and offline signing budgets. This issue changes entry navigation, not those safeguards. - Do not add quote-triggered chain polling, bypass legal/wallet gates, weaken CSP, or add external redirect destinations. Keep existing lazy-chunk recovery bounded and on the current same-origin route. - Public evidence must omit reporter identity, conversations, wallet/session identifiers, credentials, private endpoints, and operator details. Use synthetic fixtures and public contract identities only. - Unavailable workflow checks must not prevent implementing or filing this fix. Record unavailable scope explicitly; executed failures remain failures and cannot establish acceptance. ## Acceptance criteria - [ ] AC1: Direct visit, bookmark, reload, and a fresh Trade click keep the visitor in advanced trading: `/trade` or `/trade/<genuine eligible pair>`, never an automatic Swap redirect. - [ ] AC2: Desktop primary navigation, compact-header More, and mobile bottom navigation all expose the same working Trade entry. Advanced controls render for a resolved market; no eligible-market state remains usable and truthful. - [ ] AC3: Valid deep links and unique factory `from`/`to` links preserve pair identity, ticket direction, and bounded amount/side prefills. Pending, invalid, unknown, ambiguous, and disconnected states cannot select a surprise market or bounce into Swap. - [ ] AC4: Shuffled/late/refreshed catalogs and rapid navigation cannot override a deliberate selection. Back/Forward and repeated Trade clicks behave predictably without redirect loops or history spam. - [ ] AC5: Swap's native USTC → configured CL8Y default and validated explicit native-link compatibility continue to work, with actual funding identities and no automatic order/signing side effects. - [ ] AC6: First-visit risk acknowledgement, disconnected/connected wallets, indexer outage/recovery, and offline/stale chunk recovery preserve the Trade destination. All execution/quote controls remain enforced. - [ ] AC7: Tests, docs, playbooks, and QA checklists agree on the corrected Trade entry contract. The deployed entry and deep links pass browser checks on desktop and phone with artifact provenance recorded. ## Test plan: functional paths 1. Unit/RTL with a real memory router: bare `/trade`, `/trade/`, valid pair routes, valid unique query links in both directions, prefills with bid/ask and exact-input/output intent, explicit native queries, and malformed/unknown/ambiguous queries. Assert final pathname and rendered advanced workspace together, not just a skeleton or heading. 2. Catalog cases: empty/loading/error/recovery; missing configured defaults; gem-only catalogs; native/wrapped identities; duplicate/spoofed entries; changed ordering; genuine multiple markets. Exercise default selection before/after asynchronous catalog arrival and preserve user selection through refresh. 3. Browser cases at desktop, compact tablet, and phone widths: open Trade from Swap/Pool/Charts/Limits; direct URL and new-tab/modifier click; refresh selected Trade market; Back/Forward; repeated Trade clicks; fast pair switches. Confirm chart/book/ticket access and correct Market/Limit tabs. Cover first-visit acknowledgement and connected/disconnected state using isolated fixtures. 4. Failure cases: indexer/API timeout and recovery, empty discovery, missing/stale pair data, offline lazy import, stale asset 404 with bounded one-shot reload, and repeated load failure with retry. Retain Trade-local loading/error/empty states and no automatic Swap navigation. 5. Run `make verify-issue-713`, `make verify-issue-1473`, focused navigation/lazy/chunk tests, frontend type/build/lint checks appropriate to changed files, and affected Trade browser suites. Use owned disposable DB/LocalTerra fixtures for any funded checks; navigation verification itself requires no real wallet or transaction. ## Test plan: attack, hack, and abuse vectors - Supply invalid/checksum-bad Terra addresses, encoded separators, overlong path/query values, `javascript:`/`data:`/external/protocol-relative destinations, repeated query keys, HTML/script payloads, unsupported side/exact-field values, negative/huge/precision-invalid amounts, and forged router state. Expect bounded parsing, escaped display, same-origin canonical navigation, and no unintended RPC/signing. - Spoof token symbols as CL8Y/USTC, duplicate configured identities, relabel cUSTC, insert production-hidden gems or listing-only IDs, and use `showGems`/mode/protection flags. Preserve identity/retail filtering and all execution restrictions. - Delay/reorder catalog responses while selecting a different pair, switching routes, changing query intent, or hitting Back/Forward. Stale completions cannot redirect, restore obsolete amounts/sides, leak previous account context, or submit anything. - Rapidly repeat Trade clicks/pair changes, flood malformed routes, and exercise offline/stale-chunk retries. Assert bounded requests/retries/cache behavior, no redirect/reload loop, no history amplification, and no unbounded memory/listener growth. - Spy on wallet connect, signing, broadcast, and transaction mutations during every navigation/prefill case: expect zero automatic calls. Use stale/expired/unsupported quote and funding fixtures to prove entry restoration cannot authorize signing or bypass positive floors/amount/actor/guard checks. ## Verification criteria and investigation results Record exact final source SHA, UTC, dirty-patch status, test commands, first/retest results, and explicit unavailable scopes. Publish only sanitized findings. Tests of the old redirect passing are reproduction evidence, not acceptance of the corrected behavior. Keep pre-existing failures visible and resolve their cause or document their separate scope without weakening assertions. Investigation verification on the reviewed source: - `make verify-issue-713`: executable source checks passed (8 verifier steps; 137 tests passed across the selected suites). Its LocalTerra browser step was unavailable. That script labels the skipped step as PASS internally; it is recorded here as unavailable, not deployed/funded acceptance. - Focused `AppShellNavLink`, `LazyRoute`, `SwapAliasRedirect`, and `chunkLoadError` tests: 4 files, 27 tests passed. - `make verify-issue-1473`: first and retest indexer library checks each passed 824 tests, with 1 ignored. Shared safety harness (16 tests) and browser-helper DOM/verdict checks (11 tests) passed on both runs. The frontend suite passed 480 tests but failed 2 `pairCatalogRank.issue562.test.ts` default assertions on both runs: they expected native USTC/configured CL8Y and received `undefined`. These are baseline failures, not evidence that the proposed fix is accepted; a separate rerun with the fixture's public `VITE_CL8Y_TOKEN_ADDRESS` explicitly pinned passed all 16 tests in that file, confirming configuration/fixture isolation affects those expectations. Retain the missing-identity fail-closed behavior and make test inputs explicit rather than weakening it. Disposable socket checks could not run because the dedicated QA database capability was absent. The verifier records that unavailable prerequisite as a failed step; do not relabel its aggregate as PASS. Its broad controlled quote-economics browser matrix was stopped outside the entry-navigation investigation scope. The incomplete receipt contains 1,335 scenarios and 9 failures, including interruption-related browser closure; it is not a full-matrix or latency acceptance pass. The independently completed production entry reproduction above is the live evidence for this defect. Final aggregate: **12 PASS / 5 FAIL / 2 SKIP, overall FAIL**. Frontend types, Rust formatting, shell syntax, invariant crosslinks, whitespace, and stable-source checks passed. The failures comprise both database-prerequisite steps, both frontend runs, and the incomplete controlled browser step. The public-identity-pinned catalog rerun is a separate successful diagnostic, not a rewrite of these verdicts. Live post-fix acceptance must separately identify served frontend artifacts; backend health and issue closure do not prove frontend deployment. No conversations or user identifiers are included in this issue.
Author
Owner

Implementation merged in PR #1501, main revision 9dfa373f989ca9684c00ce40bc0525265243dfe9 (2026-10-14 UTC). Woodpecker PR pipeline #456 passed, including secrets, contracts, full frontend, indexer library/Postgres and required functional checks.

Completed source/local scope:

  • Restore genuine advanced Trade entry and stable active-navigation history.
  • One stable Swap summary/status and DETAILS disclosure, positive anonymous minimum and one separate LUNC network fee.
  • Original-cohort unexpired retention, original expiry/recovery and missing-versus-unsupported producer classification.
  • Independent signed fee-free pool/book metrics, original maker-term binding and separate fees/costs/fair-reference safeguards.
  • Relevant source verifiers, meaningful first/retest fixtures, 4,250 complete controlled desktop/phone rows (zero failures/provider RPC), funded pool/native/tax/invoice checks, docs and agent invariants.
  • Exact deployed artifact/live sustained acceptance: Coolify deployment and final probes are now running.
  • Complete physical-wallet/production settlement and unmeasured funded/shape scopes: remain separate and unclaimed.

Individual acceptance criteria are not closed by this shared source summary. Evidence, retained failures and remaining scope and the individual QA checklists are included in main. The initial documentation/owned-fixture failures were corrected and retested; prior failures remain recorded. Final issue-specific live results will follow; this issue remains open until all body/comment criteria pass.

Implementation merged in [PR #1501](https://git.cl8y.com/code/cl8y-dex-terraclassic/pulls/1501), main revision `9dfa373f989ca9684c00ce40bc0525265243dfe9` (2026-10-14 UTC). Woodpecker PR pipeline #456 passed, including secrets, contracts, full frontend, indexer library/Postgres and required functional checks. Completed source/local scope: - [x] Restore genuine advanced Trade entry and stable active-navigation history. - [x] One stable Swap summary/status and DETAILS disclosure, positive anonymous minimum and one separate LUNC network fee. - [x] Original-cohort unexpired retention, original expiry/recovery and missing-versus-unsupported producer classification. - [x] Independent signed fee-free pool/book metrics, original maker-term binding and separate fees/costs/fair-reference safeguards. - [x] Relevant source verifiers, meaningful first/retest fixtures, 4,250 complete controlled desktop/phone rows (zero failures/provider RPC), funded pool/native/tax/invoice checks, docs and agent invariants. - [ ] Exact deployed artifact/live sustained acceptance: Coolify deployment and final probes are now running. - [ ] Complete physical-wallet/production settlement and unmeasured funded/shape scopes: remain separate and unclaimed. Individual acceptance criteria are not closed by this shared source summary. [Evidence, retained failures and remaining scope](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/branch/main/docs/qa/trading-1497-1500/RESULTS.md) and the individual QA checklists are included in main. The initial documentation/owned-fixture failures were corrected and retested; prior failures remain recorded. Final issue-specific live results will follow; this issue remains open until all body/comment criteria pass.
Author
Owner

Producer follow-up PR #1502 is merged into main 14055610ebe86fd3640ff85e8adc15e16785c6dd; required CI #458 passed all eight steps. Main and the feature worktree are synchronized.

  • Independent scheduled tax/router/denom observations preserve completed fields when an unrelated read times out. Mapper/treasury capabilities use the same bounded rule.
  • Original two-second phases, two permits/four RPS, eight-second outer deadline, original freshness, offline requests and fail-closed signing remain enforced.
  • Thirteen producer tests and the real LCD shared-budget check pass first/retest; broader lifecycle/attribution/provider source/socket checks pass available scopes.
  • The exact controlled-browser step passes fresh first/retest (40 samples each; maxima 49.9/48.0ms below unchanged 250ms). The earlier full #1452 command remains recorded as FAIL for its isolated 401.2ms transport/scheduling sample; it was not relabeled or hidden.
  • New deployment/live first/retest: Coolify deployment is in progress. The earlier 9dfa live latency and unresolved observer/readiness failures remain recorded separately.
  • Complete physical-wallet, contract/oracle and all-family acceptance: remaining scope stays unchecked.

See release results and invariant links. This is source/CI completion, not a claim that every issue criterion passed. Final issue-specific live results will follow; the issues remain open.

Producer follow-up [PR #1502](https://git.cl8y.com/code/cl8y-dex-terraclassic/pulls/1502) is merged into main `14055610ebe86fd3640ff85e8adc15e16785c6dd`; required [CI #458](https://ci.cl8y.com/repos/7/pipeline/458/1) passed all eight steps. Main and the feature worktree are synchronized. - [x] Independent scheduled tax/router/denom observations preserve completed fields when an unrelated read times out. Mapper/treasury capabilities use the same bounded rule. - [x] Original two-second phases, two permits/four RPS, eight-second outer deadline, original freshness, offline requests and fail-closed signing remain enforced. - [x] Thirteen producer tests and the real LCD shared-budget check pass first/retest; broader lifecycle/attribution/provider source/socket checks pass available scopes. - [x] The exact controlled-browser step passes fresh first/retest (40 samples each; maxima 49.9/48.0ms below unchanged 250ms). The earlier full #1452 command remains recorded as FAIL for its isolated 401.2ms transport/scheduling sample; it was not relabeled or hidden. - [ ] New deployment/live first/retest: Coolify deployment is in progress. The earlier 9dfa live latency and unresolved observer/readiness failures remain recorded separately. - [ ] Complete physical-wallet, contract/oracle and all-family acceptance: remaining scope stays unchecked. See [release results and invariant links](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/branch/main/docs/qa/trading-1497-1500/RESULTS.md). This is source/CI completion, not a claim that every issue criterion passed. Final issue-specific live results will follow; the issues remain open.
Author
Owner

Final QA/evidence PR #1503 merged into main 4bd3e8d31485613d6c3ddca62abbac1a1f6e6469; required CI #460 passed all eight steps. Main and the worktree are clean and synchronized with origin/main. Application runtime inputs did not change in this QA-only merge; the actual deployed revision remains the attested 14055610… below.

Fixes merged in PR #1501 and PR #1502. Both Coolify applications finished at independently attested release 14055610ebe86fd3640ff85e8adc15e16785c6dd; required CI pipelines 456/458 each passed all eight steps. Later helper/evidence changes do not claim a newer application deployment.

  • AC1: Direct entry, bookmark/reload and Trade clicks stay in genuine advanced Trade.
  • AC7: Tests/docs/playbooks agree; exact deployed root/Trade hashes recorded. Live first/retest each pass 15/15 across desktop, compact-header and phone.
  • Source regression scope for identity/prefill, defaults, empty discovery and stable selection/history passes.
  • Complete AC2–AC6 browser corpus, connected-wallet state and actual outage acceptance. Navigation passes are scoped; full empty/prefill/catalog/wallet scenarios are not claimed live.
  • Recovery acceptance: injected outage/offline/stale-chunk first run remains 8/10 FAIL (two unclassified desktop readiness waits), unchanged retest 10/10 PASS. Earlier helper failures are retained; synthetic consumer recovery does not prove a production provider outage.

No wallet connection/sign/broadcast was performed by these navigation checks.

Results, retained failed runs and invariant links. All issue bodies and current comments were reviewed. No complete acceptance claim: this issue stays open for the unchecked scope.

Final QA/evidence [PR #1503](https://git.cl8y.com/code/cl8y-dex-terraclassic/pulls/1503) merged into main `4bd3e8d31485613d6c3ddca62abbac1a1f6e6469`; [required CI #460](https://ci.cl8y.com/repos/7/pipeline/460/1) passed all eight steps. Main and the worktree are clean and synchronized with origin/main. Application runtime inputs did not change in this QA-only merge; the actual deployed revision remains the attested `14055610…` below. Fixes merged in [PR #1501](https://git.cl8y.com/code/cl8y-dex-terraclassic/pulls/1501) and [PR #1502](https://git.cl8y.com/code/cl8y-dex-terraclassic/pulls/1502). Both Coolify applications finished at independently attested release `14055610ebe86fd3640ff85e8adc15e16785c6dd`; required CI pipelines 456/458 each passed all eight steps. Later helper/evidence changes do not claim a newer application deployment. - [x] AC1: Direct entry, bookmark/reload and Trade clicks stay in genuine advanced Trade. - [x] AC7: Tests/docs/playbooks agree; exact deployed root/Trade hashes recorded. Live first/retest each pass 15/15 across desktop, compact-header and phone. - [x] Source regression scope for identity/prefill, defaults, empty discovery and stable selection/history passes. - [ ] Complete AC2–AC6 browser corpus, connected-wallet state and actual outage acceptance. Navigation passes are scoped; full empty/prefill/catalog/wallet scenarios are not claimed live. - [ ] Recovery acceptance: injected outage/offline/stale-chunk first run remains 8/10 FAIL (two unclassified desktop readiness waits), unchanged retest 10/10 PASS. Earlier helper failures are retained; synthetic consumer recovery does not prove a production provider outage. No wallet connection/sign/broadcast was performed by these navigation checks. [Results, retained failed runs and invariant links](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/branch/main/docs/qa/trading-1497-1500/RESULTS.md). All issue bodies and current comments were reviewed. No complete acceptance claim: this issue stays open for the unchecked scope.
Author
Owner

Closed at the user's request as part of consolidating issues #1449–#1500.

Advanced Trade entry and stable selection/history are implemented and deployed; live navigation first/retest each passed 15/15. No separate Trade implementation task remains. Shared native recovery is tracked by #1504.

Replacement: #1504

Wallet/device chores and verification-only holds are intentionally excluded. Historical failed receipts remain unchanged; this closure does not claim every old acceptance checkbox passed.

Closed at the user's request as part of consolidating issues #1449–#1500. Advanced Trade entry and stable selection/history are implemented and deployed; live navigation first/retest each passed 15/15. No separate Trade implementation task remains. Shared native recovery is tracked by #1504. Replacement: https://git.cl8y.com/code/cl8y-dex-terraclassic/issues/1504 Wallet/device chores and verification-only holds are intentionally excluded. Historical failed receipts remain unchanged; this closure does not claim every old acceptance checkbox passed.
Sign in to join this conversation.
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#1497
No description provided.