Skip to content

fix(manager): answer run before its semantic validation - #53

Open
HusseinAdeiza wants to merge 1 commit into
genlayerlabs:v0.6-devfrom
HusseinAdeiza:fix/socket-run-async-validation
Open

HusseinAdeiza wants to merge 1 commit into
genlayerlabs:v0.6-devfrom
HusseinAdeiza:fix/socket-run-async-validation

Conversation

@HusseinAdeiza

Copy link
Copy Markdown

Fixes part 1 of #13.

handle_run rejected a non-empty manager-owned host_hello_data[1] (socket.rs:494) and a request needing stopped modules (:509) before run_ctx.start allocated an id, so both arrived as an error frame with no genvm_id. manager-socket.rst:131 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 both 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. The spec now says so explicitly and names the two cases that moved.

before: error(malformed_frame)          no genvm_id
after:  run{genvm_id} -> event(failed_to_start)

before: error(internal)                 no genvm_id
after:  run{genvm_id} -> event(failed_to_start)

New case tests/system/manager-socket/async-validation asserts the id arrives first and the terminal event follows, for both classes. A valid request still reaches started, so the case cannot pass vacuously.

cargo check --lib and cargo fmt --check are clean. The full matrix is unrun here: implementation/build.rs needs LSQLITE3_PREBUILT/LSQLITE3_SRC from the nix dev shell, which this box does not have.

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.
@coderabbitai

coderabbitai Bot commented Sep 30, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Repository: genlayerlabs/genvm-manager/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: ce24c5fa-8b39-4dbb-8d2a-6811618eb829


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

GenVM PR actions

Tick a box to run it (the box unticks itself when handled). Actions only run while the PR has the ci-safe label.

  • Force run full tests
  • Provision executor PRs
Commands
  • /genvm-run-tests — run full tests once for the current manager snapshot
  • /merge — queue the exact manager snapshot through the App-owned E2E merge train

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.

1 participant