Skip to content

bridge quote benches (002, 264): headline was a random Prometheus cell; aggregated queries, EU-West pinned, meme route and exec quotes excluded, mean fixed, Mobula timing/auth, NI 3 s wait disclosed - #2532

Merged
Flotapponnier merged 1 commit into
devfrom
fix/bridge-quote-benches-aggregation
Sep 19, 2026

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Found by the 264 audit and confirmed on production bench 002: the recording rules keep chain/region/amount labels, the spec queries filtered on bridge only, and prom.scalar took result[0] (Go map order) → a different cell on every render (prod showed Mobula p99 4172 vs p90 57; Near Intents p99 < p90).

  • Every quantile query: histogram_quantile(q, sum by (le) (...)); mean sum/sum (the clamp_min(rate,1) made it 300x too small); success avg; n round(sum(increase)). One deterministic series (Mobula 43.7 / 345.8 / 982.6 ms).
  • Region pinned to eu-west (us-east probe is live, copy said paused).
  • Rules exclude the R4 TRUMP→BRETT meme route and the $3/$30 exec-path quotes; generic rules file now versioned in the repo.
  • Harness: exec-path quotes to their own histogram; Mobula stopwatch after body read; Mobula key in header; finer 1–5 s buckets.
  • NI's fixed 3 s solver wait disclosed; Robinhood / Across / NI coverage copy corrected.

Deployed on the VPS. This one should go to main (002 is live in prod with the random draw).

🤖 Generated with Claude Code

https://claude.ai/code/session_01HJgbZCqjR4nvCfcJSzofbw

…ies now aggregate the recorded cells, region pinned to EU-West, meme route and execution-path quotes excluded, mean fixed, Mobula timed like the others and keyed by header, Near Intents' fixed 3 s wait disclosed

ocb-bench-audit on bridge-quote-latency-solana (and confirmed on the
production bridge-quote-latency page):

- Blocker: the recording rules keep (bridge, region, chain, amount_usd)
  and the spec queries selected on bridge only, so
  histogram_quantile(...{bridge="mobula"}) returned 39 series and
  prom.scalar took result[0], which Prometheus orders by Go map
  iteration. The live production page read Mobula p50 31 / p90 57 /
  p99 4172 ms and Near Intents p99 108 below p90 4700: a different cell
  on every materialization. Every p50/p90/p99 query is now
  histogram_quantile(q, sum by (le) (...)), mean is
  sum(rate_sum)/sum(rate_count) (the previous clamp_min(count_rate, 1)
  floored a per-second rate to 1 and printed ms per second, 300x too
  small), success is avg(...), n is round(sum(increase)). Verified on
  the VPS Prometheus: one series, Mobula 43.7 / 345.8 / 982.6 ms, mean
  118.3.
- Region pinned to eu-west on every headline query: the us-east probe is
  live (the copy said paused) and was part of the random draw; sgp is
  down. Copy corrected on both specs.
- Rules (infrastructure/monitoring/prometheus/recording_rules/
  ocb_bridge_quote.yml, source of truth for the VPS file that was only
  on the host, and ocb_bridge_quote_solana.yml) exclude the R4 TRUMP to
  BRETT meme route the same loop quotes (it pooled a cross-asset swap
  into the Base USDC cells: Mobula 34.6 ms USDC-only vs 139.3 pooled)
  and the $3 / $30 execution-path quotes.
- Harness: execution-path quote latency goes to its own histogram
  (bridge_exec_quote_latency_ms); Mobula's stopwatch stops after the
  body is read like the five other providers; the Mobula key travels in
  the Authorization header instead of the query string (a transport
  error wrapped the full URL into the log and Slack); the quote
  histogram gains 500 ms buckets between 1 and 5 s.
- Near Intents: its dry quote waits a fixed 3 s solver window
  (quoteWaitingTimeMs: 3000), so its row measures that wait; disclosed
  in the methodology and the finding, the "bimodal, sub-100 ms" claim
  removed. Robinhood coverage bullet (four providers quote it now) and
  the Across / Near Intents coverage (Base and Arbitrum only, our maps)
  corrected.

Deployed: rules reloaded (promtool 6 + 5), harness rebuilt, Mobula
quotes verified with header auth. validate 236, go vet/build/test.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HJgbZCqjR4nvCfcJSzofbw
@Flotapponnier
Flotapponnier merged commit dcd91e8 into dev Sep 19, 2026
1 check failed
@Flotapponnier
Flotapponnier deleted the fix/bridge-quote-benches-aggregation branch September 19, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants