Add --edw-rpc and Mix eval BEAM recovery - #13
Merged
Merged
Conversation
The host evaluates Elixir on a running node with erl_call. After three startup crashes the host runs Mix eval, then starts again. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 4 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit fc6a1fd. Configure here.
CI has no epmd, so Node.start failed. Windows Mix eval now uses cmd /s quoting and a hidden console. The host returns the WM_QUIT code. Co-authored-by: Cursor <cursoragent@cursor.com>
Windows epmd -daemon does not return, so the host starts it without a wait. Recovery now writes a .cmd file and runs it with COMSPEC, so eval reaches the bat. Co-authored-by: Cursor <cursoragent@cursor.com>
cmd.exe /c drops extra quoted eval args. A temp .cmd with no pipe chars matches packaged start. Co-authored-by: Cursor <cursoragent@cursor.com>
Add the single-instance spec and rewrite --edw-rpc off erl_call. The control socket stays separate from the Elixir EDW TCP client. Co-authored-by: Dominic Letz <dominicletz@users.noreply.github.com>
Bind a per-user lock when instances=single. Second launch sends instance.activate. --edw-rpc is a control-socket client that forwards rpc.eval to the connected Elixir Transport. Drop erl_call. Co-authored-by: Dominic Letz <dominicletz@users.noreply.github.com>
Linux Elixir E2E covers instance.activate and --edw-rpc. Shared suite is the source of truth for all hosts. Co-authored-by: Dominic Letz <dominicletz@users.noreply.github.com>
on_exit Process.exit/2 on a dead drain pid can hit the next ExUnit test after pid reuse. Only kill the drain while it still owns the port. Co-authored-by: Dominic Letz <dominicletz@users.noreply.github.com>
Close the port and terminate the host OS pid. Do not kill a stored drain pid. Unlink Transport from the E2E test process. Co-authored-by: Dominic Letz <dominicletz@users.noreply.github.com>
Copy the remaining byte count before withUnsafeMutableBytes so the exclusive buffer access does not overlap buf.count. Co-authored-by: Dominic Letz <dominicletz@users.noreply.github.com>
…-eval-282d Native single-instance and control-socket rpc.eval
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
--edw-rpcas a one-shot Elixir eval on a running BEAM node viaerl_call.evalrecovery, then start again.Test plan
NO_WX=1 mix test test/e2e/rpc_test.exs test/e2e/restart_test.exs(macOS host)macos-e2e,linux-e2e, andwindows-e2e--edw-rpcand--edw-recovertogether exit with a non-zero statusMade with Cursor