fix(manager): answer run before its semantic validation - #53
Open
HusseinAdeiza wants to merge 1 commit into
Open
HusseinAdeiza wants to merge 1 commit into
HusseinAdeiza wants to merge 1 commit into
Conversation
The socket rejected a non-empty manager-owned host_hello_data[1] and a request needing stopped modules before run_ctx.start allocated an id, so both arrived as an error frame with no genvm_id. The protocol says the id is returned immediately and validation completes asynchronously, with failures arriving as a terminal event. Both conditions are already enforced in supervision, at run.rs:2476 and run.rs:2380, and bail before the process spawns, so the socket pre-checks only decided them early. Dropping them lets the run reach supervision and report failed_to_start. The module locks stay on this path: they pin the handlers before the run starts. Decoding stays synchronous, since the request has to be read before an id can be attached to it.
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Repository: genlayerlabs/genvm-manager/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
GenVM PR actionsTick a box to run it (the box unticks itself when handled). Actions only run while the PR has the
Commands
|
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.
Fixes part 1 of #13.
handle_runrejected a non-empty manager-ownedhost_hello_data[1](socket.rs:494) and a request needing stopped modules (:509) beforerun_ctx.startallocated an id, so both arrived as an error frame with nogenvm_id.manager-socket.rst:131says the id is returned immediately and validation completes asynchronously, with failures arriving as a terminal event.Both conditions are already enforced in supervision, at
run.rs:2476andrun.rs:2380, and both bail before the process spawns, so the socket pre-checks only decided them early. Dropping them lets the run reach supervision and reportfailed_to_start. The module locks stay on this path: they pin the handlers before the run starts.Decoding stays synchronous, since the request has to be read before an id can be attached to it. The spec now says so explicitly and names the two cases that moved.
New case
tests/system/manager-socket/async-validationasserts the id arrives first and the terminal event follows, for both classes. A valid request still reachesstarted, so the case cannot pass vacuously.cargo check --libandcargo fmt --checkare clean. The full matrix is unrun here:implementation/build.rsneedsLSQLITE3_PREBUILT/LSQLITE3_SRCfrom the nix dev shell, which this box does not have.