Skip to content

fix(manager): keep fatal VM errors internal - #27

Merged
kp2pml30 merged 1 commit into
v0.6-devfrom
fix/fatal-errors
Aug 21, 2026
Merged

fix(manager): keep fatal VM errors internal#27
kp2pml30 merged 1 commit into
v0.6-devfrom
fix/fatal-errors

Conversation

@kp2pml30

@kp2pml30 kp2pml30 commented Aug 20, 2026

Copy link
Copy Markdown
Member

Summary

  • Make fatal VM errors unencodable at v0.3 contract and leader publication boundaries while preserving nested propagation
  • Validate top-level consumed_result framing in the manager, assert in debug, and log plus downgrade in release
  • Reject top-level fatal results in the Python host decoder while keeping nondet_results opaque
  • Specify fatal propagation, hashing, manager validation, and release normalization

Summary by CodeRabbit

  • Bug Fixes

    • Improved validation of execution results before they are accepted or published.
    • Invalid result formats and mismatched metadata are now rejected.
    • Fatal VM errors are consistently downgraded to standard VM errors at the top-level boundary.
    • Nested results preserve their supported error semantics, while fatal errors no longer appear in nondeterministic result data.
  • Documentation

    • Clarified result encoding, validation rules, error propagation, and manager protocol behavior.
    • Updated consensus and VM specifications to reflect the revised result handling.

@github-actions

github-actions Bot commented Aug 20, 2026

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
  • Rerun full tests
  • Provision executor PRs
  • Merge into dev
Merge

Requires, on the exact head commit:

  • an approving review from a maintainer (any push revokes it), or the rtm label
  • linear history — 0 commits behind base
  • green full GenVM CI and green cross-repo E2E

Full CI starts only through "Force" or "Rerun full tests" above. "Force" also sets run-full-tests, making future pushes run the full suite; rtm only authorizes Merge.

Every repo lands ONE squashed commit, subject <PR title> (#N).

Commands
  • /genvm-force-mergerepo admin only: land without the review, full-CI and E2E gates, for when those signals are unobtainable, not when they are red. Base, title and 0-behind still apply, and the skip is recorded on the PR.

@github-actions

Copy link
Copy Markdown

Linked executor PR(s)

executor: genlayerlabs/genvm-executor#26 (v0.3)

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 06b50732-7525-413a-9f12-afe720dd17b0

📥 Commits

Reviewing files that changed from the base of the PR and between 164d508 and 3b6aea1.

⛔ Files ignored due to path filters (3)
  • implementation/src/manager/run_test.rs is excluded by !**/*_test.rs
  • tests/runner/origin/base_host.py is excluded by !**/tests/**
  • tests/system/manager-socket/test.py is excluded by !**/tests/**
📒 Files selected for processing (8)
  • crates/modules-interfaces/src/domain.rs
  • docs/adr/013. pre-validating untrusted decoded inputs.md
  • docs/adr/014. manager host socket protocol.md
  • docs/website/src/impl-spec/02-vm/03-consensus.rst
  • docs/website/src/impl-spec/appendix/manager-socket.rst
  • docs/website/src/spec/03-vm/05-result.rst
  • executors/v0.3.x
  • implementation/src/manager/run.rs

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The manager now validates executor result framing and reported results for top-level runs. Fatal VM errors remain available for nested transport but are downgraded to VMError at top-level publication. ADRs and VM specifications document the updated semantics.

Changes

Fatal result validation

Layer / File(s) Summary
Result semantics and contracts
crates/modules-interfaces/src/domain.rs, docs/website/src/spec/03-vm/05-result.rst, docs/adr/013. pre-validating untrusted decoded inputs.md
The result contract documents nested fatal-error transport, top-level VMError reporting, propagation through callers, and exclusion from nondet_results.
Manager result validation
implementation/src/manager/run.rs, executors/v0.3.x
The manager decodes result codes, validates top-level framing and hashes, rejects invalid reports, downgrades fatal results, and applies the execution-level scope to host-stream handling.
Protocol and validator specifications
docs/adr/014. manager host socket protocol.md, docs/website/src/impl-spec/appendix/manager-socket.rst, docs/website/src/impl-spec/02-vm/03-consensus.rst
The documentation describes top-level report validation, fatal-result rewriting, opaque nested results, and rejection of unrecognized leader result codes.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: 🟡 Moderate · up to 3b6ae

The PR currently points to an executor revision that cannot be fetched from the configured remote, which prevents reproducible builds and validation. Merge should wait until that revision is published or the dependency reference is corrected.

Sequence Diagram(s)

sequenceDiagram
  participant Executor
  participant ManagerHostStream
  participant ReportedResultValidator
  participant ResultStorage
  Executor->>ManagerHostStream: Send consume_result payload
  ManagerHostStream->>ReportedResultValidator: Validate framing and ReportedResult
  ReportedResultValidator->>ManagerHostStream: Return validated or normalized result
  ManagerHostStream->>ResultStorage: Retain top-level result
Loading

Possibly related PRs

Suggested labels: run-full-tests

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: preventing fatal VM errors from being published by the manager.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/fatal-errors

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.

@kp2pml30 kp2pml30 self-assigned this Aug 20, 2026
@kp2pml30 kp2pml30 added the rtm label Aug 20, 2026
@kp2pml30

Copy link
Copy Markdown
Member Author

/run-e2e

@kp2pml30

Copy link
Copy Markdown
Member Author

/run-e2e

1 similar comment
@kp2pml30

Copy link
Copy Markdown
Member Author

/run-e2e

@kp2pml30
kp2pml30 merged commit 3b6aea1 into v0.6-dev Aug 21, 2026
41 of 42 checks passed
@kp2pml30
kp2pml30 deleted the fix/fatal-errors branch August 21, 2026 02:37
@github-actions

Copy link
Copy Markdown

✅ Merged into v0.6-dev (3b6aea1726b20252e272f4d249ae7fc4a1b34bbf) via fast-forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant