bug(quotes): fix recurring quote loss, flicker and intermittent unsupported-pricing outcomes #1499
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:implement
agent:implement
agent:open_issues
agent:ready
agent:research
agent:security_audit
agent:verify
architecture
backend
blocker:hybrid
blocker:launch
blocker:limit-orders
blocker:v2
block:log_only
block:security
bug
ci
contracts
correctness
deploy
dev
devops
docs
documentation
duplicate
e2e
enhancement
epic
feature
frontend
functional-completion
gas
good first issue
governance
help wanted
high-risk
hooks
hybrid
indexer
infra
infrastructure
integrators
invalid
launch-blocker
limit-orders
localnet
localterra
low priority
missing-implementation
needs-design
ops
performance
priority
high
priority
medium
product
qa
QA
question
ready
ready
research
scripts
security
security-hardening
smartcontracts
tech-debt
testing
ux
UX
v2
verification
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
code/cl8y-dex-terraclassic#1499
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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–801uses React Query withkeepPreviousData, local original-expiry stale time/refetch interval andretry:false. Lines 834–859 establish current-input/settled-quote state;useQuotePricingDataPendingcan force calculating/blank receive presentation.simQuery.datawithundefinedwheneverisIndexerLocalQuoteRejection(simQuery.error)is true.useSubmitAlignedSimQuoteseparately 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.tsclips freshness to original expiry, schedules at least a one-second refresh near expiry and preserves ten-second cadence after unknown refresh failure.utils/quoteDebounce.tsstops 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.tslatches missing/stale waits by exact intent;hooks/useQuoteErrorRecovery.tswatches changed publication using a bounded 64-generation history;hooks/useRouteQuotePromotion.tshandles eligible same-generation improvements.hooks/useSubmitAlignedSimQuote.ts:64–87separates display retention from conservative submit readiness.utils/routeQuoteErrors.ts:8mapsunsupported_semanticsto the reported message, accepted only as a typed HTTP 422. Backendindexer/src/api/local_quote/diagnostics.rsclassifies missing/stale/unsupported prerequisites and stored admission rejections. Inspectpair_admission.rs, producer publication andlocal_wrapper_quote.rsbefore attributing an intermittent rejection to the frontend alone. Error text alone does not prove an economic or capability failure.pages/SwapPage.test.tsxcovers 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.services/indexer/client.ts,utils/indexerErrors.ts,utils/localRouteQuote.ts,utils/cw20RouteSolveQuote.ts,utils/nativeWrapRouteSolve.ts,hooks/useRouteSolveProgress.ts,components/trade/TradeMarketOrderPanel.tsx; backendapi/local_quote.rs,api/local_quote/pair_admission.rs,api/quote_cache_control.rsandapi/local_quote/publication.rs,api/local_quote/ingestion.rs,api/local_quote/generation.rsandindexer/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 CL8Yamount. 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_semanticsat 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
/healthread reported backendefb5fba29d3dc401d0d026d8b683db8054458920; 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.
Recommended direction
isFetchingor unrelated publication changes. A genuine current authoritative negative must revoke affected execution immediately.unsupported_semanticsonly 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.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
Test plan for all paths
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,1483and 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 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.make verify-issue-1483make verify-issue-1489make verify-issue-1480make verify-issue-1473corrected, scoped retesttruncated:true; not the full matrix.make verify-issue-1452final full local runThe 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.
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:
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.
Producer follow-up PR #1502 is merged into main
14055610ebe86fd3640ff85e8adc15e16785c6dd; required CI #458 passed all eight steps. Main and the feature worktree are synchronized.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.
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 attested14055610…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.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.
PlasticDigits referenced this issue2026-10-15 05:32:59 +00:00
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.