Add onchain_executor: on-chain actions through the Aomi Pipeline (stage → simulate → commit) - #230
Open
CeciliaZ030 wants to merge 14 commits into
Open
CeciliaZ030 wants to merge 14 commits into
CeciliaZ030 wants to merge 14 commits into
Conversation
…ns through Aomi A connectorless executor type that walks one Aomi Pipeline lifecycle (stage or build → fork simulate → risk check → commit → confirm) one phase per control tick. It never holds a connector (USES_CONNECTORS = False skips market preparation), commits at most once (the Build digest is the idempotency key, so a retry after a lost response replays instead of re-sending), and reports a structured custom_info (wallet, digest, simulation evidence, tx hashes, error) without the transaction_hash/position_address keys the service reads as Gateway swaps or orphaned LP positions. Config: AomiSettings (AOMI_URL, AOMI_TOKEN, AOMI_TOKEN_FILE). Registered in EXECUTOR_REGISTRY, EXECUTOR_TYPES, and /executors/types/available; the config schema endpoint serves the pydantic model unchanged. Tests: config validation, phase machine with a fake Pipeline client, service registration and persistence, and an integration test against a live API (marker: integration). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…kill-scoped operations Operation mode now consults the shared Aomi policy (aomi.pipeline.policy) and rejects, at create time, anything that is not a build target: the Aomi chat harness's own plumbing (authorization, scheduling, threads, web search), the raw stage/simulate/commit primitives this executor drives itself, reads, and test fixtures. A bare operation with app=default and exactly one skill named resolves into that skill's catalog, which is where protocol operations (Aave, Morpho, ...) live; a named app still wins. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…aries svm executors record connector_name solana-<cluster> and SOL-SOL instead of the EVM defaults, carry the cluster in custom_info, and project actions through the client's chain-agnostic summaries so wallet_address (the SVM payer) and the instruction programs are visible. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
CeciliaZ030
marked this pull request as ready for review
September 11, 2026 11:02
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Operator outcome
Adds an optional
onchain_executorfor Aomi Pipeline execution, verified Aave V3 lending, and shared Solana instruction execution. Jupiter Lend, Kamino Earn and PumpSwap preparation uses protocol-specific recipes in Aomi without adding a Hummingbot connector for each venue. An operator can preview a bounded supply, explicitly execute it, see actual confirmation evidence, and later withdraw through Condor. Completed lending transactions remain in a durable contribution ledger instead of disappearing from exposure history.Companion UI: hummingbot/condor#232. Gas estimation support: aomi-labs/product-mono#1070. Ready for maintainer review; operational boundaries and evidence are below.
Implementation
Connectorless execution: stage/build → simulate → risk check → commit → confirmation. Raw EVM calls and catalog operations remain available;
commit: falseruns without signing.Lending mode constructs exact Aave V3 approve/supply or withdraw calldata and verifies chain, wallet, target, amount, approval, recipient and call order before commit.
Commit retries reuse the original build digest as the idempotency key. Temporary account contention retries the same phase; changed/stale builds do not silently rebuild a reviewed transaction.
Estimated execution gas is valued in USDT independently of the display pair. A configured ceiling fails closed when the estimate or price is unavailable. The estimate excludes rollup data fees and provider surcharges; it is not a final signing fee cap.
Creation is persisted before execution starts. Completion-save failures retain the live result for retry.
/executors/lending/positionscombines full durable history with current Base USDC receipt-token balances, deduplicates receipt replays, preserves unknown submissions, and returns errors when history or balances are unavailable.Controller net contributions and wallet-wide receipt balances are separate. Deposits/withdrawals are position changes, not trading profit. An optional operator-owned Base USDC policy now validates exact wallet/market/controller grants and contribution limits under a PostgreSQL transaction lock before inserting the durable reservation. Pending supplies consume capacity; only confirmed withdrawals release it.
require_lending_policyprevents fallback if a grant is removed. This bounds recorded contributions, not all portfolio market exposure; Condor checks the grant, values USDC independently and includes durable contributions in its portfolio risk state.Docker clients initialize lazily so an Aomi-only API can start without Docker. Existing bot discovery still reports unavailable Docker.
Client dependency is pinned to public
aomi-labs/aomi-pythoncommitcaa72d5225dd60e482835e0341a91293d7549dd3(v0.1.3). README documents configuration and lifecycle limits.Solana preparation binds the registered Aomi app identity and connected wallet. It returns unsigned instructions without staging or committing. The shared executor verifies the reviewed plan hash, complete network-fee evidence, and optional wallet/market/program/debit limits before handoff.
Solana debit limits cover per-account net wallet debits in a single simulation. They do not constrain intermediate flows, CPI program access, farm exposure, later chain state or unattended execution. Missing or unsupported balance evidence refuses submission.
Validation
Latest full local API suite: 1,010 passed, eight integration cases deselected. Eleven warnings include dependency deprecations and an unawaited fake-client coroutine warning; no failures.
Previous Aave revision: upstream main
7e86651b69b13b39e0cb3e1afbf080eedd461e8dmerged. then-current full local suite: 928 passed, 8 integration cases deselected.43 lifecycle/gas tests passed after the final correction. Duplicate durable creation is rejected before start; upstream completion upserts and performance snapshots are preserved.
Real PostgreSQL race/restart tests pass under READ COMMITTED and REPEATABLE READ defaults, including required-policy removal. Temporary-contention regressions preserve build digests and idempotency keys.
Public client v0.1.3: 147 passed, one live skip, wheel and source distribution built and inspected.
New Solana preparation/configuration/policy/lifecycle checks: 156 passed. Additional registration/lending/accounting checks: 62 passed, two database-dependent skips. Existing dependency warnings remain.
Solana runtime evidence
All six Condor UI confirmations were independently reconciled with receipts and final positions on a local Solana mirror: Jupiter Lend supply/redeem, Kamino Earn vault supply/withdraw, and PumpSwap direct liquidity add/remove. Reviewed executor hashes, complete fee/balance guards, and final zero positions were checked. Every transaction paid 5,000 lamports in network fees. These used a substituted local test wallet and a locally registered Aomi application fixture; hosted app activation and production Para signing are not demonstrated. The completed V2 recording is linked below.
Earlier Aave runtime evidence
Current upstream code was exercised through both the Condor UI and typed
create_lending_executortool, the authenticated API, durable PostgreSQL policy admission and actual Aomi Pipeline on a Base fork at block 51,161,414.custom_info.estimated_gas_quote; it is never booked as incurred executor fees, including on non-submitting previews. Receipt-derived quote fees are currently unavailable. History navigation follows upstream'sgroupBy=ctrlTypecontract.Exact versions, receipt and balance evidence, reproduction boundaries, and narration script. A 148-second walkthrough and individual before/supply/withdraw/refusal/ledger recordings are completed local deliverables; videos are not hosted in the repository. The supply/withdraw footage predates the accounting-only correction and is labeled with its actual source versions.
Operational boundaries
These are local fork transactions, using a bounded loopback Anvil test signer and a fresh public Kraken gas-conversion adapter. Automatic USDC valuation uses the real Hummingbot Binance endpoint. No model inference or production Para signing is claimed. Eight Para envelope regressions pass, covering empty calldata and explicit fee/nonce validation before HTTP; live signing-provider verification remains a deployment check.
Gas estimates exclude Base data fees and signing-provider surcharges. The allocation policy bounds recorded contributions, not external deposits, interest or the full portfolio. Unknown submissions retain reservations for reconciliation. No realized yield is claimed.
The earlier Aave integration revision merged the upstream baseline described above; current mergeability is reported by GitHub. Supporting backend CI run 34591678160 passed at
2439db38, including the fresh upstream merge. All three PRs are out of draft. Backend deployment and maintainer merge are separate from this contribution.Finished 2:30 V2 video, final narration, fresh receipts and recording notes. Six local transactions were verified, all three positions exited, and a 2 USDC action exceeded its 1.9 USDC limit and was refused before commit. The video is silent with a separate voiceover script; it uses a local Solana mirror and substituted test wallet.
Market-policy review correction: every top-level instruction for the selected protocol must reference the selected market. Mixed-market bundles are rejected regardless of instruction order. 147 targeted policy/configuration/lifecycle tests pass; all six archived demo receipts satisfy the stricter rule. The previous 1,010-test full-suite result predates this correction.
Unsigned preparation handles only explicit HTTP409 operation_in_flight admission refusals with bounded retries; timeouts, 5xx responses and other conflicts are not retried. Exhausted contention returns a sanitized busy response. The correction passed 23 focused tests and a live concurrent-read check. It does not alter transaction submission.