Rates Engine v0.5.0-rc.87
Pre-release
Pre-release
·
437 commits
to main
since this release
[v0.5.0-rc.87] — 2026-05-28
Tested against Stellar Protocol 23 (Whisk).
Per-source coverage bundle. The rc.85/rc.86 series shipped data-derived gap detection against the single soroban_events landing zone. This release generalises that signal to every per-source hypertable, adds the orchestrator that closes a cascade in one operator command, and locks the discipline in with an ADR + lint guard so future per-source tables can't slip past the detector.
Pre-deploy operator note: api + aggregator + ops binaries together. No migrations. The aggregator restart triggers a fresh first-cycle scan that emits the new per-(source, table) gauges within ~5-7 min.
Added
ratesengine-ops drain-cascade-windoworchestrator subcommand. One operator command runs all seven existing per-source*-backfillsubcommands (sep41-transfers, cctp, rozo, soroswap-skim, comet-liquidity, blend, phoenix) over a[from, to]range in series, with{--output text|json}per-source result. Default--halt-on-error=falsekeeps a single decoder failure from stranding the other six;--sources blend,phoenixrestricts to a subset. Replaces the seven-subcommand copy-paste loop currently required to repair a cascade window. New runbookdocs/operations/runbooks/cascade-window-drain.mdand cross-link fromingest-gap-detected.md. Sources without a dedicated subcommand (aquarius, reflector-*, redstone, soroswap-main, soroswap-router, defindex) need their own subcommands in a future PR; out of scope here.- Per-source data-derived gap detection (14 targets). The gap-detector goroutine now iterates every registered per-source hypertable each cycle, not just
soroban_events. Newinternal/storage/timescale/per_source_gaps.goexportsGapDetectorTarget+DefaultGapDetectorTargets(the registry) +FindPerSourceLedgerGaps(the parameterised LAG()-over-DISTINCT scan). 13 Soroban-era targets + SDEX (filtered via the newWhereFilterfield onGapDetectorTargetso the trades hypertable's SDEX slice scans cleanly). Per-target 15-min timeout means one slow scan can't poison the rest of the cycle; each target emits its ownruns_total{table=...,outcome=...}counter so operators can tell "this one target wedged" from "the whole worker died."find-data-gaps --source <name|all|csv>now scans the chosen target set. - SDEX data-derived coverage signal. Closes the only remaining unmonitored data path — the classic-DEX ingest pipeline doesn't flow through
soroban_eventsand previously had zero data-derived coverage. New runbookdocs/operations/runbooks/sdex-gap-detected.md. - ADR-0030 per-source coverage invariant + lint guard.
TestGapDetectorTargetsCoverAllPerSourceHypertablesintrospectsmigrations/*.up.sqlforCREATE TABLEstatements matching the per-source naming pattern and fails CI if any are unregistered. Caught two real bugs on first run:sdex_offer_events(now registered as thesdex-offerstarget) andapi_usage_events(exempted as HTTP usage logging, not Stellar-network ingest). The ADR codifies three sub-decisions: data-derived headline density (separate PR),{source, table}label set, and identifier-interpolation safety contract.CONTRIBUTING.md+AGENTS.mdget the discipline as a connector-addition checklist.
Changed
- Metric labels on
ratesengine_ingest_gap_{ledgers,count,max_size_ledgers}and the detector meta-metrics extended from{source}to{source, table}. Alert ruleratesengine_ingest_gap_detectednow aggregates viamax by (source)so paging dedup behaviour is unchanged. Histogram buckets forratesengine_ingest_gap_detector_duration_secondsextended to 600s — the live r1 soroban_events scan is ~300s and the old 60s cap put every healthy scan in the overflow bucket.