bug(quotes): fix recurring quote loss, flicker and intermittent unsupported-pricing outcomes #1499

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

Problem and why this change is needed

A settled Swap quote reportedly alternates with blank/0.00 receive output, “Loading price”, disappearing price notices and the message “This trade is not supported by current pricing” after the page remains open. Supported pricing must not oscillate because a background refresh, expiry or producer recovery is confused with a terminal capability failure. Bundle flicker, quote loss, obsolete errors, expiry recovery and matching error classification in one lifecycle fix. The compact visual structure is tracked separately.

Investigation baseline: reviewed repository HEAD (efb5fba29d3dc401d0d026d8b683db8054458920) (2026-10-14 UTC). This report is a sanitized technical synthesis. No reporter identity, conversation, supplied screenshot, wallet actor/context digest, credential, private endpoint or workstation information is attached. Reported live symptoms are distinguished from independently observed/source-confirmed behavior.

Current codebase and source findings

  • frontend-dapp/src/pages/SwapPage.tsx:749–801 uses React Query with keepPreviousData, local original-expiry stale time/refetch interval and retry:false. Lines 834–859 establish current-input/settled-quote state; useQuotePricingDataPending can force calculating/blank receive presentation.
  • Lines 899–902 explicitly replace simQuery.data with undefined whenever isIndexerLocalQuoteRejection(simQuery.error) is true. useSubmitAlignedSimQuote separately removes data at its original expiry. Consequently pending/typed errors and expiry can remove the amount, conditional route/details sections and associated notice together.
  • utils/localQuoteFreshness.ts clips freshness to original expiry, schedules at least a one-second refresh near expiry and preserves ten-second cadence after unknown refresh failure. utils/quoteDebounce.ts stops interval retries on typed local rejection and prevents overlapping fetches. The expiry-aware timer may start a refresh exactly when the original quote expires, while the submit-aligned hook clears it at expiry; that creates a pending interval while the replacement query runs. Investigate this scheduling/publication boundary explicitly. These controls are intentional safeguards, not permission to keep stale executable data.
  • hooks/useQuotePricingDataPending.ts latches missing/stale waits by exact intent; hooks/useQuoteErrorRecovery.ts watches changed publication using a bounded 64-generation history; hooks/useRouteQuotePromotion.ts handles eligible same-generation improvements. hooks/useSubmitAlignedSimQuote.ts:64–87 separates display retention from conservative submit readiness.
  • utils/routeQuoteErrors.ts:8 maps unsupported_semantics to the reported message, accepted only as a typed HTTP 422. Backend indexer/src/api/local_quote/diagnostics.rs classifies missing/stale/unsupported prerequisites and stored admission rejections. Inspect pair_admission.rs, producer publication and local_wrapper_quote.rs before attributing an intermittent rejection to the frontend alone. Error text alone does not prove an economic or capability failure.
  • Existing pages/SwapPage.test.tsx covers unknown failed-refresh retention, missing/stale waits, real unsupported rejection, same-key 5.51% notice retention and expiry clearing. Those tests do not prove sustained behavior for alternating successful quotes, typed errors and publication/expiry races in the deployed page.
  • Supporting files: services/indexer/client.ts, utils/indexerErrors.ts, utils/localRouteQuote.ts, utils/cw20RouteSolveQuote.ts, utils/nativeWrapRouteSolve.ts, hooks/useRouteSolveProgress.ts, components/trade/TradeMarketOrderPanel.tsx; backend api/local_quote.rs, api/local_quote/pair_admission.rs, api/quote_cache_control.rs and api/local_quote/publication.rs, api/local_quote/ingestion.rs, api/local_quote/generation.rs and indexer/fee_phase.rs.

Independent investigation evidence (2026-10-14 UTC)

A bounded anonymous live phone observation of native USTC→CL8Y at 132 units ran from approximately 02:29:41–02:30:16 UTC at 390×844. In 225 samples across 35,054ms, receive output changed nine times and loading toggled eight times. Four settled→blank/loading→settled cycles returned the identical 1.088581125941251074 CL8Y amount. The Pay input's top position alternated between 266px and 290px; route and both existing DETAILS sections disappeared during each wait. Seventeen samples had blank receive. There was no unsupported notice in this specific phone window. This is a fresh independent UI reproduction of quote flicker and 24px displacement, not proof of the original historical cohort or its cause.

A separate bounded backend probe admitted 17 anonymous GETs (15 quotes and two attempted health reads) over at least 185s. It used 5% quote-relative protection and maker cap 8 with native pool-only behavior. Native USTC→CL8Y (132), CL8Y→USTC (132), and CL8Y→cLUNC (13) produced 12 validated positive quote responses. CL8Y→USTC changed from validated HTTP200 at phases 0/10/25/90s to typed HTTP422 unsupported_semantics at phase 185s (02:28:35 UTC). Two USTC quote reads had no response in the probe transport; they are retained as probe failures, not called product rejections. The API result demonstrates an intermittent backend outcome under this observation window; it does not establish whether the final negative was authoritative, stale admission state or configuration recovery failure.

Limits retained: initial browser setup timed out before samples; the next attempt completed phone sampling but timed out in desktop setup. Both timed-out attempts remain failed/incomplete and are not desktop coverage; the separately recorded desktop retest below supplies a later completed observation. The initial health reads used the wrong API path, leaving contemporaneous deployed revision unverified; a separate official read-only artifact attester was stopped after its bounded investigation window and did not establish frontend/root provenance. A later public /health read reported backend efb5fba29d3dc401d0d026d8b683db8054458920; it is backend-only and later than the samples. No request included an actor, no provider access or wallet signing was permitted, and no screenshot or conversation was published. Browser observations are DOM samples rather than independent validation of every intercepted response; investigate the expiry/publication race before claiming a root cause.

A separately retained desktop retest completed 200 DOM samples over 35,143ms for CL8Y→USTC at 132 units (1280×900, approximately 02:35:55–02:36:31 UTC). It initially displayed 14080.882263 USTC, briefly switched to loading/blank and recovered the same amount, then rendered “This trade is not supported by current pricing.” That notice disappeared and returned while the receive remained blank. Across the window there were four receive/loading/price-notice switches, three unsupported-notice switches, 146 blank-receive samples and 135 unsupported-notice samples; Pay moved between 278px and 336px (58px). The retest admitted 73 reads, blocked five disallowed requests and completed with no setup error. The initial failed desktop attempt remains retained; this new successful observation does not erase it. These are real current UI transitions, but DOM sampling alone cannot determine whether a later backend negative was legitimate.

Relevant source links: SwapPage.tsx, localQuoteFreshness.ts, diagnostics.rs, publication.rs.

  1. Capture the original input clock, exact intent, quote original observation/expiry and response status/reason at each transition. Reproduce with independent controlled fixtures and bounded anonymous live observations. Distinguish an API 422, HTTP-200 client validation, cache expiry, stale placeholder and UI-only state transition. Separately attest served artifacts; do not infer deployment or root cause from repository HEAD.
  2. Model display eligibility and signing eligibility explicitly. For an unchanged exact intent, retain a matching unexpired validated net amount, route, fees and notice during background fetching; block signing conservatively as before. Do not clear the visible quote solely on isFetching or unrelated publication changes. A genuine current authoritative negative must revoke affected execution immediately.
  3. On true expiry, keep the layout stable and show a pricing wait rather than a fabricated 0.00 or unsupported-trade assertion. Do not renew original metadata, silently extend cache lifetime or display expired output as a current executable estimate. On new amount/token/receive-target/protection/mode/actor intent, clear incompatible output immediately, cancel obsolete work and ignore late responses.
  4. Return/render unsupported_semantics only for positively established unsupported execution semantics. Missing, stale, pending, cancelled or unavailable prerequisites need their bounded recoverable classes. Fix the producing layer if it misclassifies; do not relabel every 422 as loading, retry deterministic unsupported routes endlessly or hide genuine blockers.
  5. Recover through independently scheduled eligible observations and compatible exact-intent quote publication. Keep progress advisory and bounded; unchanged publication must not repeatedly solve. Preserve finite retry opportunities after transient failures and capacity release, without tight expiry/retry loops or producer polling. Apply the same shared lifecycle contract to Swap and Trade where helpers overlap.
  6. Preserve a pinned reviewed transaction and notices throughout consent/signing; an improvement cannot silently replace accepted operations. The linked layout issue provides reserved summary/error/detail slots so state changes cannot shift the input area.

Constraints and guardrails

Preserve LQ1452, TQ1473, RD1489, OB1480 and RC1483 economic constraints: original 20-second observation/180-second config expiry, four-second fee phase, bounded work/hops/queues/caches/concurrency/history, zero request-triggered chain RPC, exact input/native identity/gross funding, checked raw math, actual taxes/hooks, positive net floors, reference quality with the existing $10 total-TVL/$100 hub-depth floors and 5/30/99 controls. Genuine pause/freeze/blacklist/wrapper/treasury/fee negatives remain visible and non-executable. Advisory progress, a green status, displayed previous output or successful HTTP status never authorizes signing. Preserve unknown inclusion/code11/no-resend rules. Product requests to remove misleading errors do not waive these runtime controls.

Acceptance criteria

  • AC1: Independently reproduce and classify each actual quote-loss/flicker transition with pinned source/artifact and original clocks. If the original deployment cannot be reproduced, state that limit and retain the report; do not assert an unproven backend defect.
  • AC2: A same-intent unexpired validated quote retains amount/route/costs/notice during refresh. No zero/blank pulse or unsupported notice appears solely due to background fetching. Existing conservative submission gates still refuse during refresh.
  • AC3: Original expiry is honored; waiting and recovery keep geometry stable and never authorize stale signing. New eligible observations eventually yield a newly validated matching quote with original new provenance.
  • AC4: Unsupported semantics, missing/stale pricing, client validation, transport failure, protection and trading restrictions remain distinct. Transient failures cannot falsely claim permanent trade incompatibility; genuine negatives cannot be hidden as waiting.
  • AC5: Edits/flip/account/protection/manual-mode/receive-target changes cancel and discard old-intent output, waits and errors, including A→B→A races. Reviewed consent/signing snapshots remain pinned.
  • AC6: Sustained desktop/phone Swap and shared Trade behavior remains stable beyond 20s and 180s, with bounded request counts, zero request RPC and no retry storm. Exact threshold changes still update immediately; cosmetic hysteresis is not a fix.

Test plan for all paths

Path group Required checks
Refresh outcomes Success→delayed success, success→unknown 503, success→typed missing/stale, success→typed genuine unsupported/protection/blacklist, typed error→compatible publication→success; unchanged and changed generations; same-generation better quote; refresh crosses original expiry.
Expiry/producer At expiry ±1ms, 20s/180s boundaries, four-second fee publications, cancelled/latest-started producer reads, slow/no producers, relevant versus unrelated changes and authoritative negatives. Never rebrand old observations as fresh.
Inputs/execution Empty/zero/dust; direct/multihop/pool/hybrid/manual; wrap/unwrap; native and wrapped controls; pay and receive sizing; bidirectional native USTC↔CL8Y, CL8Y↔cLUNC plus arbitrary supported identities; mixed decimals and threshold ±1 raw unit.
Browser lifecycle Initial versus settled; rapid edits/flip/deep links, tab hide/resume and focus, reconnect/outage/manual retry, long open page; disconnected and fixture-connected wallet; Settings/DETAILS open/closed. Observe actual DOM values, notices and geometry every transition.
Signing Invoke mutation even while CTA disabled; stale/placeholder/expired/actor-mismatched/progress-only/indicative/unknown-budget quotes must refuse. Test consent confirmation/cancel, Expert and ≥99%, pinned review, failed inclusion and no automatic resend.

Attack, hack and abuse test plan

Replay old/higher-net quotes across intent, wallet, namespace, generation and expiry; forge timestamps, readiness/progress, policy, floors or HTTP-200 metadata; send unknown/oversized/HTML-bearing reason bodies. No replay, arbitrary server text or progress result may enter executable state. Generate adversarial publication churn, four occupied worker slots, repeated cache hits, cancellation storms and late out-of-order guard/fee responses; verify bounded fairness and immediate genuine-negative invalidation. Saturate rapid UI edits/retries without unbounded timers/listeners/requests or duplicate signing. Test unsupported tax/hook/wrapper families, repeated capable assets, launch guards and owned-refund integrity; a stability change cannot bypass them.

Verification criteria

Add meaningful fake-clock/state/HTTP/real-component regressions for the missing transitions, then run make verify-issue-1473, 1489, 1452, 1483 and relevant provider/feed/fee guards; repeat stable final source in owned disposable fixtures. Bounded actual-browser first/retest must sample unchanged inputs beyond both expiry windows, record transitions/counts and independent frontend/backend/root identities, and retain any unavailable/failed setup separately. Preserve initialized socket ≤500ms and useful browser ≤750ms original-input clocks; loading/errors are not useful-output success. No production/shared DB reset or funds are needed for read-only reproduction. Complete feasible checks; unavailable workflow holds do not block implementation/reporting. Do not close this issue based on source-only passes or a single successful fresh quote, and do not relabel executed failures as skips.

Regression/follow-up to #1473 and #1489; fee safety #1480, economic attribution #1483 and scheduled feed/provider contracts #1453/#1464. Coordinate with #1498 for stable layout and #1500 for metric semantics. This issue owns state/expiry/recovery and authoritative rejection classification. Do not alter advanced Trade entry/navigation as part of shared-helper fixes; that is tracked independently in #1497.

Completed baseline verification and retained limits

Unchanged reviewed source efb5fba29d3dc401d0d026d8b683db8054458920; independent first/retest checks on 2026-10-14 UTC. Owned disposable Postgres had a dedicated QA role/admin-owned marked control database and fresh per-process child databases; its containers were removed. The final repository working tree is clean. These are baseline investigation checks, not implementation/acceptance of this issue.

Command Final observed result Scope
make verify-issue-1483 PASS WITH SKIPS: 21 PASS, 0 FAIL, 2 SKIP Attribution/ranking/validation/components/types; funded and deployed acceptance separate.
make verify-issue-1489 PASS WITH SKIPS: 20 PASS, 0 FAIL, 2 SKIP Producer/discovery/adoption/resource regressions; deployed/funded scope separate.
make verify-issue-1480 PASS WITH SKIPS: 10 PASS, 0 FAIL, 3 SKIP Offline budget/fee/native-balance/signing guards; owned funded calibration and physical signing unverified.
make verify-issue-1473 corrected, scoped retest PASS WITH SKIPS: 17 PASS, 0 FAIL, 2 SKIP Full named source/socket/frontend groups; 482 frontend tests in each internal first/retest. Browser fixture explicitly limited to 120 rows per viewport at 5% protection, private output, truncated:true; not the full matrix.
make verify-issue-1452 final full local run PASS: 14 PASS, 0 FAIL, 0 SKIP Named local source/socket/frontend/controlled-browser/types checks, including 518 frontend tests in each first/retest; deployed/funded acceptance remains separate.

The scoped #1473 production-build browser fixture completed 240 rows across desktop/phone: 220 useful quotes, 20 typed blockers, zero fixture failures, 114 quote requests and zero provider requests. Its original-input-through-render useful timing was p50/p95/p99/max 89.7/149.1/166.7/169.8ms against 750ms. Directions actually exercised were UST1→CL8Y, CL8Y→UST1 and USTC→CL8Y at 5%; no complete pair/protection corpus is claimed. The fixture uses synthetic pinned pool economics and zero-fee native wrappers, not production settlement or nonzero-wrapper-cost acceptance.

Retained failures: the initial #1473 run finished FAIL (14 PASS, 3 FAIL, 2 SKIP). Two configured-default fixture assertions failed in both first/retest (480/482 frontend tests passed); explicit fixture-aligned CL8Y configuration subsequently passed all 482 twice, plus a standalone 16-test retest. The initial full browser attempt failed writing its receipt with ENOSPC; its generated truncated QA file was restored from a pre-run backup. The initial #1452 run was interrupted during the disk-space incident; the later full local run above is separate. Passing later/subset tests do not erase these failures or certify the failed full browser matrix. No shared build/user data was deleted to obtain a pass.

Live evidence remains narrower: the anonymous API sample has 12 useful responses, one typed unsupported outcome and two no-response probe failures. One useful HTTP duration was 849.278ms (above the separate 500ms target); transport classes were not captured, so this is retained rather than claimed as initialized socket acceptance. Phone/desktop live DOM transitions reproduce the presentation failures but do not independently validate every response. Initial browser setup/timeouts and the stopped independent deployment attester remain failed/incomplete; a later public health read matches the reviewed backend SHA only. Exact frontend/root/contracts, full sustained live matrix, physical wallets and funded execution remain unverified. No incomplete acceptance criterion is checked, and related open issues are not closed by these source passes.

## Problem and why this change is needed A settled Swap quote reportedly alternates with blank/0.00 receive output, “Loading price”, disappearing price notices and the message “This trade is not supported by current pricing” after the page remains open. Supported pricing must not oscillate because a background refresh, expiry or producer recovery is confused with a terminal capability failure. Bundle flicker, quote loss, obsolete errors, expiry recovery and matching error classification in one lifecycle fix. The compact visual structure is tracked separately. Investigation baseline: [reviewed repository HEAD](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/commit/efb5fba29d3dc401d0d026d8b683db8054458920) (`efb5fba29d3dc401d0d026d8b683db8054458920`) (2026-10-14 UTC). This report is a sanitized technical synthesis. No reporter identity, conversation, supplied screenshot, wallet actor/context digest, credential, private endpoint or workstation information is attached. Reported live symptoms are distinguished from independently observed/source-confirmed behavior. ## Current codebase and source findings - `frontend-dapp/src/pages/SwapPage.tsx:749–801` uses React Query with `keepPreviousData`, local original-expiry stale time/refetch interval and `retry:false`. Lines 834–859 establish current-input/settled-quote state; `useQuotePricingDataPending` can force calculating/blank receive presentation. - Lines 899–902 explicitly replace `simQuery.data` with `undefined` whenever `isIndexerLocalQuoteRejection(simQuery.error)` is true. `useSubmitAlignedSimQuote` separately removes data at its original expiry. Consequently pending/typed errors and expiry can remove the amount, conditional route/details sections and associated notice together. - `utils/localQuoteFreshness.ts` clips freshness to original expiry, schedules at least a one-second refresh near expiry and preserves ten-second cadence after unknown refresh failure. `utils/quoteDebounce.ts` stops interval retries on typed local rejection and prevents overlapping fetches. The expiry-aware timer may start a refresh exactly when the original quote expires, while the submit-aligned hook clears it at expiry; that creates a pending interval while the replacement query runs. Investigate this scheduling/publication boundary explicitly. These controls are intentional safeguards, not permission to keep stale executable data. - `hooks/useQuotePricingDataPending.ts` latches missing/stale waits by exact intent; `hooks/useQuoteErrorRecovery.ts` watches changed publication using a bounded 64-generation history; `hooks/useRouteQuotePromotion.ts` handles eligible same-generation improvements. `hooks/useSubmitAlignedSimQuote.ts:64–87` separates display retention from conservative submit readiness. - `utils/routeQuoteErrors.ts:8` maps `unsupported_semantics` to the reported message, accepted only as a typed HTTP 422. Backend `indexer/src/api/local_quote/diagnostics.rs` classifies missing/stale/unsupported prerequisites and stored admission rejections. Inspect `pair_admission.rs`, producer publication and `local_wrapper_quote.rs` before attributing an intermittent rejection to the frontend alone. Error text alone does not prove an economic or capability failure. - Existing `pages/SwapPage.test.tsx` covers unknown failed-refresh retention, missing/stale waits, real unsupported rejection, same-key 5.51% notice retention and expiry clearing. Those tests do not prove sustained behavior for alternating successful quotes, typed errors and publication/expiry races in the deployed page. - Supporting files: `services/indexer/client.ts`, `utils/indexerErrors.ts`, `utils/localRouteQuote.ts`, `utils/cw20RouteSolveQuote.ts`, `utils/nativeWrapRouteSolve.ts`, `hooks/useRouteSolveProgress.ts`, `components/trade/TradeMarketOrderPanel.tsx`; backend `api/local_quote.rs`, `api/local_quote/pair_admission.rs`, `api/quote_cache_control.rs` and `api/local_quote/publication.rs`, `api/local_quote/ingestion.rs`, `api/local_quote/generation.rs` and `indexer/fee_phase.rs`. ## Independent investigation evidence (2026-10-14 UTC) A bounded anonymous live phone observation of native USTC→CL8Y at 132 units ran from approximately 02:29:41–02:30:16 UTC at 390×844. In 225 samples across 35,054ms, receive output changed nine times and loading toggled eight times. Four settled→blank/loading→settled cycles returned the identical `1.088581125941251074 CL8Y` amount. The Pay input's top position alternated between 266px and 290px; route and both existing DETAILS sections disappeared during each wait. Seventeen samples had blank receive. There was no unsupported notice in this specific phone window. This is a fresh independent UI reproduction of quote flicker and 24px displacement, not proof of the original historical cohort or its cause. A separate bounded backend probe admitted 17 anonymous GETs (15 quotes and two attempted health reads) over at least 185s. It used 5% quote-relative protection and maker cap 8 with native pool-only behavior. Native USTC→CL8Y (132), CL8Y→USTC (132), and CL8Y→cLUNC (13) produced 12 validated positive quote responses. CL8Y→USTC changed from validated HTTP200 at phases 0/10/25/90s to typed HTTP422 `unsupported_semantics` at phase 185s (02:28:35 UTC). Two USTC quote reads had no response in the probe transport; they are retained as probe failures, not called product rejections. The API result demonstrates an intermittent backend outcome under this observation window; it does not establish whether the final negative was authoritative, stale admission state or configuration recovery failure. Limits retained: initial browser setup timed out before samples; the next attempt completed phone sampling but timed out in desktop setup. Both timed-out attempts remain failed/incomplete and are not desktop coverage; the separately recorded desktop retest below supplies a later completed observation. The initial health reads used the wrong API path, leaving contemporaneous deployed revision unverified; a separate official read-only artifact attester was stopped after its bounded investigation window and did not establish frontend/root provenance. A later public `/health` read reported backend `efb5fba29d3dc401d0d026d8b683db8054458920`; it is backend-only and later than the samples. No request included an actor, no provider access or wallet signing was permitted, and no screenshot or conversation was published. Browser observations are DOM samples rather than independent validation of every intercepted response; investigate the expiry/publication race before claiming a root cause. A separately retained desktop retest completed 200 DOM samples over 35,143ms for CL8Y→USTC at 132 units (1280×900, approximately 02:35:55–02:36:31 UTC). It initially displayed `14080.882263 USTC`, briefly switched to loading/blank and recovered the same amount, then rendered “This trade is not supported by current pricing.” That notice disappeared and returned while the receive remained blank. Across the window there were four receive/loading/price-notice switches, three unsupported-notice switches, 146 blank-receive samples and 135 unsupported-notice samples; Pay moved between 278px and 336px (58px). The retest admitted 73 reads, blocked five disallowed requests and completed with no setup error. The initial failed desktop attempt remains retained; this new successful observation does not erase it. These are real current UI transitions, but DOM sampling alone cannot determine whether a later backend negative was legitimate. Relevant source links: [SwapPage.tsx](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/commit/efb5fba29d3dc401d0d026d8b683db8054458920/frontend-dapp/src/pages/SwapPage.tsx), [localQuoteFreshness.ts](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/commit/efb5fba29d3dc401d0d026d8b683db8054458920/frontend-dapp/src/utils/localQuoteFreshness.ts), [diagnostics.rs](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/commit/efb5fba29d3dc401d0d026d8b683db8054458920/indexer/src/api/local_quote/diagnostics.rs), [publication.rs](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/commit/efb5fba29d3dc401d0d026d8b683db8054458920/indexer/src/api/local_quote/publication.rs). ## Recommended direction 1. Capture the original input clock, exact intent, quote original observation/expiry and response status/reason at each transition. Reproduce with independent controlled fixtures and bounded anonymous live observations. Distinguish an API 422, HTTP-200 client validation, cache expiry, stale placeholder and UI-only state transition. Separately attest served artifacts; do not infer deployment or root cause from repository HEAD. 2. Model display eligibility and signing eligibility explicitly. For an unchanged exact intent, retain a matching unexpired validated net amount, route, fees and notice during background fetching; block signing conservatively as before. Do not clear the visible quote solely on `isFetching` or unrelated publication changes. A genuine current authoritative negative must revoke affected execution immediately. 3. On true expiry, keep the layout stable and show a pricing wait rather than a fabricated 0.00 or unsupported-trade assertion. Do not renew original metadata, silently extend cache lifetime or display expired output as a current executable estimate. On new amount/token/receive-target/protection/mode/actor intent, clear incompatible output immediately, cancel obsolete work and ignore late responses. 4. Return/render `unsupported_semantics` only for positively established unsupported execution semantics. Missing, stale, pending, cancelled or unavailable prerequisites need their bounded recoverable classes. Fix the producing layer if it misclassifies; do not relabel every 422 as loading, retry deterministic unsupported routes endlessly or hide genuine blockers. 5. Recover through independently scheduled eligible observations and compatible exact-intent quote publication. Keep progress advisory and bounded; unchanged publication must not repeatedly solve. Preserve finite retry opportunities after transient failures and capacity release, without tight expiry/retry loops or producer polling. Apply the same shared lifecycle contract to Swap and Trade where helpers overlap. 6. Preserve a pinned reviewed transaction and notices throughout consent/signing; an improvement cannot silently replace accepted operations. The linked layout issue provides reserved summary/error/detail slots so state changes cannot shift the input area. ## Constraints and guardrails Preserve LQ1452, TQ1473, RD1489, OB1480 and RC1483 economic constraints: original 20-second observation/180-second config expiry, four-second fee phase, bounded work/hops/queues/caches/concurrency/history, zero request-triggered chain RPC, exact input/native identity/gross funding, checked raw math, actual taxes/hooks, positive net floors, reference quality with the existing $10 total-TVL/$100 hub-depth floors and 5/30/99 controls. Genuine pause/freeze/blacklist/wrapper/treasury/fee negatives remain visible and non-executable. Advisory progress, a green status, displayed previous output or successful HTTP status never authorizes signing. Preserve unknown inclusion/code11/no-resend rules. Product requests to remove misleading errors do not waive these runtime controls. ## Acceptance criteria - [ ] AC1: Independently reproduce and classify each actual quote-loss/flicker transition with pinned source/artifact and original clocks. If the original deployment cannot be reproduced, state that limit and retain the report; do not assert an unproven backend defect. - [ ] AC2: A same-intent unexpired validated quote retains amount/route/costs/notice during refresh. No zero/blank pulse or unsupported notice appears solely due to background fetching. Existing conservative submission gates still refuse during refresh. - [ ] AC3: Original expiry is honored; waiting and recovery keep geometry stable and never authorize stale signing. New eligible observations eventually yield a newly validated matching quote with original new provenance. - [ ] AC4: Unsupported semantics, missing/stale pricing, client validation, transport failure, protection and trading restrictions remain distinct. Transient failures cannot falsely claim permanent trade incompatibility; genuine negatives cannot be hidden as waiting. - [ ] AC5: Edits/flip/account/protection/manual-mode/receive-target changes cancel and discard old-intent output, waits and errors, including A→B→A races. Reviewed consent/signing snapshots remain pinned. - [ ] AC6: Sustained desktop/phone Swap and shared Trade behavior remains stable beyond 20s and 180s, with bounded request counts, zero request RPC and no retry storm. Exact threshold changes still update immediately; cosmetic hysteresis is not a fix. ## Test plan for all paths | Path group | Required checks | | --- | --- | | Refresh outcomes | Success→delayed success, success→unknown 503, success→typed missing/stale, success→typed genuine unsupported/protection/blacklist, typed error→compatible publication→success; unchanged and changed generations; same-generation better quote; refresh crosses original expiry. | | Expiry/producer | At expiry ±1ms, 20s/180s boundaries, four-second fee publications, cancelled/latest-started producer reads, slow/no producers, relevant versus unrelated changes and authoritative negatives. Never rebrand old observations as fresh. | | Inputs/execution | Empty/zero/dust; direct/multihop/pool/hybrid/manual; wrap/unwrap; native and wrapped controls; pay and receive sizing; bidirectional native USTC↔CL8Y, CL8Y↔cLUNC plus arbitrary supported identities; mixed decimals and threshold ±1 raw unit. | | Browser lifecycle | Initial versus settled; rapid edits/flip/deep links, tab hide/resume and focus, reconnect/outage/manual retry, long open page; disconnected and fixture-connected wallet; Settings/DETAILS open/closed. Observe actual DOM values, notices and geometry every transition. | | Signing | Invoke mutation even while CTA disabled; stale/placeholder/expired/actor-mismatched/progress-only/indicative/unknown-budget quotes must refuse. Test consent confirmation/cancel, Expert and ≥99%, pinned review, failed inclusion and no automatic resend. | ## Attack, hack and abuse test plan Replay old/higher-net quotes across intent, wallet, namespace, generation and expiry; forge timestamps, readiness/progress, policy, floors or HTTP-200 metadata; send unknown/oversized/HTML-bearing reason bodies. No replay, arbitrary server text or progress result may enter executable state. Generate adversarial publication churn, four occupied worker slots, repeated cache hits, cancellation storms and late out-of-order guard/fee responses; verify bounded fairness and immediate genuine-negative invalidation. Saturate rapid UI edits/retries without unbounded timers/listeners/requests or duplicate signing. Test unsupported tax/hook/wrapper families, repeated capable assets, launch guards and owned-refund integrity; a stability change cannot bypass them. ## Verification criteria Add meaningful fake-clock/state/HTTP/real-component regressions for the missing transitions, then run `make verify-issue-1473`, `1489`, `1452`, `1483` and relevant provider/feed/fee guards; repeat stable final source in owned disposable fixtures. Bounded actual-browser first/retest must sample unchanged inputs beyond both expiry windows, record transitions/counts and independent frontend/backend/root identities, and retain any unavailable/failed setup separately. Preserve initialized socket ≤500ms and useful browser ≤750ms original-input clocks; loading/errors are not useful-output success. No production/shared DB reset or funds are needed for read-only reproduction. Complete feasible checks; unavailable workflow holds do not block implementation/reporting. Do not close this issue based on source-only passes or a single successful fresh quote, and do not relabel executed failures as skips. ## Related work Regression/follow-up to #1473 and #1489; fee safety #1480, economic attribution #1483 and scheduled feed/provider contracts #1453/#1464. Coordinate with [#1498](https://git.cl8y.com/code/cl8y-dex-terraclassic/issues/1498) for stable layout and [#1500](https://git.cl8y.com/code/cl8y-dex-terraclassic/issues/1500) for metric semantics. This issue owns state/expiry/recovery and authoritative rejection classification. Do not alter advanced Trade entry/navigation as part of shared-helper fixes; that is tracked independently in #1497. ## Completed baseline verification and retained limits Unchanged reviewed source `efb5fba29d3dc401d0d026d8b683db8054458920`; independent first/retest checks on 2026-10-14 UTC. Owned disposable Postgres had a dedicated QA role/admin-owned marked control database and fresh per-process child databases; its containers were removed. The final repository working tree is clean. These are baseline investigation checks, not implementation/acceptance of this issue. | Command | Final observed result | Scope | | --- | --- | --- | | `make verify-issue-1483` | PASS WITH SKIPS: 21 PASS, 0 FAIL, 2 SKIP | Attribution/ranking/validation/components/types; funded and deployed acceptance separate. | | `make verify-issue-1489` | PASS WITH SKIPS: 20 PASS, 0 FAIL, 2 SKIP | Producer/discovery/adoption/resource regressions; deployed/funded scope separate. | | `make verify-issue-1480` | PASS WITH SKIPS: 10 PASS, 0 FAIL, 3 SKIP | Offline budget/fee/native-balance/signing guards; owned funded calibration and physical signing unverified. | | `make verify-issue-1473` corrected, scoped retest | PASS WITH SKIPS: 17 PASS, 0 FAIL, 2 SKIP | Full named source/socket/frontend groups; 482 frontend tests in each internal first/retest. Browser fixture explicitly limited to 120 rows per viewport at 5% protection, private output, `truncated:true`; not the full matrix. | | `make verify-issue-1452` final full local run | PASS: 14 PASS, 0 FAIL, 0 SKIP | Named local source/socket/frontend/controlled-browser/types checks, including 518 frontend tests in each first/retest; deployed/funded acceptance remains separate. | The scoped #1473 production-build browser fixture completed 240 rows across desktop/phone: 220 useful quotes, 20 typed blockers, zero fixture failures, 114 quote requests and zero provider requests. Its original-input-through-render useful timing was p50/p95/p99/max 89.7/149.1/166.7/169.8ms against 750ms. Directions actually exercised were UST1→CL8Y, CL8Y→UST1 and USTC→CL8Y at 5%; no complete pair/protection corpus is claimed. The fixture uses synthetic pinned pool economics and zero-fee native wrappers, not production settlement or nonzero-wrapper-cost acceptance. Retained failures: the initial #1473 run finished **FAIL (14 PASS, 3 FAIL, 2 SKIP)**. Two configured-default fixture assertions failed in both first/retest (480/482 frontend tests passed); explicit fixture-aligned CL8Y configuration subsequently passed all 482 twice, plus a standalone 16-test retest. The initial full browser attempt failed writing its receipt with `ENOSPC`; its generated truncated QA file was restored from a pre-run backup. The initial #1452 run was interrupted during the disk-space incident; the later full local run above is separate. Passing later/subset tests do not erase these failures or certify the failed full browser matrix. No shared build/user data was deleted to obtain a pass. Live evidence remains narrower: the anonymous API sample has 12 useful responses, one typed unsupported outcome and two no-response probe failures. One useful HTTP duration was 849.278ms (above the separate 500ms target); transport classes were not captured, so this is retained rather than claimed as initialized socket acceptance. Phone/desktop live DOM transitions reproduce the presentation failures but do not independently validate every response. Initial browser setup/timeouts and the stopped independent deployment attester remain failed/incomplete; a later public health read matches the reviewed backend SHA only. Exact frontend/root/contracts, full sustained live matrix, physical wallets and funded execution remain unverified. No incomplete acceptance criterion is checked, and related open issues are not closed by these source passes.
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.

  • Implemented same-intent unexpired display retention, immediate negative/context revocation, original expiry and stable publication-based refresh anchor. Fetch/error state still blocks signing.
  • Missing scheduled observations remain distinct from genuinely unsupported semantics. Independent required fields survive unrelated read timeouts within unchanged producer deadlines/budgets. Thirteen producer tests plus actual shared LCD-budget checks pass first/retest.
  • Controlled browser matrix: 4,250 rows, zero failures and zero provider requests; source first/retest and types pass available scope.
  • Full AC1–AC6 live acceptance: native sustained retest still has setup/latency and unresolved validation/expiry flags. cLUNC and arbitrary factory groups each pass four 190-second windows; passing subsets do not erase failed original clocks.
  • Provider availability/redundancy: logs show missing observations/circuit-open/historical-height loss. No confirmed owned Coolify provider service was found to repair. Prometheus has no provisioned datasource.

Read-only QA now preserves native transport and active visible-cohort ownership. Multi-second host/browser scheduling and delayed CDP delivery are recorded as diagnostic limits, not a product exoneration or a PASS. Original FAIL receipts remain.

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.

QA provenance limit: final V5 tools pass 27/27 regressions first/retest; no new full live trial was run after those corrections. Executed V4 driver/clock hashes and raw receipts were retained, but their exact source bytes were not archived. This limits exact replay; original failed live verdicts remain unchanged.

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] Implemented same-intent unexpired display retention, immediate negative/context revocation, original expiry and stable publication-based refresh anchor. Fetch/error state still blocks signing. - [x] Missing scheduled observations remain distinct from genuinely unsupported semantics. Independent required fields survive unrelated read timeouts within unchanged producer deadlines/budgets. Thirteen producer tests plus actual shared LCD-budget checks pass first/retest. - [x] Controlled browser matrix: 4,250 rows, zero failures and zero provider requests; source first/retest and types pass available scope. - [ ] Full AC1–AC6 live acceptance: native sustained retest still has setup/latency and unresolved validation/expiry flags. cLUNC and arbitrary factory groups each pass four 190-second windows; passing subsets do not erase failed original clocks. - [ ] Provider availability/redundancy: logs show missing observations/circuit-open/historical-height loss. No confirmed owned Coolify provider service was found to repair. Prometheus has no provisioned datasource. Read-only QA now preserves native transport and active visible-cohort ownership. Multi-second host/browser scheduling and delayed CDP delivery are recorded as diagnostic limits, not a product exoneration or a PASS. Original FAIL receipts remain. [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. QA provenance limit: final V5 tools pass 27/27 regressions first/retest; no new full live trial was run after those corrections. Executed V4 driver/clock hashes and raw receipts were retained, but their exact source bytes were not archived. This limits exact replay; original failed live verdicts remain unchanged.
Author
Owner

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

Same-intent retention, original expiry, missing-versus-unsupported classification and bounded producer fixes are implemented and deployed. Actual recurring native unavailability, 503s and slow recovery move to #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. Same-intent retention, original expiry, missing-versus-unsupported classification and bounded producer fixes are implemented and deployed. Actual recurring native unavailability, 503s and slow recovery move to #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#1499
No description provided.