Skip to content

[Tracking] Deployed preview state — split-source, do not merge#94

Draft
alastairong1 wants to merge 5 commits intomainfrom
alastair/comprehensive-health-endpoint
Draft

[Tracking] Deployed preview state — split-source, do not merge#94
alastairong1 wants to merge 5 commits intomainfrom
alastair/comprehensive-health-endpoint

Conversation

@alastairong1
Copy link
Copy Markdown
Contributor

@alastairong1 alastairong1 commented Apr 28, 2026

Purpose

This is a tracking PR, not for merge. It captures the full state currently deployed to https://api.preview.st0x.io so the per-topic PRs below can be reviewed against a single source of truth.

Once the per-topic PRs land in dependency order, this branch becomes redundant and the PR can be closed.


What's in the deployed branch

Built on top of b1ebea3 (the now-reverted direct push). Includes:

Already committed (4 commits ahead of pre-revert main):

Snapshot commit on top (e77b2a1):

  • cache_warmer background task + supporting caches (block_number, limit_ratio, stale_price_skip, swap_quote)
  • market_calendar for NYSE-hours awareness
  • Ops tooling: docs/ops.md, scripts/smoke.sh, scripts/uptimerobot-setup.sh → covered by Add ops cheat sheet and smoke/uptime monitoring scripts #96
  • RPC override config (config/rest-api.toml, flake.nix, os.nix)
  • direct_trades_fetcher extensions (~339 more lines)
  • Health endpoint additions for cache_warmer status
  • DB pool tweaks, route adjustments

Per-topic split — status

✅ Landed PRs (single-topic, clean against current main)

🟡 Already-open, in-flight PRs that need to land first (the reverted direct-push work)

Plus the upstream foundation already in flight by @findolor:

🔴 Blocked work — needs the chain above to land before clean cherry-pick is possible

These commits exist on the deployed branch but cannot be cleanly cherry-picked onto current main because they depend on hundreds of lines of structural changes (caching foundation, trades module restructure, order endpoint refactors) carried by the in-flight PRs. Attempting cherry-pick produces large multi-file conflicts.

⚠️ Submodule warning

lib/rain.orderbook has local modifications not committed inside the submodule itself (~13 files modified, see snapshot commit message). The submodule pointer in this snapshot is unchanged at 57253129e, so any per-topic PR depending on those upstream changes will fail to build until the submodule changes are landed (likely via a fork branch + pointer bump in this repo).


Recommended merge order

  1. Land foundation: Implement GET /v1/trades/tx/{tx_hash} endpoint #50Implement GET /v1/trades/{address} endpoint #51Add in-process endpoint caching with moka #54 (@findolor's stack)
  2. Land alastair's PR stack: Neutralize metaboards (~5s per request saved) #86Nginx hardening + infra updates #87Order perf: SDK output-vault filter + quote timing #88Order endpoint caching (depends on #54) #89DirectTradesFetcher module (depends on #50, #51) #91Taker + batch trade endpoints (depends on D, #50, #51) #90
  3. Cherry-pick blocked commits onto fresh main as separate single-topic PRs
  4. Push submodule changes as a fork branch + pointer-bump PR
  5. Open per-topic PRs for cache-warmer system, swap-quote cache, RPC override, direct-trades extensions
  6. Close this tracking PR

cc @findolor for visibility and review.

alastairong1 and others added 5 commits April 22, 2026 10:52
Return the ABI-encoded order bytes in order list responses so the
frontend can decode OrderV4 directly without a separate Raindex
hydration round-trip. Matches albion.rest.api which already returns this.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…history

Enables the frontend to fetch trades for a specific token instead of
all trades globally. Uses GetOrdersTokenFilter to find orders where the
token appears as input or output, then batch-fetches trades via
DirectTradesFetcher with time-range filtering and pagination.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add max_output field to OrderSummary populated from the on-chain quote
simulation's formattedMaxOutput. Falls back to output_vault_balance when
no quote is available. This allows the frontend depth chart to show
accurate per-epoch availability for DCA/strategy orders instead of
the full vault balance.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The existing /health endpoint only returns {"status":"ok"} without
checking actual system health. The new GET /health/detailed endpoint
reports app DB connectivity, raindex DB connectivity, and per-orderbook
sync progress (last synced block, updated_at timestamp, latest trade
age). This enables diagnosing sync stalls like the Apr 17 stoppage.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit captures the working-tree state currently deployed to
api.preview.st0x.io, prior to splitting it into single-topic PRs.

Includes:
- cache_warmer + supporting caches (block_number, limit_ratio,
  stale_price_skip, swap_quote)
- market_calendar
- ops tooling (docs/ops.md, scripts/smoke.sh, uptimerobot-setup.sh)
- RPC override config
- direct_trades_fetcher extensions
- Health detailed endpoint additions for cache_warmer status
- Various route + infra adjustments

NOTE: lib/rain.orderbook submodule has local modifications that are
not committed inside the submodule itself; the submodule pointer in
this commit is unchanged. Those upstream changes need separate
handling before any per-topic PR can build cleanly against main.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 34055f7f-d3fc-4090-b199-34a7abcb51f8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch alastair/comprehensive-health-endpoint

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

1 participant