Skip to content

fix(evm-wallet-experiment): unblock docker e2e stack#945

Merged
sirtimid merged 3 commits intomainfrom
sirtimid/docker-e2e-fixes
Apr 24, 2026
Merged

fix(evm-wallet-experiment): unblock docker e2e stack#945
sirtimid merged 3 commits intomainfrom
sirtimid/docker-e2e-fixes

Conversation

@sirtimid
Copy link
Copy Markdown
Contributor

@sirtimid sirtimid commented Apr 24, 2026

Summary

Three independent pre-existing fixes that unblock the docker e2e stack. Found while verifying #943 locally; scoped separately.

  • ca-certificates in the evm image — Foundry nightly 2026-04-22 needs a CA bundle even for http://localhost; node:22-slim ships without one, so cast bn hangs forever and the evm container never goes healthy.
  • ALLOWED_HOSTS hostnames onlynetwork-caveat.ts (added in feat(ocap-kernel): integrate Snaps network endowment factory #942) matches URL.hostname, which never has a port. 'evm:8545' never matched 'evm', so every provider-vat fetch was rejected.
  • Surface twin error causesaway-coordinator wraps per-twin failures as Error('All delegation twins failed', { cause }); kernel RPC only serializes .message, so the 'Insufficient budget' reason was invisible to callers. Concat the cause messages into the outer message.

Verification

  • 39/39 docker e2e tests pass locally across all three modes (bundler-7702, bundler-hybrid, peer-relay).

🤖 Generated with Claude Code

sirtimid and others added 3 commits April 24, 2026 19:48
Foundry nightly 1.6.0-nightly (9439c7bdb9 2026-04-22) requires a CA bundle
on disk even for plain-http localhost RPC calls. Without it, `cast bn` in
the container entrypoint's wait loop fails with "No CA certificates were
loaded from the system", so the entrypoint never deploys the delegation
framework contracts, `contracts.json` is never written, and the evm
container never goes healthy — blocking the whole Docker e2e stack.

Pre-existing issue surfaced while running docker:e2e for PR #943. Not
related to the SES-lockdown cleanup theme, but blocks verification.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…s only

After PR #942 (Snaps network endowment factory) introduced the
`network-caveat.ts` matcher with strict "hostname-only, no port" semantics
(see packages/ocap-kernel/src/vats/network-caveat.ts:17-20), the e2e
allowlist entries `['evm:8545', 'bundler:4337']` never match
`URL.hostname` (which is just `'evm'` / `'bundler'`). Every fetch out of
the provider vat was rejected with "Invalid host: evm", causing every
docker e2e test to fail at `createSmartAccount`.

Drop the ports to match the caveat's contract.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…win wrapper

The `away-coordinator.transferNative` / `transferFungible` wrappers
(introduced in PR #939 when the coordinator was split) wrap per-twin
rejections as `throw new Error('All delegation twins failed', { cause: errors })`.
The kernel's RPC error serialization only propagates `Error.message`,
not `Error.cause`, so callers (including `run-delegation-twin-e2e.mjs`)
only see the generic "All delegation twins failed" — which loses the
actual reason (e.g. "Insufficient budget: requested 3, remaining 2").

Concatenate the cause messages into the wrapper's message text so the
specific per-twin rejection reason survives to the caller. Keep the
structured `cause` array intact for programmatic consumers.

Unblocks the "enforces cumulativeSpend locally" assertion in the
delegation-twin docker e2e test.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@sirtimid sirtimid requested a review from a team as a code owner April 24, 2026 17:49
@sirtimid sirtimid enabled auto-merge April 24, 2026 17:54
@github-actions
Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 70.95%
⬇️ -0.01%
8118 / 11441
🔵 Statements 70.79%
⬇️ -0.01%
8253 / 11658
🔵 Functions 71.9%
⬇️ -0.06%
1971 / 2741
🔵 Branches 64.58%
⬇️ -0.05%
3286 / 5088
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/evm-wallet-experiment/src/vats/away-coordinator.ts 0%
🟰 ±0%
0%
🟰 ±0%
0%
🟰 ±0%
0%
🟰 ±0%
47-2016
Generated in workflow #4379 for commit 7e181b9 by the Vitest Coverage Report Action

@sirtimid sirtimid added this pull request to the merge queue Apr 24, 2026
Merged via the queue into main with commit d93dc41 Apr 24, 2026
33 checks passed
@sirtimid sirtimid deleted the sirtimid/docker-e2e-fixes branch April 24, 2026 18:08
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.

2 participants