Repository navigation
Conversation
|
@coderabbitai full review |
|
@rain-marvin review |
|
🔎 Reviewing |
✅ Action performedFull review finished. |
There was a problem hiding this comment.
Adds per-chain inventory metrics to the bot's /metrics: equity available per chain and symbol, USDC available, in flight and vault ratio per chain, and the USDC corridor target and deviation bands from config. To do this, the inventory view now marks which onchain slots a vault snapshot has read (unpolled_onchain), carries that marker through resets, and stores the set of hedged chains so a chain dropped from config stops showing.
Overall read: the change looks correct and contained. Trading readers of the view keep the same balances. The new marker survives hydration and the reset paths, and the ratio, label and unit handling match SPEC.md and docs/observability.md. No lane found a blocker. Two minor points: per-chain equity has no in-flight series, which matters before Stage 4 moves the probe to these names, and hedged_chains is boot config held in the mutable trading view, where its doc comments also say the dashboard reads it.
Panel note: Cursor was out of usage and flash 3.7 was unavailable, so the specialist lanes ran on sol 6.1. Rust tests were not run in the read-only checkout.
claude-opus-5-5 · high · 11 min
48e0cdb to
937fae0
Compare
bf6bb73 to
252fae1
Compare
|
@coderabbitai review |
|
@rain-marvin review |
|
🔎 Reviewing |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
This PR publishes each hedged chain's vault balances as new liq_ series (liq_equity_chain_available, liq_usdc_chain_{available,inflight,ratio}) and the band of every configured USDC corridor (liq_usdc_corridor_{target,deviation}). To do that it ports the poll marker from #1657: an onchain slot counts as a reading only after a vault snapshot set it, and both reset paths carry that marker.
Overall read: sound. The snapshot paths all clear the marker, a slot that a fill, transfer or inflight created first stays marked, and the resets carry it. The view is not persisted, so the new serde(default) fields carry no upgrade risk. The ratio is absent until the broker cash is read, and the unit warning is in the HELP text and docs, so the earlier threads hold. A claim that /metrics now leaks business data was checked and dismissed: the same kinds of values were already on that route, and the PR adds no real values to the repository. Two small comments below. Separately, the Decisions section says #1657 will drop these parts when it rebases, but #1657 was closed on 2026-10-09 without a merge, so that line is out of date.
claude-opus-5-5 · high · 42 min
|
@coderabbitai approve |
✅ Action performedComments resolved and changes approved. |
|
@JuaniRios 🔔 Follow-up: a day after my review @JuaniRios, #1679 hasn't moved since my review. The bots are done: every review thread is resolved, and CodeRabbit and I both approved It's waiting on two human approvals:
Next step: ask @rouzwelt to re-approve #1679 and to review #1673, then sync the stack so #1673 is up to date with claude-opus-5-5 · high · 1 h 1 min |

Part of RAI-3087.
Adds per-chain inventory series and the USDC corridor bands. Item 2 of the RAI-2998 stack, part 2 of 3.
Live effect: new series
liq_equity_chain_available{symbol,chain},liq_usdc_chain_{available,inflight,ratio}{chain}andliq_usdc_corridor_{target,deviation}{chain}on the bot's/metrics; no existing name changes · Risk: low (inventory view logic for a new read path; no trading decision reads it) · Ships: on the next bot releaseWhy
The exporter names only show the primary chain. Robinhood equity rebalancing is on, so the probe undercounts. These new names give each hedged chain's vault on its own, and Stage 4 moves the probe to them.
Decisions
unpolled_onchainmarker,polled_onchain(), the carried-slot reset plumbing,hedged_chainsandUsdcCorridors::configured(). feat: per-chain balances, corridor bands, and trade price in the dashboard DTO #1657 will need to drop these parts when it rebases.liq_usdc_chain_ratiois that vault's available USDC over itself plus the gross broker cash. It is absent until the gross broker cash is read, and while both are 0 (no 0 or 1 default, per the SPEC Values rule). It is not the rebalancer's trigger ratio. inventory.rsRisks
liq_equity_chain_availableis in that chain's wrapped vault shares, and each chain's wrapper has its own underlying per share. Do not sum it across chains or add it to broker shares. The HELP text and the docs say so. liquidity.rsProof
Merge conditions
None new beyond the stack below.