Repository navigation
Chain suite: every --yes path on local anvil chains - #10
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HG2miyE22qTuug1Quxj7iw
The signing step opened a second browser session of its own, the one command that bypassed its wallet tab. It now takes the command's session when given one, as create and the custody steps do; the manager still opens its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HG2miyE22qTuug1Quxj7iw
npm run test:chain starts a Mainnet and a Base anvil, places stand-in registry and ENS contracts at the real addresses, serves IPFS from the runner, and runs every --yes path in order with a test wallet in place of the browser: create, profile, ENS link, records and delete, Advanced custody with the operator key, an operator save, check, restore on a fresh machine and by owner lookup, Simple custody, and a transfer the receiver restores. Every step is checked against chain state, and nothing can reach a public host. CI runs it as its own job. Along the way: ETHAGENT_ENS_RPC_URL for ENS reads and writes, and saves with ETHAGENT_IPFS_API_URL no longer demand a Pinata JWT they never use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HG2miyE22qTuug1Quxj7iw
CI's Anvil read the bare genesis as pre-London and refused EIP-1559 transactions, so create failed and every later step had no agent. The genesis now activates every fork through Cancun from block 0 with a base fee, and CI pins Foundry to the version the suite was run with. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HG2miyE22qTuug1Quxj7iw
- The heartbeat from #9 read a watcher that never touches its pid file as gone. That is every watcher started before #9, including 5.3.2's: status deleted its pid file, ensureDaemon started a second watcher beside it, and pause could not stop it. - A pid that is alive but not beating is the daemon when its process is an ethagent watcher by its command line (/proc on Linux, ps on macOS, PowerShell on Windows). Any other live pid is still treated as recycled and is never signalled. - A starting watcher stops such a watcher and takes the pid file only once that process is gone. A beating watcher is left in place. - The heartbeat makes a watcher exit when sync is paused or another live process holds the pid file, and a watcher removes the pid file only while it is still its own. - daemonStatus no longer deletes the pid file, so status is read-only again.
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.
Summary
npm run test:chainruns every command that sends a transaction against two local Anvil chains, so the--yespaths are proven on every pull request instead of only by live runs.How it works (
test/run-chain.mjs,test/chain/harness.ts):contracts/test/chain) sit at the real addresses: the ERC-8004 identity registry, the ENS registry, the public resolver, and the universal resolver viem uses. The real Vault is deployed by ethagent itself.ETHAGENT_IPFS_API_URL, with raw CIDs so reads still verify the content hashes.The lifecycle (
test/chain/lifecycle.test.ts), one agent from start to finish. Each step is checked against chain state, not just exit codes:checkwith nothing to fix;restore --ownerwhile the Vault holds the token;restore --operatoron a fresh machine, byte for byte;It takes about 4 seconds.
Fixes the suite turned up:
transferopened a second browser session of its own; it now runs in the command's single wallet tab, like every other command.ETHAGENT_IPFS_API_URLdemanded a Pinata JWT they never use, and exited 3. They now go through.ETHAGENT_ENS_RPC_URLis new: it puts your own Mainnet RPC first for ENS reads and writes. There was no override before.CI and docs:
foundry-toolchain.Testing
npm run typecheck,npm test(776 pass),forge test(17 pass).npm run test:chain: 14 of 14 pass locally, on Foundry 1.5.1.🤖 Generated with Claude Code
https://claude.ai/code/session_01HG2miyE22qTuug1Quxj7iw
Generated by Claude Code