From ace2c81ec682f1c48799985a50ed43674ef80b3a Mon Sep 17 00:00:00 2001 From: Flotapponnier <160007691+Flotapponnier@users.noreply.github.com> Date: Sat, 25 Jul 2026 14:32:22 +0200 Subject: [PATCH 1/2] fix(tqc): em dashes + ship to prod (#1420) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * solana cohort: solana-official logo alias, leorpc logo + light chip, registry entries * nft harness: keyless OpenSea mode, empty x-api-key header caused 401s (#1136) Co-authored-by: Florent Tapponnier * nft harness: delist rarible, free tier is 100 requests per month (#1137) Co-authored-by: Florent Tapponnier * robinhood chain: chains hub entry, chain-kpis, l2-block-time (HTTP poll mode), network-fees * bridge-monitor: on-chain balance fallback + degraded flag * bridge-monitor: self-healing metrics + slack notifiers * bridge-monitor: auto-rebalancer, corrective transfer via cheapest bridge * bridge-monitor: tier downgrade ladder + rebalancer wiring in pre-flight * bridge-monitor: stuck-fund reaper, hourly stranded gauge + corrective transfer * bridge-monitor: gas auto-top-up via LiFi same-chain swap, gated by default * bridge-monitor: unit tests for refill route, ladder, stranded hours; fix tracker reset * bridge-monitor: keyless dry-run support for reaper + RunDryRun * bridge-monitor: comment style cleanup in pre-flight docs * bridge-monitor: daily spend tracker keyed by UTC date, persisted; execution mutex primitive DailySpentUSD only ever incremented and was zeroed by every restart, so a crash-loop minted a fresh budget each time. The tracker resets exactly at UTC midnight, persists (date, spent) to SPEND_STATE_PATH (default ./spend-state.json, not /tmp) and is mutex-guarded. Also declares the package-level single-flight lock and the FAILED_TX_FEE_ESTIMATE_USD (default 0.50) helper for gas bled by failed broadcasts. * bridge-monitor: fix double-send on in-flight rebalance, slot-wide budget, single-flight lock Fund-loss fixes from hostile review: - a corrective transfer whose deposit broadcast but whose bridge status never resolved is now TERMINAL for the scheduler slot (funds are likely still in flight, a retry double-sends); only pre-broadcast failures may consume another attempt. executeOnBridge keeps TxHash on error paths so callers can tell the two apart. - ONE corrective-transfer budget (max 2) per scheduler slot, shared across all downgrade-ladder rungs (was per rung: up to 6 transfers per slot). - package-level execution mutex: scheduler slots own the wallets end to end, the reaper TryLocks and skips its tick instead of queueing. - broadcasts that failed or timed out after getting a TxHash book a flat FAILED_TX_FEE_ESTIMATE_USD against the daily cap instead of bleeding unaccounted gas; all spend goes through the persisted UTC-day tracker. - gas top-up now honors MaxDailySpendUSD before broadcasting. * bridge-monitor: SIMULATE_BALANCES only honored in dry-run mode The reaper (and any other consumer) used to accept simulated balances even in production with broadcast-capable keys, so phantom numbers could green-light real transfers. SimulateBalances now takes the execution mode and returns nil outside dry-run; startup logs a warning when the flag is set in a broadcast-capable mode. * tx executor: preserve hash on ambiguous send errors, split dry-run spend state * executor: add missing chain label, first real single-test panicked post-fill (#1141) Co-authored-by: Florent Tapponnier * bridge-monitor: point Mobula calls at demo-api.mobula.io (#1142) Co-authored-by: Florent Tapponnier * tokenized-stock-peg: bench 076, onchain tokenized equities vs Nasdaq reference (staging gated) * spec: missing store blob for a live bench throws instead of caching the miss (bnb-rpc awaiting incident) (#1144) Co-authored-by: Florent Tapponnier * tsp: parse the flat spark shape (close/timestamp arrays), log empty parses * tsp: drop invalid rank_matrix_query, 1m reference candles, fee-band + USDG methodology notes * rwa: new category, tokenized-stock-peg moves in, 11 equity logos + registry pages * rwa: xstocks-peg (077) + usdy-nav-basis (078), issuer label on the tsp metric family * rwa: complete product pages, hood/qqq/coin/orca/pyth logos + dual-issuer descriptions * registry: googl links to google.com, abc.xyz 403s aggressively * cardano: cache koios epoch params 1h (public tier was exhausted); stellar: protocol-minimum 5 reserves * fix(store+bridge-monitor): fail-fast on missing blob + sub-50ms histogram buckets (#1152) * spec: missing store blob for a live bench throws instead of caching the miss (bnb-rpc awaiting incident) * bridge-monitor: sub-50ms buckets + nanosecond precision on Observe Histogram Buckets grew from [50, 100, 200, 500, 1000, 2000, 5000, 10000] to [10, 25, 50, 100, 200, 500, 1000, 2000, 5000, 10000]. Near Intents on solver-cached corridors (HyperCore in particular) returns via a 1Click coordinator fast path in <50ms, and the previous scheme lumped every one of those observations into (0, 50] so histogram_quantile linearly interpolated to ~25ms regardless of true value. The p50 shown on /benchmarks/bridge-quote-latency?chain=HyperCore was therefore a bucket floor, not a measurement. Sub-50 buckets let the real bimodality surface. Also swap Observe(float64(quoteLatency.Milliseconds())) for Observe(float64(quoteLatency.Nanoseconds()) / 1e6) across all 6 per-bridge observers (across, debridge, lifi, mobula, nearintents, relay). int64 Milliseconds() truncates every sub-1ms round-trip to 0, same bug class as the RPC harness fix in PR #1128. Not a hot path here (network RTT dominates), but keeps precision consistent with the new low buckets and cheap to fix while we are already touching each file. Bench YAML methodology + FAQ updated to reflect the new bucket set. --------- Co-authored-by: Florent Tapponnier * fix: 3 machine-readable surface bugs (citable unit scaling, stat filters, draft asOf) (#1154) * fix: 3 machine-readable surface bugs surfaced by GEO audit 1. /api/citable/{date} unit scaling. Snapshot route emitted `value: 627` for `aggregator-head-lag` while the live /api/citable emitted `value: 0.63` on the same measurement. The live route already wraps with valueInDeclaredUnit(raw, b.unit) but the snapshot route was left with the raw internal-ms value. Wrap the same way; sub-1 s benches now render in the declared `s` unit on both routes. 2. /api/stat/{slug} silently ignored ?chain= / ?region= / ?kind= / ?venue=. getBenchmark accepted a filters object but the route never parsed the URL. A citer asking /api/stat/rpc-capabilities?chain=ethereum got the cross-chain aggregate. Parse the four dimension params, pass through to the loader; unknown values fall back to unfiltered inside the loader. Also widen getBenchmark options type to include kind and venue — the underlying loadBenchmark already supports both. 3. Draft benches leaked a fake freshness signal. Draft placeholder set lastRunAt to new Date for type safety (Benchmark.lastRunAt is non-null), and both citable routes passed it straight through as asOf. LLM crawlers treating asOf as ground truth would think a draft bench was measured every minute. Null asOf in the JSON when status is draft; the internal type stays intact. * fix: propagate draft-asOf null-out to /api/stat, MCP, JSON-LD dateModified The GEO audit review found the initial fix in commit f6f84b8 only covered the two /api/citable JSON surfaces, but the same "draft benches spoof freshness" class of bug lives on three more machine-readable channels that LLM crawlers also key on: - /api/stat/{slug} asOf field. - MCP tool responses (list_benchmarks, get_benchmark, resource template, and the plain-text "Last sample" line). - JSON-LD dateModified on the bench page, per-chain sub-page, answer page and alternatives page — Google, Bing, Perplexity all consume dateModified as a freshness ranking signal. Centralize the guard as citableAsOf(b) in @/lib/citation, rewire every call site. Draft benches now uniformly omit or null the freshness timestamp; live benches unchanged. On the visible /answers page, the "Data as of..." line and its