Conversation
A stack whose options anvil rejects exited 2 before opening its RPC
port, and all that reached the logs was our own 10s readiness timeout —
anvil's message went only to the in-memory log queue. Every later
request paid the same 10s and failed the same way.
- log anvil's last output lines when a boot fails, with its exit status
- keep :failed after a clap usage error (exit 2), since the args cannot
change while the process lives; other exits stay resumable
- ensure_running/2 returns {:error, reason}, so the proxy reports why
instead of "Stack not found"
- reject fork_block_number without fork_url, which is one way to hit
exit 2
- drop caller flags that collide with server-managed ones: a repeated
flag is a clap error, not a last-one-wins override
- hold one http port per stack for its lifetime; every resume claimed a
new one and leaked the old, and suspend now waits for the process to
die before the port can be rebound
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Both fail to compile on OTP 28, which the devenv shell now provides: credo hits a PCRE2 character-class error, mix_test_watch escapes a reference into a struct default. Neither is reachable from the release. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
A stack whose options anvil rejects exits 2 before opening its RPC port. Anvil's message went only to the in-memory log queue, so prod logged nothing but our own 10s readiness timeout, and every later request paid the same 10s and failed with "Stack not found".
ensure_running/2returns{:error, reason}, so the proxy reports the exit code instead of "Stack not found".fork_block_numberwithoutfork_urlis now a changeset error. It is one of the ways to reach exit 2.--port/--state/--host/--chain-id/--preserve-historical-statesare dropped. A repeated flag is a clap error, not a last-one-wins override, so the ordering added in fdea60c did not make them safe.init/1leaked immediately. Suspend waits for the process to exit before the port can be rebound.The second commit bumps credo and mix_test_watch: neither compiles on OTP 28, which the devenv shell now provides, so the suite could not run at all.
.tool-versionsstill pins otp-27.Verification
Behaviour confirmed against anvil 1.8.0-nightly. Exit 2 cases:
--fork-block-numberwithout--fork-url,--no-miningwith--block-time,--mixed-miningwithout--block-time, and any repeated flag. A test now reproduces the first and asserts the logged output:🤖 Generated with Claude Code