fix(indexer): quote swaps under 250 ms from cached liquidity with zero request-triggered RPC #1452

Closed
opened 2026-10-09 06:54:54 +00:00 by PlasticDigits · 7 comments
Owner

Problem and scope

Fix the swap route-solver regression reported on USTR routes as one implementation: liquidity-aware executable candidate selection, a useful initial quote in strictly less than 250 ms, bounded deeper search, effective caching, and consistent refreshes.

An anonymized report describes CL8Y→USTR and LUNC→USTR being blocked even for small offers. The displayed route used CL8Y→cLUNC→UST1→USTR and showed approximately 67.41% expected slippage alongside the existing 5% protection error. A related report describes small USTC→USTR quotes periodically changing from low slippage to approximately 8% without an amount edit. Slow quotes are also reported. These are related solver symptoms; no conversation, screenshot, identity, wallet, or private transaction history is published here.

Users should get a good route automatically and quickly. They must not have to select intermediates, diagnose pools, or increase protection settings to compensate for the solver.

Architecture requirement: initial quotes, deeper search, refreshes, reference pricing, route preflight and preparation of the reviewed route must use locally cached data. No request-triggered RPC/LCD calls or network validation at any stage. A separately scheduled, bounded indexer ingestion worker maintains reserves, books, configuration and prices; requests must not start extra chain polling. On-chain execution enforces signed floors against actual settlement.

Current codebase and investigation

Reviewed revision: b26b762c4a870251d780715eac6eea4e2db5c14e. Read-only public production probes: 2026-10-09 UTC.

  • route_paths.rs enumerates simple paths by hop count, then lexicographic pair address. best_execution.rs enumerates at most 32 structural paths and evaluates the first five usable candidates. Its cheap admission filter principally removes zero-output, implausible, and near-full-drain paths; it does not prioritize useful amount-specific depth. LCD mode takes the first five structural candidates. Final selection maximizes executable net output within that restricted set.
  • Current GET hybrid hop limit is four. Preserve the separately bounded three-hop greedy-reverse limit; do not confuse stale three-hop comments with the current forward constant.
  • Candidate evaluation performs hybrid optimization and router simulation; ordinary routes strip interior declared hybrid under Policy A and repropagate the emitted plan. The GET request does not currently communicate the frontend's selected max-spread constraint to best-execution selection. Wallet preflight can consequently reject the selected route after expensive quoting.
  • Caching exists in source: route responses use 12-second TTL or 90 seconds for distant routes, graph snapshots 15 seconds, independently solved token reference prices 30 seconds. Therefore this is not evidence that caching was deleted. Audit cache effectiveness, keys, single-flight behavior and blocking work on hits.
  • Cached route responses are synchronously passed through enrich_route_slippage again. Reference prices solve one whole token into a quote token using best execution. Quote output, graph, references, tax configuration and wallet validation can represent different observations. An enrichment failure returns early and can leave fields absent or retain fields carried by a cached body; this needs explicit consistency coverage.
  • Frontend route percentages prefer wallet receive versus spot_amount_out, then indexer slippage. Per-hop market-spread preflight is a separate check. Funded high-impact guidance currently suggests pay/10 without proving the resulting trade is executable.

Public API observations:

  • 0.1 CL8Y (100000000000000000 raw, 18 decimals) selected CL8Y→cLUNC→UST1→USTR, returning approximately 9.509154182294578288 USTR. The request took 21.10 s, reported five candidates, global_v6_funded, and passed fidelity on a repeated observation.
  • 1 CL8Y (1000000000000000000 raw) selected CL8Y→cUSTC→UST1→USTR, returning approximately 97.707786127357668350 USTR in 9.73 s.
  • The public pair list reported approximately $3.33 for cLUNC/UST1, $206.45 for CL8Y/cLUNC, $97,206.85 for UST1/cUSTC, and $3,194.78 for CL8Y/cUSTC. These are indexer observations, not independently attested current reserves.
  • A small cUSTC→USTR probe initially returned 404, later returned approximately 0.840060832012429963 USTR through UST1, and a later request returned HTTP 408 after 30.92 s. cLUNC→USTR at one whole cLUNC returned 404. No amounts were funded or transactions broadcast.
  • A further unchanged-input refresh of 0.1 CL8Y returned 404 after 9.811 s, and cUSTC→USTR again returned 408 after 30.944 s. This reproduces loss of a previously successful quote on refresh; it is not proof that actual market state was unchanged.
  • The successful probes omitted spot_amount_out and slippage_percent. They reproduce the thin-route selection and latency concern, but do not reproduce the exact reported 67.41% or 8% figures.
  • The public current graph includes the direct cUSTC corridor among short paths. Do not assume shortlist truncation alone explains this production example: compare each candidate's admission, emitted operations, net output, spread, mirror freshness and rejection reason at the same offer and observation. The general address/hop shortlist bias is independently visible in source.

Why a new implementation is needed

Waiting 10–30 seconds for a potentially unexecutable thin route is incompatible with retail swapping. A hop-count shortlist can omit deeper routes; output-only selection without execution constraints can choose a route the wallet subsequently blocks. Independently refreshed references and quote caches can cause apparent slippage changes unrelated to the typed amount. Existing caching and fidelity tests do not establish the requested latency or correct constrained route selection.

A good initial result is sufficient; global optimality is not required. Deeper optimization must improve a usable baseline without holding the initial response hostage.

Relevant files

  • indexer/src/api/route_paths.rs, route_graph.rs, best_execution.rs: enumeration, shortlist, concurrency, validation and winner selection.
  • indexer/src/api/db_orderbook_sim.rs, hybrid_route_opt.rs: reserve/book mirrors, cheap scoring, hybrid plan and execution parity.
  • indexer/src/api/route_solver.rs, route_slippage.rs, route_solve_progress.rs, route_exact_output.rs: response/cache identity, reference calculations, progress and receive sizing.
  • indexer/src/api/community_tax_rank.rs: tax-aware executable net ranking.
  • frontend-dapp/src/services/indexer/client.ts, utils/cw20RouteSolveQuote.ts, utils/directHybridQuote.ts, services/terraclassic/swapRoutePreflight.ts: request constraints and authoritative validation.
  • frontend-dapp/src/pages/SwapPage.tsx, components/trade/TradeMarketOrderPanel.tsx, utils/swapRouteSlippage.ts, utils/swapPayAcquireGuidance.ts: refresh/signing consistency and existing misleading size guidance.
  • docs/route-solver.md, docs/swap-max-spread-ux.md, docs/frontend.md; relevant tests alongside these modules.
  1. For all swaps, first enumerate the direct pair and two-hop paths by intersecting cached endpoint adjacency lists. Score these candidates in milliseconds using cached reserves, bounded book data and fee/tax/hook configuration; zero RPC/LCD calls are allowed on this initial path. Do not run the full hybrid grid or multi-hop optimizer to find these ordinary routes. Use a cached eligible longer baseline where a direct/two-hop route does not exist. Build this bounded fast path from cached graph/reserve/book/tax observations and locally scored route skeletons. Return a useful positive initial estimate in <250 ms, including on a route-response cache miss when the service's indexed graph is available. Do not await live LCD calls, recursive reference solves, exhaustive hybrid grids or deeper search before returning it. Check cached observation age, identity and supported semantics locally; derive positive execution floors from that same quote. Unknown required data fails explicitly instead of triggering a live lookup.
  2. Prioritize candidates using amount-specific simulated depth/output and eligibility, with deterministic route diversity before applying the expensive-evaluation cap. UST1/cUSTC are important corridors to cover in these fixtures; USDT/cLUNC remain eligible when actual economics are better. Use contract identity and observed execution economics, not a hard-coded ticker hierarchy, USD TVL alone, or raw reserves across different decimals.
  3. Rank the emitted executable plan by delivered net output after fees, tax, hooks and wrapper effects, subject to the caller's actual execution constraints. Discard a rejected winner and evaluate the next eligible baseline rather than exposing a known-unexecutable quote. Separate fair-reference deviation from L9 per-hop market spread and net receive floors.
  4. Run bounded deeper local search asynchronously, reusing existing progress machinery where practical. Associate updates with one request generation and exact input/constraints. Publish only a meaningful improvement; retain a useful baseline through background work. Pin the reviewed quote and operations during confirmation/signing; a material change requires the existing fresh confirmation.
  5. Restore effective cache reuse and coalesce identical work. Cache route skeletons separately from amount-sensitive results and reference computations. Remove per-request router simulation, pair/config/tier LCD fallback and frontend quote/preflight smart-query fan-out; compute equivalent execution-aligned arithmetic from the indexed cache. Keys/invalidation must cover chain/client isolation, exact offer/target semantics, direction, execution mode, trader/tier, spread constraint, maker cap, route funding/tax identity and relevant graph/reserve/book generations. Avoid linear scaling as an executable quote when pools, books, rounding or tax thresholds are nonlinear.
  6. Compute output and impact from compatible observations and net semantics. Track unavailable references explicitly internally; never reuse stale enrichment fields as fresh, invent zero impact, or hide genuine risk. Do not replace a good quote with missing output during refresh. Keep technical provenance in backend/test evidence.
  7. Keep the retail flow automatic and compact. Correct or remove unsupported size-reduction guidance; show it only when a fresh smaller quote demonstrates that it solves the actual constraint. Deduplicate overlapping blocking messages and keep a single applicable next action.

Constraints and guardrails

  • Anti-cognitive-overload: follow retail copy rules and the existing design system. Labels approximately five words or fewer; blocking copy one short sentence. No new route-selection wizard, liquidity-ranking panel, cache/search-stage badges, diagnostic banners, permanent explanations, or user homework. Preserve required risk acknowledgement and signing anchors.
  • Preserve L9, positive post-hook per-hop min_return, final minimum_receive, stale-submit checks, 30% Expert behavior and the non-waivable ≥99% guard. This issue does not authorize weakening economic protections.
  • Preserve route-local funding v1, wallet debit limits, launch guards/refund ownership, factory/code-id exclusions, gem exclusions, blacklist/pause, and Policy A quote/execute parity. No foreign DEX integration or parallel amount splitting.
  • Bound edge visits, candidates, mirror work, background jobs, LCD calls, cache size and concurrent requests. Cancellation must stop avoidable work; timeouts cannot leave unbounded detached tasks. Preserve funded/greedy reverse provider budgets.
  • Use least-privilege runtime DB access and disposable integration databases under #1396. Never mutate production pools/books/database for reproduction.
  • No private report text, screenshots, reporter attribution, wallet identifiers or credentials in issues, telemetry or fixtures.
  • Related cache/feed reliability work: #1453 covers independent reserve observations, provider failover and liquidity publication. Coordinate cache generation semantics; the quote fast path remains fully local.
  • Related: #1218, #1257, #1280, #1381, #1398 and #1376. Coordinate with #1330 only for overlapping execution/confirmation behavior; this factory-route fix has no dependency on #690's foreign-DEX architecture work.

Acceptance criteria

  • CL8Y→USTR, native LUNC→USTR and native USTC→USTR small-offer fixtures automatically select the best delivered-net route among the admitted executable candidates. A cLUNC bottleneck that fails protection cannot beat an available eligible cUSTC/UST1 corridor. Honest better thin/book routes remain eligible.
  • Direct and one-intermediate routes (for example CL8Y→USTR, CL8Y→UST1→USTR, CL8Y→cUSTC→USTR and CL8Y→cLUNC→USTR when those pairs exist) are searched and scored in milliseconds with zero RPC/LCD calls. This applies to all swaps. A provider stub that throws on every network call must still permit an eligible useful initial quote from initialized local data.
  • Initial useful quote arrives in strictly <250 ms for each representative supported route, warm cache and route-response miss, with the service's indexed data initialized. Measure server request-to-first-result and browser input-to-first-result in the production-like reference environment, including normal transport; report distributions and maxima. A loading/progress/202 response alone does not satisfy this criterion.
  • The fast path does not require global optimality. A deterministic bounded deeper search can later improve net output, without delaying the initial response or resetting displayed receive values. Cold process initialization is measured separately and cannot masquerade as a warm/route-miss result.
  • A throwing/counting RPC/LCD provider proves zero request-triggered network calls across initial results, deeper search, references, tier/config resolution, refresh, frontend preflight and route confirmation. Independently scheduled ingestion has bounded concurrency, retries and per-provider rate limits; no request can force an extra ingestion pass.
  • Identical concurrent requests share expensive background work. Repeated requests actually reuse eligible caches; TTL expiry, tier/tax changes and market-generation changes cause bounded refresh instead of long blocking misses.
  • With fixed input, observations and constraints, refreshes return consistent routes, receive amounts and impact. Market changes may legitimately change them; tests explain the source through internal evidence, without new retail diagnostic chrome.
  • Quote display, net impact, preflight, confirmation and signed operations refer to the same generation, input, net semantics and route. Expert mode and refresh races cannot bypass execution floors tied to the same eligible cached observations.
  • If no route is eligible, keep submission blocked with one short accurate error and the appropriate existing action. Do not blame size or recommend pay/10 without evidence that reduction helps.
  • Add a focused make verify-issue-<this issue> with performance, selection, caching, refresh and abuse regressions; update current optimality/budget docs and agent guidance.

Test plan: functional paths

Paths/scenario Required evidence
CL8Y→USTR at 0.01, 0.1, 1, 5 and larger offers 18→6→18 raw-unit correctness; compare thin cLUNC and deep cUSTC/UST1 paths at identical observations; verify emitted operations and net ranking.
Native LUNC/USTC→USTR and wrapped equivalents Wrap fee/tax/input conversion accounted exactly once; eligible alternative selected, minimum receive and signing parity preserved.
USTR reverse direction and receive-target mode Correct local-cache target sizing and cache separation; explicit unsupported failures, no gross or RPC fallback. Preserve separately existing contract/provider inverse-query budgets.
Direct, multi-hop, pool-only, declared hybrid/book, taxed and hook-aware routes Valid baseline retained; optimizer compares execution-aligned plans; tiny/dust/zero output and genuinely insufficient liquidity fail safely.
More than five plausible paths; useful corridor beyond the original shortlist/32-path order Quality-aware bounded admission includes useful alternatives; shuffle pair addresses/insertion order without arbitrary degradation; preserve deterministic ties.
Deep AMM vs better executable small book; thin pool with favorable genuine rate Liquidity is an admission heuristic, not a rule overriding better net economics; no blanket cLUNC/USDT ban.
Fixed amount refresh across 12/15/30/90-second boundaries Test controlled clocks, unchanged snapshots, changing books/reserves, unavailable enrichment and previously cached fields; no artificial 8% jumps.
Missing/stale mirrors or ingestion provider failures; recovery from 404/408 Healthy alternative succeeds when available; baseline remains visible; no live-query fallback anywhere in quote/deeper-search/preflight; ingestion failure cannot cause request-time query storms.
Initialized local data with all RPC/LCD access disabled Direct and two-hop candidates scored in milliseconds; useful quote <250 ms; no remote reference solve, discount/config lookup, router simulation or frontend preflight query occurs during initial quoting, deeper search, refresh or route confirmation.
Warm/miss/expiry, same-key bursts, different offers/tiers/modes Actual hits, single-flight counters, invalidation and bounded background work; no amount bucket or actor/tier cross-contamination.
Fast typing, token reversal, disconnect/reconnect, confirmation open, search improvement Old/cancelled results cannot replace newer input; reviewed signing snapshot remains pinned.
Desktop and phone Swap/Trade Useful first quote <250 ms; one applicable compact blocker/action; no duplicate diagnostics or new routing controls.

Use deterministic Rust/DB fixtures and mocked clocks/providers first; run browser integration with controlled network latency and a read-only production reproduction separately. Include a meaningful >5-path quality benchmark and unchanged-snapshot refresh fixture, rather than tests that merely mirror sorting code.

Test plan: attack, hack and abuse

  • Dense graph, address-order poisoning and many dust pools: fixed work/memory/job budgets, reachable-goal pruning, route diversity and deadline/cancellation remain effective.
  • Spoofed UST1/cUSTC/USDT symbols, malicious/misleading USD marks, manipulated shallow reserves or resting orders: identity by validated contract; no oracle/TVL-only preference; check executable net output against eligible cached observations before signing, with zero RPC/LCD queries.
  • Mixed 6/18 decimals, hostile decimals, overflow, huge raw inputs, dust floors and nonlinear book/tax thresholds: checked wide integer calculations; no implausible output, float-derived executable amount or cached linear extrapolation.
  • Stale/reference-cache poisoning, failed refresh retaining old impact, tier/sender/funding/chain collisions: isolate/invalidate correctly; no stale result relabeled fresh or weaker floor reused.
  • Request floods, rapid cancellation, slow LCD/DB, crashed background workers: coalescing/admission limits; bounded outstanding tasks and cache growth; no retry storms or indefinite loading.
  • Forged/mismatched route operations, repeated capable assets, unsupported hooks, changed tax config, pause/blacklist/frozen pairs: fail closed with no signing or wallet-budget bypass.
  • Refresh during confirmation and forced Expert mode: no route substitution, ≥99% bypass or missing positive floor; rejected execution rolls back balances/reserves atomically.
  • Untrusted symbols/errors/progress payloads: render as text, redact actor identifiers, no XSS/SSRF or credential exposure.

Verification criteria and investigation results

Record revision, UTC timestamp, exact command, meaningful test counts, request/quote generations, cache counters, snapshot identity and latency distributions. Performance evidence must include initial useful output and later improvement timings, not just asynchronous acknowledgement latency. Source checks do not establish deployment.

Completed before filing:

  • make verify-issue-1398: PASS, 7 verification groups, 0 failures/skips; focused retest, full contract workspace, frontend quote/signing and formatting/docs checks.
  • cargo test --manifest-path indexer/Cargo.toml --lib api::route_paths -- --test-threads=1: 13 passed.
  • Same command with api::route_slippage: 3 passed; with api::best_execution: 9 passed.
  • make verify-issue-1257: FAIL, 3 groups passed/3 failed. Its frontend token-registry test encountered the local CL8Y env override; a correct mainnet VITE_CL8Y_TOKEN_ADDRESS retest of its five frontend suites passed 122/122. The verifier's source grep and route-solver optimality documentation checks still fail; do not report the aggregate verifier green.
  • Public indexer route/pair probes described above are completed; no signing or production mutation.

Unavailable investigation checks do not hold issue creation: direct public LCD smart queries returned HTTP 403, so independent on-chain reserve/path comparison and the exact historical percentages remain unverified. No production signing/device acceptance was attempted. Implementing this issue must add the missing deterministic quality, refresh and <250 ms regressions, then verify the deployed frontend/indexer on the same route corpus. Keep unresolved executed failures visible.

## Problem and scope Fix the swap route-solver regression reported on USTR routes as one implementation: liquidity-aware executable candidate selection, a useful initial quote in **strictly less than 250 ms**, bounded deeper search, effective caching, and consistent refreshes. An anonymized report describes CL8Y→USTR and LUNC→USTR being blocked even for small offers. The displayed route used CL8Y→cLUNC→UST1→USTR and showed approximately 67.41% expected slippage alongside the existing 5% protection error. A related report describes small USTC→USTR quotes periodically changing from low slippage to approximately 8% without an amount edit. Slow quotes are also reported. These are related solver symptoms; no conversation, screenshot, identity, wallet, or private transaction history is published here. Users should get a good route automatically and quickly. They must not have to select intermediates, diagnose pools, or increase protection settings to compensate for the solver. **Architecture requirement:** initial quotes, deeper search, refreshes, reference pricing, route preflight and preparation of the reviewed route must use locally cached data. **No request-triggered RPC/LCD calls or network validation at any stage.** A separately scheduled, bounded indexer ingestion worker maintains reserves, books, configuration and prices; requests must not start extra chain polling. On-chain execution enforces signed floors against actual settlement. ## Current codebase and investigation Reviewed revision: `b26b762c4a870251d780715eac6eea4e2db5c14e`. Read-only public production probes: 2026-10-09 UTC. - `route_paths.rs` enumerates simple paths by hop count, then lexicographic pair address. `best_execution.rs` enumerates at most 32 structural paths and evaluates the first five usable candidates. Its cheap admission filter principally removes zero-output, implausible, and near-full-drain paths; it does not prioritize useful amount-specific depth. LCD mode takes the first five structural candidates. Final selection maximizes executable net output **within that restricted set**. - Current GET hybrid hop limit is **four**. Preserve the separately bounded three-hop greedy-reverse limit; do not confuse stale three-hop comments with the current forward constant. - Candidate evaluation performs hybrid optimization and router simulation; ordinary routes strip interior declared hybrid under Policy A and repropagate the emitted plan. The GET request does not currently communicate the frontend's selected max-spread constraint to best-execution selection. Wallet preflight can consequently reject the selected route after expensive quoting. - Caching exists in source: route responses use 12-second TTL or 90 seconds for distant routes, graph snapshots 15 seconds, independently solved token reference prices 30 seconds. Therefore this is not evidence that caching was deleted. Audit cache effectiveness, keys, single-flight behavior and blocking work on hits. - Cached route responses are synchronously passed through `enrich_route_slippage` again. Reference prices solve **one whole token** into a quote token using best execution. Quote output, graph, references, tax configuration and wallet validation can represent different observations. An enrichment failure returns early and can leave fields absent or retain fields carried by a cached body; this needs explicit consistency coverage. - Frontend route percentages prefer wallet receive versus `spot_amount_out`, then indexer slippage. Per-hop market-spread preflight is a separate check. Funded high-impact guidance currently suggests pay/10 without proving the resulting trade is executable. Public API observations: - 0.1 CL8Y (`100000000000000000` raw, 18 decimals) selected CL8Y→cLUNC→UST1→USTR, returning approximately **9.509154182294578288 USTR**. The request took **21.10 s**, reported five candidates, `global_v6_funded`, and passed fidelity on a repeated observation. - 1 CL8Y (`1000000000000000000` raw) selected CL8Y→cUSTC→UST1→USTR, returning approximately **97.707786127357668350 USTR** in **9.73 s**. - The public pair list reported approximately **$3.33** for cLUNC/UST1, **$206.45** for CL8Y/cLUNC, **$97,206.85** for UST1/cUSTC, and **$3,194.78** for CL8Y/cUSTC. These are indexer observations, not independently attested current reserves. - A small cUSTC→USTR probe initially returned 404, later returned approximately **0.840060832012429963 USTR** through UST1, and a later request returned HTTP 408 after **30.92 s**. cLUNC→USTR at one whole cLUNC returned 404. No amounts were funded or transactions broadcast. - A further unchanged-input refresh of 0.1 CL8Y returned **404 after 9.811 s**, and cUSTC→USTR again returned **408 after 30.944 s**. This reproduces loss of a previously successful quote on refresh; it is not proof that actual market state was unchanged. - The successful probes omitted `spot_amount_out` and `slippage_percent`. They reproduce the thin-route selection and latency concern, but do **not** reproduce the exact reported 67.41% or 8% figures. - The public current graph includes the direct cUSTC corridor among short paths. Do not assume shortlist truncation alone explains this production example: compare each candidate's admission, emitted operations, net output, spread, mirror freshness and rejection reason at the **same offer and observation**. The general address/hop shortlist bias is independently visible in source. ## Why a new implementation is needed Waiting 10–30 seconds for a potentially unexecutable thin route is incompatible with retail swapping. A hop-count shortlist can omit deeper routes; output-only selection without execution constraints can choose a route the wallet subsequently blocks. Independently refreshed references and quote caches can cause apparent slippage changes unrelated to the typed amount. Existing caching and fidelity tests do not establish the requested latency or correct constrained route selection. A good initial result is sufficient; global optimality is not required. Deeper optimization must improve a usable baseline without holding the initial response hostage. ## Relevant files - `indexer/src/api/route_paths.rs`, `route_graph.rs`, `best_execution.rs`: enumeration, shortlist, concurrency, validation and winner selection. - `indexer/src/api/db_orderbook_sim.rs`, `hybrid_route_opt.rs`: reserve/book mirrors, cheap scoring, hybrid plan and execution parity. - `indexer/src/api/route_solver.rs`, `route_slippage.rs`, `route_solve_progress.rs`, `route_exact_output.rs`: response/cache identity, reference calculations, progress and receive sizing. - `indexer/src/api/community_tax_rank.rs`: tax-aware executable net ranking. - `frontend-dapp/src/services/indexer/client.ts`, `utils/cw20RouteSolveQuote.ts`, `utils/directHybridQuote.ts`, `services/terraclassic/swapRoutePreflight.ts`: request constraints and authoritative validation. - `frontend-dapp/src/pages/SwapPage.tsx`, `components/trade/TradeMarketOrderPanel.tsx`, `utils/swapRouteSlippage.ts`, `utils/swapPayAcquireGuidance.ts`: refresh/signing consistency and existing misleading size guidance. - `docs/route-solver.md`, `docs/swap-max-spread-ux.md`, `docs/frontend.md`; relevant tests alongside these modules. ## Recommended direction 1. For **all swaps**, first enumerate the direct pair and two-hop paths by intersecting cached endpoint adjacency lists. Score these candidates in milliseconds using cached reserves, bounded book data and fee/tax/hook configuration; **zero RPC/LCD calls** are allowed on this initial path. Do not run the full hybrid grid or multi-hop optimizer to find these ordinary routes. Use a cached eligible longer baseline where a direct/two-hop route does not exist. Build this bounded fast path from cached graph/reserve/book/tax observations and locally scored route skeletons. Return a useful positive initial estimate in **<250 ms**, including on a route-response cache miss when the service's indexed graph is available. Do not await live LCD calls, recursive reference solves, exhaustive hybrid grids or deeper search before returning it. Check cached observation age, identity and supported semantics locally; derive positive execution floors from that same quote. Unknown required data fails explicitly instead of triggering a live lookup. 2. Prioritize candidates using amount-specific simulated depth/output and eligibility, with deterministic route diversity before applying the expensive-evaluation cap. UST1/cUSTC are important corridors to cover in these fixtures; USDT/cLUNC remain eligible when actual economics are better. Use contract identity and observed execution economics, not a hard-coded ticker hierarchy, USD TVL alone, or raw reserves across different decimals. 3. Rank the **emitted executable plan** by delivered net output after fees, tax, hooks and wrapper effects, subject to the caller's actual execution constraints. Discard a rejected winner and evaluate the next eligible baseline rather than exposing a known-unexecutable quote. Separate fair-reference deviation from L9 per-hop market spread and net receive floors. 4. Run bounded deeper **local** search asynchronously, reusing existing progress machinery where practical. Associate updates with one request generation and exact input/constraints. Publish only a meaningful improvement; retain a useful baseline through background work. Pin the reviewed quote and operations during confirmation/signing; a material change requires the existing fresh confirmation. 5. Restore effective cache reuse and coalesce identical work. Cache route skeletons separately from amount-sensitive results and reference computations. Remove per-request router simulation, pair/config/tier LCD fallback and frontend quote/preflight smart-query fan-out; compute equivalent execution-aligned arithmetic from the indexed cache. Keys/invalidation must cover chain/client isolation, exact offer/target semantics, direction, execution mode, trader/tier, spread constraint, maker cap, route funding/tax identity and relevant graph/reserve/book generations. Avoid linear scaling as an executable quote when pools, books, rounding or tax thresholds are nonlinear. 6. Compute output and impact from compatible observations and net semantics. Track unavailable references explicitly internally; never reuse stale enrichment fields as fresh, invent zero impact, or hide genuine risk. Do not replace a good quote with missing output during refresh. Keep technical provenance in backend/test evidence. 7. Keep the retail flow automatic and compact. Correct or remove unsupported size-reduction guidance; show it only when a fresh smaller quote demonstrates that it solves the actual constraint. Deduplicate overlapping blocking messages and keep a single applicable next action. ## Constraints and guardrails - **Anti-cognitive-overload:** follow [retail copy rules](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/branch/main/skills/AGENTS_FRONTEND_COPY_COGNITIVE_LOAD.md) and the existing design system. Labels approximately five words or fewer; blocking copy one short sentence. No new route-selection wizard, liquidity-ranking panel, cache/search-stage badges, diagnostic banners, permanent explanations, or user homework. Preserve required risk acknowledgement and signing anchors. - Preserve L9, positive post-hook per-hop `min_return`, final `minimum_receive`, stale-submit checks, 30% Expert behavior and the non-waivable ≥99% guard. This issue does not authorize weakening economic protections. - Preserve route-local funding v1, wallet debit limits, launch guards/refund ownership, factory/code-id exclusions, gem exclusions, blacklist/pause, and Policy A quote/execute parity. No foreign DEX integration or parallel amount splitting. - Bound edge visits, candidates, mirror work, background jobs, LCD calls, cache size and concurrent requests. Cancellation must stop avoidable work; timeouts cannot leave unbounded detached tasks. Preserve funded/greedy reverse provider budgets. - Use least-privilege runtime DB access and disposable integration databases under #1396. Never mutate production pools/books/database for reproduction. - No private report text, screenshots, reporter attribution, wallet identifiers or credentials in issues, telemetry or fixtures. - Related cache/feed reliability work: [#1453](https://git.cl8y.com/code/cl8y-dex-terraclassic/issues/1453) covers independent reserve observations, provider failover and liquidity publication. Coordinate cache generation semantics; the quote fast path remains fully local. - Related: #1218, #1257, #1280, #1381, #1398 and #1376. Coordinate with #1330 only for overlapping execution/confirmation behavior; this factory-route fix has no dependency on #690's foreign-DEX architecture work. ## Acceptance criteria - [ ] CL8Y→USTR, native LUNC→USTR and native USTC→USTR small-offer fixtures automatically select the best delivered-net route among the admitted **executable** candidates. A cLUNC bottleneck that fails protection cannot beat an available eligible cUSTC/UST1 corridor. Honest better thin/book routes remain eligible. - [ ] Direct and one-intermediate routes (for example CL8Y→USTR, CL8Y→UST1→USTR, CL8Y→cUSTC→USTR and CL8Y→cLUNC→USTR when those pairs exist) are searched and scored in milliseconds with **zero RPC/LCD calls**. This applies to all swaps. A provider stub that throws on every network call must still permit an eligible useful initial quote from initialized local data. - [ ] Initial useful quote arrives in **strictly <250 ms** for each representative supported route, warm cache and route-response miss, with the service's indexed data initialized. Measure server request-to-first-result and browser input-to-first-result in the production-like reference environment, including normal transport; report distributions and maxima. A loading/progress/202 response alone does not satisfy this criterion. - [ ] The fast path does not require global optimality. A deterministic bounded deeper search can later improve net output, without delaying the initial response or resetting displayed receive values. Cold process initialization is measured separately and cannot masquerade as a warm/route-miss result. - [ ] A throwing/counting RPC/LCD provider proves **zero** request-triggered network calls across initial results, deeper search, references, tier/config resolution, refresh, frontend preflight and route confirmation. Independently scheduled ingestion has bounded concurrency, retries and per-provider rate limits; no request can force an extra ingestion pass. - [ ] Identical concurrent requests share expensive background work. Repeated requests actually reuse eligible caches; TTL expiry, tier/tax changes and market-generation changes cause bounded refresh instead of long blocking misses. - [ ] With fixed input, observations and constraints, refreshes return consistent routes, receive amounts and impact. Market changes may legitimately change them; tests explain the source through internal evidence, without new retail diagnostic chrome. - [ ] Quote display, net impact, preflight, confirmation and signed operations refer to the same generation, input, net semantics and route. Expert mode and refresh races cannot bypass execution floors tied to the same eligible cached observations. - [ ] If no route is eligible, keep submission blocked with one short accurate error and the appropriate existing action. Do not blame size or recommend pay/10 without evidence that reduction helps. - [ ] Add a focused `make verify-issue-<this issue>` with performance, selection, caching, refresh and abuse regressions; update current optimality/budget docs and agent guidance. ## Test plan: functional paths | Paths/scenario | Required evidence | | --- | --- | | CL8Y→USTR at 0.01, 0.1, 1, 5 and larger offers | 18→6→18 raw-unit correctness; compare thin cLUNC and deep cUSTC/UST1 paths at identical observations; verify emitted operations and net ranking. | | Native LUNC/USTC→USTR and wrapped equivalents | Wrap fee/tax/input conversion accounted exactly once; eligible alternative selected, minimum receive and signing parity preserved. | | USTR reverse direction and receive-target mode | Correct local-cache target sizing and cache separation; explicit unsupported failures, no gross or RPC fallback. Preserve separately existing contract/provider inverse-query budgets. | | Direct, multi-hop, pool-only, declared hybrid/book, taxed and hook-aware routes | Valid baseline retained; optimizer compares execution-aligned plans; tiny/dust/zero output and genuinely insufficient liquidity fail safely. | | More than five plausible paths; useful corridor beyond the original shortlist/32-path order | Quality-aware bounded admission includes useful alternatives; shuffle pair addresses/insertion order without arbitrary degradation; preserve deterministic ties. | | Deep AMM vs better executable small book; thin pool with favorable genuine rate | Liquidity is an admission heuristic, not a rule overriding better net economics; no blanket cLUNC/USDT ban. | | Fixed amount refresh across 12/15/30/90-second boundaries | Test controlled clocks, unchanged snapshots, changing books/reserves, unavailable enrichment and previously cached fields; no artificial 8% jumps. | | Missing/stale mirrors or ingestion provider failures; recovery from 404/408 | Healthy alternative succeeds when available; baseline remains visible; no live-query fallback anywhere in quote/deeper-search/preflight; ingestion failure cannot cause request-time query storms. | | Initialized local data with all RPC/LCD access disabled | Direct and two-hop candidates scored in milliseconds; useful quote <250 ms; no remote reference solve, discount/config lookup, router simulation or frontend preflight query occurs during initial quoting, deeper search, refresh or route confirmation. | | Warm/miss/expiry, same-key bursts, different offers/tiers/modes | Actual hits, single-flight counters, invalidation and bounded background work; no amount bucket or actor/tier cross-contamination. | | Fast typing, token reversal, disconnect/reconnect, confirmation open, search improvement | Old/cancelled results cannot replace newer input; reviewed signing snapshot remains pinned. | | Desktop and phone Swap/Trade | Useful first quote <250 ms; one applicable compact blocker/action; no duplicate diagnostics or new routing controls. | Use deterministic Rust/DB fixtures and mocked clocks/providers first; run browser integration with controlled network latency and a read-only production reproduction separately. Include a meaningful >5-path quality benchmark and unchanged-snapshot refresh fixture, rather than tests that merely mirror sorting code. ## Test plan: attack, hack and abuse - Dense graph, address-order poisoning and many dust pools: fixed work/memory/job budgets, reachable-goal pruning, route diversity and deadline/cancellation remain effective. - Spoofed UST1/cUSTC/USDT symbols, malicious/misleading USD marks, manipulated shallow reserves or resting orders: identity by validated contract; no oracle/TVL-only preference; check executable net output against eligible cached observations before signing, with zero RPC/LCD queries. - Mixed 6/18 decimals, hostile decimals, overflow, huge raw inputs, dust floors and nonlinear book/tax thresholds: checked wide integer calculations; no implausible output, float-derived executable amount or cached linear extrapolation. - Stale/reference-cache poisoning, failed refresh retaining old impact, tier/sender/funding/chain collisions: isolate/invalidate correctly; no stale result relabeled fresh or weaker floor reused. - Request floods, rapid cancellation, slow LCD/DB, crashed background workers: coalescing/admission limits; bounded outstanding tasks and cache growth; no retry storms or indefinite loading. - Forged/mismatched route operations, repeated capable assets, unsupported hooks, changed tax config, pause/blacklist/frozen pairs: fail closed with no signing or wallet-budget bypass. - Refresh during confirmation and forced Expert mode: no route substitution, ≥99% bypass or missing positive floor; rejected execution rolls back balances/reserves atomically. - Untrusted symbols/errors/progress payloads: render as text, redact actor identifiers, no XSS/SSRF or credential exposure. ## Verification criteria and investigation results Record revision, UTC timestamp, exact command, meaningful test counts, request/quote generations, cache counters, snapshot identity and latency distributions. Performance evidence must include initial useful output and later improvement timings, not just asynchronous acknowledgement latency. Source checks do not establish deployment. Completed before filing: - `make verify-issue-1398`: **PASS**, 7 verification groups, 0 failures/skips; focused retest, full contract workspace, frontend quote/signing and formatting/docs checks. - `cargo test --manifest-path indexer/Cargo.toml --lib api::route_paths -- --test-threads=1`: **13 passed**. - Same command with `api::route_slippage`: **3 passed**; with `api::best_execution`: **9 passed**. - `make verify-issue-1257`: **FAIL**, 3 groups passed/3 failed. Its frontend token-registry test encountered the local CL8Y env override; a correct mainnet `VITE_CL8Y_TOKEN_ADDRESS` retest of its five frontend suites passed **122/122**. The verifier's source grep and route-solver optimality documentation checks still fail; do not report the aggregate verifier green. - Public indexer route/pair probes described above are completed; no signing or production mutation. Unavailable investigation checks do not hold issue creation: direct public LCD smart queries returned HTTP 403, so independent on-chain reserve/path comparison and the exact historical percentages remain unverified. No production signing/device acceptance was attempted. Implementing this issue must add the missing deterministic quality, refresh and **<250 ms** regressions, then verify the deployed frontend/indexer on the same route corpus. Keep unresolved executed failures visible.
PlasticDigits changed title from fix(indexer): return cached USTR routes under 250 ms and improve executable route selection to fix(indexer): quote swaps under 250 ms from cached liquidity with zero request-triggered RPC 2026-10-09 06:58:20 +00:00
Author
Owner

Merge consolidation in progress at the user's explicit request, including WIP PR #1455. CI is intentionally skipped; unavailable review/status/verification holds are overridden without publishing fabricated PASS statuses.

Integration with #1454 exposed conflicts in Makefile and indexer/src/lcd/mod.rs. The resolution retains both verifier targets, provider admission/failover and background quote-ingestion pacing/body bounds, with both test modules. Inspection also found that the new local mirror loader still selected independent pool reserves when reading books: a newer pool height could erase a usable compatible book. The combined implementation now retains the separately committed hybrid generation at its original age, and uses current pool-only observations when that hybrid is stale/missing. A disposable-DB regression covers independent pool advancement and original hybrid age.

Full focused local verifiers for #1452 and #1453 are running against the combined source. Final counts, revision and remaining implementation scope will follow. This comment does not claim deployment or complete acceptance of the documented unsupported tax/hook/manual-split/wrap modes.

Merge consolidation in progress at the user's explicit request, including WIP PR #1455. CI is intentionally skipped; unavailable review/status/verification holds are overridden without publishing fabricated PASS statuses. Integration with #1454 exposed conflicts in `Makefile` and `indexer/src/lcd/mod.rs`. The resolution retains both verifier targets, provider admission/failover and background quote-ingestion pacing/body bounds, with both test modules. Inspection also found that the new local mirror loader still selected independent pool reserves when reading books: a newer pool height could erase a usable compatible book. The combined implementation now retains the separately committed hybrid generation at its original age, and uses current pool-only observations when that hybrid is stale/missing. A disposable-DB regression covers independent pool advancement and original hybrid age. Full focused local verifiers for #1452 and #1453 are running against the combined source. Final counts, revision and remaining implementation scope will follow. This comment does not claim deployment or complete acceptance of the documented unsupported tax/hook/manual-split/wrap modes.
Author
Owner

Combined-source sanity results before the explicitly requested WIP merge:

  • 632 indexer library tests pass; the manual discovery-cache benchmark runs. The new four-test socket suite passes twice, including the #1452/#1453 compatible-generation regression; measured socket maxima were under 56 ms. Focused frontend quotes/signing: 181 tests pass twice; types/formatting/secret scan pass.
  • make verify-issue-1452: 13 PASS / 1 FAIL / 0 SKIP. Its first controlled browser passes; the second records one 3,866.9 ms desktop Swap outlier (all cases have zero provider calls and zero page errors). An independent browser retest passes all 40 quotes with a maximum of 100.5 ms. Preserve the failed timing receipt; this retest is not a claim that every run meets the budget.
  • npm run test:unit: 2,948 PASS / 137 FAIL across 357 files (11 failing files). These failures include fixtures still loading the factory instead of getAllPairsPaged, expecting LCD/direct-pair quoting/execution or removed acquisition copy. TokenSearchSelect passed an isolated retest; the acquisition-copy assertion remains failed. The broad suite remains FAIL, not SKIP.
  • make verify-issue-1453: 10 PASS / 2 FAIL / 2 SKIP. Provider/book/valuation/discovery library groups, 73 dedicated liquidity/feed DB tests per pass, 97 frontend tests per pass and four browser checks pass. Both failed groups are the legacy api_route_solve_db_hybrid suite: 2 PASS / 8 FAIL per pass because its uninitialized old request-time solver fixtures now receive explicit 503 instead of live-fidelity answers. That fixture migration and current local corpus belong here.
  • Database-isolation checks expose an obsolete api_health assertion: a malformed query without token_in expects an attestation-driven 503, but the local request parser returns 400 before any RPC. The optional authenticated runtime fixture initially failed because our newly provisioned disposable cluster also granted the runtime access to its application DB; revoking that exact synthetic grant makes both retests pass. No shared/production DB was changed.

The user explicitly requested merging WIP and overriding CI/review/verification holds. Executed failures remain recorded as FAIL. This issue remains open for substantive implementation, not verification alone: community-tax forwards, deducting-hook inverse, explicit manual split, zero-hop wrap/unwrap, incremental admission of large configuration populations and complete authoritative actor-inventory recovery remain unfinished. Also migrate the existing route/page/health regression fixtures to the current contract while retaining meaningful URL, decimals, tax, abuse and signing assertions; classify actual product regressions separately rather than deleting tests or relaxing protections.

Deployment/live latency/provider recovery/history reconstruction is tracked in #1456. Existing #1449 continues DeFiLlama deployment/reconciliation. Full source and scoped receipts will be committed under docs/qa/merge-2026-10-09/.

Combined-source sanity results before the explicitly requested WIP merge: - 632 indexer library tests pass; the manual discovery-cache benchmark runs. The new four-test socket suite passes twice, including the #1452/#1453 compatible-generation regression; measured socket maxima were under 56 ms. Focused frontend quotes/signing: 181 tests pass twice; types/formatting/secret scan pass. - `make verify-issue-1452`: 13 PASS / 1 FAIL / 0 SKIP. Its first controlled browser passes; the second records one 3,866.9 ms desktop Swap outlier (all cases have zero provider calls and zero page errors). An independent browser retest passes all 40 quotes with a maximum of 100.5 ms. Preserve the failed timing receipt; this retest is not a claim that every run meets the budget. - `npm run test:unit`: 2,948 PASS / 137 FAIL across 357 files (11 failing files). These failures include fixtures still loading the factory instead of `getAllPairsPaged`, expecting LCD/direct-pair quoting/execution or removed acquisition copy. `TokenSearchSelect` passed an isolated retest; the acquisition-copy assertion remains failed. The broad suite remains FAIL, not SKIP. - `make verify-issue-1453`: 10 PASS / 2 FAIL / 2 SKIP. Provider/book/valuation/discovery library groups, 73 dedicated liquidity/feed DB tests per pass, 97 frontend tests per pass and four browser checks pass. Both failed groups are the legacy `api_route_solve_db_hybrid` suite: 2 PASS / 8 FAIL per pass because its uninitialized old request-time solver fixtures now receive explicit 503 instead of live-fidelity answers. That fixture migration and current local corpus belong here. - Database-isolation checks expose an obsolete `api_health` assertion: a malformed query without `token_in` expects an attestation-driven 503, but the local request parser returns 400 before any RPC. The optional authenticated runtime fixture initially failed because our newly provisioned disposable cluster also granted the runtime access to its application DB; revoking that exact synthetic grant makes both retests pass. No shared/production DB was changed. The user explicitly requested merging WIP and overriding CI/review/verification holds. Executed failures remain recorded as FAIL. This issue remains open for substantive implementation, not verification alone: community-tax forwards, deducting-hook inverse, explicit manual split, zero-hop wrap/unwrap, incremental admission of large configuration populations and complete authoritative actor-inventory recovery remain unfinished. Also migrate the existing route/page/health regression fixtures to the current contract while retaining meaningful URL, decimals, tax, abuse and signing assertions; classify actual product regressions separately rather than deleting tests or relaxing protections. Deployment/live latency/provider recovery/history reconstruction is tracked in #1456. Existing #1449 continues DeFiLlama deployment/reconciliation. Full source and scoped receipts will be committed under `docs/qa/merge-2026-10-09/`.
Author
Owner

Both #1454 and WIP #1455 are now merged. Local main contains every original local/remote branch head and the resolved integration source; its fingerprint exactly matches the tested source. No stashed work exists. Other workers' three clean worktrees/branches remain intact.

Final source-level problems remain as recorded above; they are not converted to PASS or SKIP. Database isolation verifier ended at 24 PASS / 4 FAIL / 2 SKIP (two obsolete health-fixture failures and two interrupted unavailable published-bridge waits). Separate network retests pass internal bridge TCP/external rejection/host IPv4 confinement with explicit bridge-host/IPv6 skips, and the authenticated runtime-login fixture passes twice after correcting only our synthetic database grant.

#1453 is closed for its merged implementation; migration/deployment/live latency/provider/history work is tracked in #1456. This issue remains open because substantial tax/hook/manual-split/wrap/admission/inventory functionality is unfinished, plus current-contract fixture migration. The final audit-only direct push to protected main was rejected; #1457 publishes that receipt through the normal PR path with the user-authorized merge override. See the complete sanity and cleanup report.

Both #1454 and WIP #1455 are now merged. Local main contains every original local/remote branch head and the resolved integration source; its fingerprint exactly matches the tested source. No stashed work exists. Other workers' three clean worktrees/branches remain intact. Final source-level problems remain as recorded above; they are not converted to PASS or SKIP. Database isolation verifier ended at 24 PASS / 4 FAIL / 2 SKIP (two obsolete health-fixture failures and two interrupted unavailable published-bridge waits). Separate network retests pass internal bridge TCP/external rejection/host IPv4 confinement with explicit bridge-host/IPv6 skips, and the authenticated runtime-login fixture passes twice after correcting only our synthetic database grant. #1453 is closed for its merged implementation; migration/deployment/live latency/provider/history work is tracked in #1456. This issue remains open because substantial tax/hook/manual-split/wrap/admission/inventory functionality is unfinished, plus current-contract fixture migration. The final audit-only direct push to protected main was rejected; #1457 publishes that receipt through the normal PR path with the user-authorized merge override. See [the complete sanity and cleanup report](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/branch/main/docs/qa/merge-2026-10-09/README.md).
Author
Owner

Merge/sanity review of PR #1458 at 53853c9fb5 (2026-10-10 UTC): Forgejo reports mergeable and successful ci/woodpecker/pr/woodpecker. No source merge conflict is present.

The first broad frontend run executed all 3,097 tests: 3,095 passed and two failed. PairSearchSelect.issue350 pressed Enter after any getPairs call rather than waiting for the JADE search result; SwapPage.extraDebitSell asserted the token-balance message while the initial network-fee blocker was still displayed. Both passed on a focused one-worker retry (5/5 tests). These executed failures are retained; the integration will tighten the asynchronous test waits and rerun the full suite rather than treating them as skips.

The first bao-exec request failed because the cached workstation session had expired. The documented no-print certificate login restored access. fj now consumes the OpenBao PAT through stdin in a temporary private configuration removed after each command; no fetched credential is published.

Issue #1452 is already closed. Remaining unsupported execution semantics from this PR now have engineering follow-up #1459; they are not claimed complete or converted into verification skips. Deployment, live/reference-network/device acceptance and historical/provider reconciliation remain #1456 (DeFiLlama #1449). Per the explicit merge instruction, unavailable workflow holds will not block merging reviewed code; runtime floor, funding, blacklist, expiry and unsupported-model protections remain enforced. Final results and merge revision will follow.

Merge/sanity review of PR #1458 at 53853c9fb508620a0312a634f08d9e786c39199a (2026-10-10 UTC): Forgejo reports mergeable and successful ci/woodpecker/pr/woodpecker. No source merge conflict is present. The first broad frontend run executed all 3,097 tests: 3,095 passed and two failed. PairSearchSelect.issue350 pressed Enter after any getPairs call rather than waiting for the JADE search result; SwapPage.extraDebitSell asserted the token-balance message while the initial network-fee blocker was still displayed. Both passed on a focused one-worker retry (5/5 tests). These executed failures are retained; the integration will tighten the asynchronous test waits and rerun the full suite rather than treating them as skips. The first bao-exec request failed because the cached workstation session had expired. The documented no-print certificate login restored access. fj now consumes the OpenBao PAT through stdin in a temporary private configuration removed after each command; no fetched credential is published. Issue #1452 is already closed. Remaining unsupported execution semantics from this PR now have engineering follow-up #1459; they are not claimed complete or converted into verification skips. Deployment, live/reference-network/device acceptance and historical/provider reconciliation remain #1456 (DeFiLlama #1449). Per the explicit merge instruction, unavailable workflow holds will not block merging reviewed code; runtime floor, funding, blacklist, expiry and unsupported-model protections remain enforced. Final results and merge revision will follow.
Author
Owner

Additional merge sanity finding: strict verification of the existing local smartcontracts/artifacts/build-provenance.json with scripts/ci/build-provenance.py failed (provenance mismatch: source_commit). Its historical revision is 3ba788949a, while review source is #1458 at 53853c9f.

Independent byte comparisons found all 170 recorded contract source inputs unchanged. Three external build-recipe inputs differ (docker/frontend/Dockerfile, docker/indexer/Dockerfile, scripts/ci/build-indexer-release.sh), and the existing pair/token wasm output hashes differ from this old receipt. Their current hashes do match the tracked checksums.txt. This is insufficient to claim a valid current release provenance receipt; the failed strict check is retained and not converted to PASS. The PR itself changes no contract source.

Before deployment, regenerate/review release artifacts and exact provenance for the final consolidated revision through the normal reproducible build, retaining the historical receipt rather than relabeling it. Track this with the existing build/policy/deployment work in #1456. Local synthetic chain checks can establish behavior of the exact tested checksums separately; source merging does not establish release artifact provenance or production deployment.

Additional merge sanity finding: strict verification of the existing local smartcontracts/artifacts/build-provenance.json with scripts/ci/build-provenance.py failed (provenance mismatch: source_commit). Its historical revision is 3ba788949a6adbfd7260e95062ff72fa5f503a4c, while review source is #1458 at 53853c9f. Independent byte comparisons found all 170 recorded contract source inputs unchanged. Three external build-recipe inputs differ (docker/frontend/Dockerfile, docker/indexer/Dockerfile, scripts/ci/build-indexer-release.sh), and the existing pair/token wasm output hashes differ from this old receipt. Their current hashes do match the tracked checksums.txt. This is insufficient to claim a valid current release provenance receipt; the failed strict check is retained and not converted to PASS. The PR itself changes no contract source. Before deployment, regenerate/review release artifacts and exact provenance for the final consolidated revision through the normal reproducible build, retaining the historical receipt rather than relabeling it. Track this with the existing build/policy/deployment work in #1456. Local synthetic chain checks can establish behavior of the exact tested checksums separately; source merging does not establish release artifact provenance or production deployment.
Author
Owner

Timestamp correction: the earlier merge review comment used the Seoul calendar date (2026-10-10) and incorrectly labelled it UTC. The actual make verify-issue-1452 receipt starts at 2026-10-09T23:12:25Z; canonical verifier/browser/Git receipts use their recorded UTC timestamps. Test outcomes and revisions are unchanged. The final consolidation report will include the exact UTC window.

Timestamp correction: the earlier merge review comment used the Seoul calendar date (2026-10-10) and incorrectly labelled it UTC. The actual make verify-issue-1452 receipt starts at 2026-10-09T23:12:25Z; canonical verifier/browser/Git receipts use their recorded UTC timestamps. Test outcomes and revisions are unchanged. The final consolidation report will include the exact UTC window.
Author
Owner

Merge work complete: #1458 merged normally as c8b29eb0f7. Three asynchronous frontend assertions were corrected in c923aab0; all 3,097 frontend tests and 999 contract tests pass. The quote verifier passed 14/0/0; all related local verifiers completed with zero failed groups and explicit unavailable skips. Hosted Woodpecker pipeline 377 passed all six required steps for exact head c923aab015.

Final consolidation audit retains exact commands, revisions, UTC timestamps, latency samples, historical failed frontend attempts and current skip/failure scope. The interrupted Compose published-loopback probe is retained; its final full verifier passed 28/0/2 using the documented host-bridge/IPv6 skips, while authenticated roles, internal TCP, confinement and ACL checks passed.

The old local optimized-wasm provenance receipt still fails strict verification; regenerate/review release artifacts before deployment under #1456. Current source testing and hosted CI do not erase that failure or establish deployed acceptance. Remaining wrapper-floor, stateful cooldown/AutoLP, uncensused tax-wallet and composed inverse implementation is tracked in #1459. Original #1452/#1453/#1354 were already closed; no issue is held open solely for verification.

Origin rejected direct protected-main publication of the documentation audit. Audit PR #1460 then hit fj HTTP 405 for its pending fresh CI context. The explicitly authorized single-PR force_merge override published these documentation-only receipts; no branch-protection setting changed and no new CI pass is claimed for the audit commit. Product source exactly matches the tested #1458 head.

Local main now matches origin at 736be44410. Both remotes were fetched/pruned; every local/remote branch head is included, with no active stashes or uncommitted work. Four existing worker worktrees/branches are preserved. The owned temporary audit branch and temporary chain/probe resources were removed.

Merge work complete: #1458 merged normally as c8b29eb0f7d07326a9745a444daff7ce76a8de4d. Three asynchronous frontend assertions were corrected in c923aab0; all 3,097 frontend tests and 999 contract tests pass. The quote verifier passed 14/0/0; all related local verifiers completed with zero failed groups and explicit unavailable skips. Hosted Woodpecker pipeline 377 passed all six required steps for exact head c923aab01589e39ae46fa2e1859d6c6b44528b1a. [Final consolidation audit](https://git.cl8y.com/code/cl8y-dex-terraclassic/src/commit/736be444100ba84887a6619336c83d2848258884/docs/qa/merge-2026-10-10/README.md) retains exact commands, revisions, UTC timestamps, latency samples, historical failed frontend attempts and current skip/failure scope. The interrupted Compose published-loopback probe is retained; its final full verifier passed 28/0/2 using the documented host-bridge/IPv6 skips, while authenticated roles, internal TCP, confinement and ACL checks passed. The old local optimized-wasm provenance receipt still fails strict verification; regenerate/review release artifacts before deployment under #1456. Current source testing and hosted CI do not erase that failure or establish deployed acceptance. Remaining wrapper-floor, stateful cooldown/AutoLP, uncensused tax-wallet and composed inverse implementation is tracked in #1459. Original #1452/#1453/#1354 were already closed; no issue is held open solely for verification. Origin rejected direct protected-main publication of the documentation audit. Audit PR #1460 then hit fj HTTP 405 for its pending fresh CI context. The explicitly authorized single-PR force_merge override published these documentation-only receipts; no branch-protection setting changed and no new CI pass is claimed for the audit commit. Product source exactly matches the tested #1458 head. Local main now matches origin at 736be444100ba84887a6619336c83d2848258884. Both remotes were fetched/pruned; every local/remote branch head is included, with no active stashes or uncommitted work. Four existing worker worktrees/branches are preserved. The owned temporary audit branch and temporary chain/probe resources were removed.
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#1452
No description provided.