test(evm-wallet-experiment): Add local docker e2e test#912
Draft
test(evm-wallet-experiment): Add local docker e2e test#912
Conversation
packages/evm-wallet-experiment/docker/entrypoint-llm-proxy.mjs
Dismissed
Show dismissed
Hide dismissed
c77a70b to
c21c392
Compare
c4d8613 to
ca1a2c5
Compare
Contributor
Coverage Report
File Coverage
|
||||||||||||||||||||||||||||||||||||||||||||||||||
8a2f74e to
ce8d6ee
Compare
Add a Docker Compose stack for isolated E2E testing with five services: - `evm`: Anvil chain with EIP-7702 support + contract deployment - `bundler`: Pimlico Alto ERC-4337 bundler - `llm`: lightweight proxy forwarding to an upstream LLM - `home`: home kernel node (EOA + DeleGator smart account) - `away`: away kernel node (delegation recipient) Supports three delegation modes via DELEGATION_MODE env var: bundler-7702, bundler-hybrid, and peer-relay. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Made-with: Cursor
…ion-aware Configure LLM provider via env in setup paths. Extend setup-away.sh with delegation modes (bundler-7702, bundler-hybrid, peer-relay) and Anvil chain ID resolution. Tidy setup-home.sh, home-interactive.mjs, and resolve-chain.sh for compose usage; adjust package.json scripts for the Docker workflow.
… coordinator vat Add coordinator vat methods for redeeming delegations via direct EIP-1559 transactions instead of ERC-4337 UserOps: - `resolveChainId()` — resolves chain ID from bundler config, cache, or RPC - `useDirect7702Tx()` — determines whether to use direct tx vs UserOp path - `buildAndSubmitDirect7702Tx()` — signs and broadcasts self-call txs with SDK-encoded DeleGator calldata - `pollTransactionReceipt()` — polls for tx mining with configurable timeout - `handleRedemptionRequest` on PeerWalletFacet for peer-relay delegation mode Also adds `setSdkLogger()` to sdk.ts for environment resolution visibility, and re-exports it from the package index. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add a vitest suite that exercises the Docker Compose stack: - Home wallet: accounts, balance, message signing, EIP-712 typed data - Away wallet: local keys, message signing, provider queries - Delegation redemption: create, transfer, list, and redeem delegations with mode-specific capability assertions Includes test helpers for Docker exec, health checks, log collection, and daemon socket communication. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Made-with: Cursor
…ainers with host-driven orchestration Containers now boot a generic kernel (entrypoint-kernel.mjs) and expose an RPC socket — all wallet configuration is driven from the host via composable helpers (wallet-setup.ts, scenarios.ts) that call `docker compose exec`. - Replace entrypoint-home.mjs + entrypoint-away.mjs with shared entrypoint-kernel.mjs - Rename Dockerfile.node-base → Dockerfile.kernel-base with multi-stage build (kernel + interactive) - Add docker-compose.interactive.yml override for OpenClaw/LLM profile - Add host-side wallet-setup primitives and named scenario compositions - Add setup-wallets.ts script with 1000 ETH NativeTokenTransferAmount caveat - Update docker-e2e.test.ts to use host-driven beforeAll orchestration Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Made-with: Cursor
…gent Replace the bespoke fetch loop and tool-dispatch logic with makeChatAgent from @ocap/kernel-agents, which provides the same JSON-based capability invocation pattern. The LLM_API=ollama path now uses Ollama's OpenAI- compatible /v1/chat/completions endpoint so the response format matches ChatResult. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ollama-agent.mjs The ollama-agent.mjs wrapper is unnecessary now that the caller can pass capabilities directly to makeChatAgent and read agent.experiences after the task completes. Capability definitions and experience inspection now live in run-agent-loop-tests.mjs where they're actually used. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…abilities.ts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Default Vitest inherits root setupFiles including vitest-fetch-mock, which stubs global fetch. Docker E2E calls Anvil on localhost:8545 with real fetch; under the mock, responses were empty and evmRpc failed parsing JSON. Exclude test/e2e/docker from the main evm-wallet Vitest project and run those tests with yarn test:e2e:docker (vitest.config.docker.ts uses no fetch mock). Refresh yarn.lock workspace metadata for @ocap/kernel-agents on this package. Made-with: Cursor
…tart Home and away wallets hit the bundler during E2E setup; starting kernels only after evm was healthy allowed a race where Alto was still booting. depend_on bundler with service_healthy aligns Compose startup order. Made-with: Cursor
- Drop Dockerfile.evm HEALTHCHECK; Compose already gates on contracts.json. - Bundler: require eth_supportedEntryPoints with a non-empty result (ERC-4337). - LLM proxy: probe / and treat 5xx (e.g. upstream down) as unhealthy. Made-with: Cursor
- Use Alto OCI index digest so CI and laptops resolve the same image. - Pin openclaw@2026.4.1 instead of @latest. - Pin viem and smart-accounts-kit in Dockerfile.evm to match yarn.lock. Made-with: Cursor
…d errors Remove || true and the silent node-gyp fallback so broken node-datachannel or better-sqlite3 builds cannot produce a green image that fails at runtime. Made-with: Cursor
Made-with: Cursor
Local stack uses Foundry Anvil (Prague) for AA/delegation E2E, not Hardhat. Update comments and resolve_chain primary name; keep `hardhat` as a silent alias for existing shell callers. Made-with: Cursor
The wallet setup script runs on the host via yarn tsx (pinned devDependency). Kernel Docker images do not install tsx; OpenClaw loads plugins with jiti.
… image Yarn install runs with lifecycle scripts stripped, so the node-datachannel N-API addon (pulled in via libp2p/webrtc) was never built and kernel-cli build failed with MODULE_NOT_FOUND. Rebuild it explicitly before better-sqlite3 and workspace builds. Made-with: Cursor
ce8d6ee to
f036a65
Compare
…st setup Made-with: Cursor
Made-with: Cursor
…helpers Made-with: Cursor
…s dockerConfig Made-with: Cursor
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.
Add a Docker Compose stack for isolated E2E testing with five services:
evm: Anvil chain with EIP-7702 support + contract deploymentbundler: Pimlico Alto ERC-4337 bundlerllm: lightweight proxy forwarding to an upstream LLMhome: home kernel node (EOA + DeleGator smart account)away: away kernel node (delegation recipient)Supports three delegation modes via DELEGATION_MODE env var:
bundler-7702, bundler-hybrid, and peer-relay.