Skip to content

ci: run Lean Hive simulators in CI#364

Open
dicethedev wants to merge 4 commits into
lambdaclass:mainfrom
dicethedev:ci/run-hive-lean-simulators
Open

ci: run Lean Hive simulators in CI#364
dicethedev wants to merge 4 commits into
lambdaclass:mainfrom
dicethedev:ci/run-hive-lean-simulators

Conversation

@dicethedev
Copy link
Copy Markdown
Contributor

🗒️ Description / Motivation

This PR adds Hive coverage to CI for the Lean client simulators now available in ethereum/hive.

Hive already has Lean-focused simulator suites, and ethlambda already supports Hive test-driver mode via HIVE_LEAN_TEST_DRIVER. This change wires those pieces into GitHub Actions so PRs can exercise the Lean Hive suites automatically and surface failures with uploaded artifacts.

What Changed

  • .github/workflows/ci.yml

    • Adds a docker_build job that builds the ethlambda Docker image and uploads it as a workflow artifact.
    • Adds a run-hive matrix job for the Lean Hive simulator suites:
      • RPC compatibility
      • sync
      • client interop
      • validation
      • gossip
      • req/resp
      • fork-choice spec assets
      • state-transition spec assets
      • signature-verification spec assets
  • .github/config/hive/clients.yaml

    • Adds the Hive client config for ethlambda using the devnet4 nametag.
  • .github/scripts/check-hive-results.sh

    • Adds a small Hive results checker that fails CI when Hive reports failed test cases.
    • Writes failure details to the GitHub step summary and prepares failure artifacts.

Correctness / Behavior Guarantees

  • No runtime client behavior is changed.
  • Existing Rust tests, lint, and formatting jobs are left unchanged.
  • Hive runs use the Docker image built from the current commit.
  • Hive failures are reported from the generated JSON result files rather than relying only on action success/failure status.

Tests Added / Run

Added CI coverage through the new Hive workflow jobs.

Local verification run:

  • bash -n .github/scripts/check-hive-results.sh
  • Parsed .github/workflows/ci.yml and .github/config/hive/clients.yaml with Python YAML
  • git diff --check
  • Tested check-hive-results.sh with sample passing and failing Hive JSON

Not run locally:

  • make fmt
  • make lint
  • cargo test --workspace --release
  • Full Docker build / Hive simulation

Related Issues / PRs

✅ Verification Checklist

  • Ran make fmt — clean
  • Ran make lint (clippy with -D warnings) — clean
  • Ran cargo test --workspace --release — all passing

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 12, 2026

Greptile Summary

This PR wires the Lean Hive simulator suites into GitHub Actions by adding a docker_build job that exports the ethlambda image as an artifact and a run-hive matrix job covering nine simulator categories. A results-checker script parses Hive JSON output and surfaces failures in the step summary.

  • docker_build is never triggered: its if guard references needs.detect-changes.outputs.run_tests, but no detect-changes job exists in the workflow and needs: detect-changes is not declared — the condition is permanently false, skipping docker_build and every dependent run-hive job on every run.
  • Failure artifact upload has a logic gap: the upload step only fires when the results-checker script fails, not when the Hive simulation step itself crashes; the verify-hive-results step is skipped on simulation failure, so its conclusion is never 'failure' and no artifacts are uploaded.
  • Dead devnet3 config: clients.yaml registers both devnet3 and devnet4, but the workflow only uses ethlambda_devnet4.

Confidence Score: 3/5

Safe to merge from a runtime-behavior standpoint — no client code is changed — but the new CI jobs will never execute as written.

The docker_build job references a detect-changes job that does not exist anywhere in the workflow, making its if condition always false. All nine Hive matrix jobs depend on docker_build, so they are also permanently skipped. The PR's stated goal of running Lean Hive simulators in CI is entirely unmet until this is fixed. There is also a secondary gap where simulation-level crashes produce no uploaded artifacts.

ci.yml needs the if condition on docker_build either removed or replaced with a valid guard; the failure-artifact upload condition also needs revision.

Important Files Changed

Filename Overview
.github/workflows/ci.yml Adds docker_build and run-hive jobs, but docker_build references a non-existent detect-changes job making its if condition permanently false, so the entire Hive CI path is effectively dead; the failure-artifact upload also has a condition gap.
.github/scripts/check-hive-results.sh New script that parses Hive JSON result files and exits non-zero on any failing test case; logic is sound, edge cases (no files, missing jq, missing dir) are handled, and GitHub step-summary output is guarded by env-var check.
.github/config/hive/clients.yaml Adds devnet3 and devnet4 nametag entries for the ethlambda Hive client; only devnet4 is referenced in the workflow, leaving devnet3 as apparently unused config.
Prompt To Fix All With AI
Fix the following 3 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 3
.github/workflows/ci.yml:150-153
**`docker_build` always skipped — `detect-changes` job does not exist**

The `if` condition references `needs.detect-changes.outputs.run_tests`, but `docker_build` has no `needs: detect-changes` declaration and the workflow defines no `detect-changes` job at all. GitHub Actions evaluates `needs.detect-changes` as an empty context, so the expression `needs.detect-changes.outputs.run_tests == 'true'` is permanently `false`. Every run of this workflow will skip `docker_build`, and because `run-hive` declares `needs: docker_build`, every Hive matrix job is skipped as well — making the entire new CI path a no-op.

### Issue 2 of 3
.github/workflows/ci.yml:268-274
**Failure artifacts not uploaded when the Hive simulation itself crashes**

The upload condition `failure() && steps.verify-hive-results.conclusion == 'failure'` only fires when the explicit results-checker script exits non-zero. If the `Run Hive Simulation` step itself fails (e.g., Hive crashes, network timeout, bad Docker image), the `Check Hive Results For Failures` step is skipped (its guard is `if: success()`), leaving `steps.verify-hive-results.conclusion == 'skipped'`. The compound condition is never satisfied, so no artifacts are uploaded on simulation-level failures — exactly the case where diagnostic logs would be most useful.

### Issue 3 of 3
.github/workflows/ci.yml:252-260
**`client` field hard-codes `devnet4` and ignores the `devnet3` nametag**

`clients.yaml` registers both `ethlambda` with `devnet3` and `ethlambda` with `devnet4`, but `client: ethlambda_devnet4` is used unconditionally in the simulation step. The `devnet3` entry appears to be dead config — if it is truly needed for some simulators, it should be referenced in the matrix; if not, it should be removed from `clients.yaml` to avoid confusion.

Reviews (1): Last reviewed commit: "ci: add Hive config for both ethlambda d..." | Re-trigger Greptile

Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml
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.

Run hive in CI

2 participants