Skip to content

chore: test improvements - #17

Merged
kp2pml30 merged 1 commit into
v0.6-devfrom
chore/test-improvements
Aug 1, 2026
Merged

kp2pml30 merged 1 commit into
v0.6-devfrom
chore/test-improvements

Conversation

@kp2pml30

@kp2pml30 kp2pml30 commented Jul 31, 2026 •

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Documentation

    • Reorganized contributor documentation with clearer tutorials, how-to guides, explanations, testing, release, and setup instructions.
    • Added guidance for pull requests, scripting, documentation style, fuzzing, versioning, and release assets.
    • Improved documentation navigation and added an index of available guides.
  • Chores

    • Improved build and test workflows with reusable Nix setup and caching.
    • Added safeguards for manager reference pushes and refreshed executor components.
    • Improved shared submodule caching for concurrent operations.

@kp2pml30 kp2pml30 self-assigned this Jul 31, 2026
@github-actions
github-actions Bot changed the base branch from main to v0.6-dev July 31, 2026 04:58
@github-actions

Copy link
Copy Markdown

👋 This PR targeted main, so I've retargeted it to the latest dev branch v0.6-dev.

main is protected and is only an alias of the latest release branch (v0.6-dev), kept in lockstep automatically. Active v0.6 work lands on v0.6-dev, which reaches v0.6.x through the standing release-gate PR once the cross-repo E2E matrix is green.

@coderabbitai

coderabbitai Bot commented Jul 31, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 439a3292-7ab8-4990-a64a-6af878cf9717

📥 Commits

Reviewing files that changed from the base of the PR and between 870d5a2 and 98148e9.

⛔ Files ignored due to path filters (23)
  • support/tools/genvm-tool/default.nix is excluded by !support/tools/genvm-tool/**
  • support/tools/genvm-tool/genvm_tool/__main__.py is excluded by !support/tools/genvm-tool/**
  • support/tools/genvm-tool/genvm_tool/cmd_configure.py is excluded by !support/tools/genvm-tool/**
  • support/tools/genvm-tool/genvm_tool/cmd_docs.py is excluded by !support/tools/genvm-tool/**
  • support/tools/genvm-tool/genvm_tool/cmd_howto.py is excluded by !support/tools/genvm-tool/**
  • support/tools/genvm-tool/genvm_tool/codegen/model.py is excluded by !support/tools/genvm-tool/**
  • support/tools/genvm-tool/genvm_tool/codegen/rst.py is excluded by !support/tools/genvm-tool/**
  • support/tools/genvm-tool/genvm_tool/codegen/rust.py is excluded by !support/tools/genvm-tool/**
  • support/tools/genvm-tool/genvm_tool/common.py is excluded by !support/tools/genvm-tool/**
  • support/tools/genvm-tool/genvm_tool/git/__init__.py is excluded by !support/tools/genvm-tool/**
  • support/tools/genvm-tool/genvm_tool/git/check_for_push.py is excluded by !support/tools/genvm-tool/**
  • support/tools/genvm-tool/genvm_tool/git/create_branches.py is excluded by !support/tools/genvm-tool/**
  • support/tools/genvm-tool/genvm_tool/git/verify_pushed_executors.py is excluded by !support/tools/genvm-tool/**
  • support/tools/genvm-tool/genvm_tool/tests/__init__.py is excluded by !support/tools/genvm-tool/**
  • support/tools/genvm-tool/genvm_tool/tests/util/watchdog.py is excluded by !support/tools/genvm-tool/**
  • support/tools/genvm-tool/genvm_tool/tests/util/watchdog_main.py is excluded by !support/tools/genvm-tool/**
  • support/tools/genvm-tool/unit_tests/test_verify_pushed_executors.py is excluded by !support/tools/genvm-tool/**
  • tests/runner/genvm_tool_plugins/genvm.py is excluded by !tests/**
  • tests/runner/genvm_tool_plugins/integration.py is excluded by !tests/**
  • tests/runner/genvm_tool_plugins/ninja.py is excluded by !tests/**
  • tests/runner/origin/log_asserts.py is excluded by !tests/**
  • tests/runner/origin/logger.py is excluded by !tests/**
  • tests/templates/util.jsonnet is excluded by !tests/**
📒 Files selected for processing (50)
  • .claude/settings.fuzzing.json
  • .claude/skills/agentic-fuzzing/SKILL.md
  • .genvm-tool.py
  • .github/actions/genlayerlabs-nix-cache-push/action.yaml
  • .github/actions/genlayerlabs-nix-setup/action.yaml
  • .github/actions/get-src/action.yaml
  • .github/workflows/incl_initial.yaml
  • .github/workflows/incl_release_build_test_cell_build.yaml
  • .github/workflows/incl_release_build_test_cell_test.yaml
  • .github/workflows/queue_test_cell.yaml
  • CLAUDE.md
  • docs/README.md
  • docs/contributing/README.md
  • docs/contributing/explanation/README.md
  • docs/contributing/explanation/docs-layout.md
  • docs/contributing/explanation/executor-lines.md
  • docs/contributing/explanation/merge-model.md
  • docs/contributing/explanation/vendored-trees.md
  • docs/contributing/howto/README.md
  • docs/contributing/howto/building/build.md
  • docs/contributing/howto/building/docs.md
  • docs/contributing/howto/building/runners.md
  • docs/contributing/howto/committing/git-third-party.md
  • docs/contributing/howto/committing/runners.md
  • docs/contributing/howto/committing/submodules.md
  • docs/contributing/howto/docs/style.md
  • docs/contributing/howto/extending/add-host-function.md
  • docs/contributing/howto/extending/add-llm-provider.md
  • docs/contributing/howto/extending/add-wasi-function.md
  • docs/contributing/howto/extending/modify-runner.md
  • docs/contributing/howto/extending/modify-wasmtime.md
  • docs/contributing/howto/extending/write-a-script.md
  • docs/contributing/howto/genvm-tool.md
  • docs/contributing/howto/pr.md
  • docs/contributing/howto/releasing/release-build.md
  • docs/contributing/howto/releasing/versioning.md
  • docs/contributing/howto/setup.md
  • docs/contributing/howto/testing/README.md
  • docs/contributing/howto/testing/fuzzing.md
  • docs/contributing/howto/testing/integration.md
  • docs/contributing/howto/testing/python.md
  • docs/contributing/howto/testing/rust.md
  • docs/contributing/howto/write-a-script.md
  • docs/contributing/tutorial/README.md
  • docs/contributing/tutorial/first-contribution.md
  • executors/v0.2.x
  • executors/v0.3.x
  • flake.nix
  • support/scripts/check-source-text.py
  • support/scripts/get-all-git.py

📝 Walkthrough

Walkthrough

The change adds reusable Nix setup and cache-push actions, installs manager push-reference validation, updates build and Git tooling, advances executor references, and reorganizes contributor documentation with fuzzing guidance.

Changes

Nix CI cache integration

Layer / File(s) Summary
Reusable Nix setup
.github/actions/genlayerlabs-nix-setup/action.yaml, .github/actions/get-src/action.yaml
Adds shared Nix configuration and installation through a local composite action.
Cache push action and workflow wiring
.github/actions/genlayerlabs-nix-cache-push/action.yaml, .github/workflows/*
Adds filtered Attic pushes after pre-commit, build, test, and tool jobs.

Developer workflow and tooling

Layer / File(s) Summary
Push validation
flake.nix
Validates outgoing manager references, preserves legacy hooks, and installs the verifier in the full development shell.
Build, Git, and executor updates
.genvm-tool.py, support/scripts/get-all-git.py, executors/v0.2.x, executors/v0.3.x
Delegates build-info generation to base_info, locks shared submodule caches in Git’s common directory, and updates executor revisions.

Contributor documentation and fuzzing

Layer / File(s) Summary
Documentation structure and repository guides
CLAUDE.md, docs/README.md, docs/contributing/*
Adds documentation indexes and revises tutorial, build, repository, testing, release, extension, style, and pull-request guidance.
Fuzzing guidance
.claude/skills/agentic-fuzzing/SKILL.md, docs/contributing/howto/testing/fuzzing.md
Documents fuzzing findings, probes, execution modes, artifacts, host preparation, and regression review steps.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'chore: test improvements' is vague and does not clearly summarize the main changes, which include documentation restructuring, GitHub Actions additions, Nix cache integration, and infrastructure updates. Provide a more specific title that identifies the primary change, such as 'chore: restructure documentation and add Nix cache integration' or similar.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/test-improvements

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

Copy link
Copy Markdown
Member Author

/run-e2e

@github-actions

github-actions Bot commented Jul 31, 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

Full GenVM CI runs only when run-full-tests is set — "Force run full tests" is a sticky toggle for it. Merge requires: an approving review from a maintainer on the head commit (pushing revokes it), green full tests, green E2E, and the branch 0 commits behind.

A repo admin can comment /genvm-force-merge to land the PR without the review, full-CI and E2E gates — for when those signals are unobtainable, not when they are red. The base, title and 0-behind checks still apply, and the skip is recorded on the PR.

@github-actions

Copy link
Copy Markdown

Linked executor PR(s)

executor: genlayerlabs/genvm-executor#12
executor: genlayerlabs/genvm-executor#13

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 13

🧹 Nitpick comments (1)
.github/actions/genlayerlabs-nix-setup/action.yaml (1)

60-71: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Use a random heredoc delimiter for the GITHUB_OUTPUT multiline write.

The heredoc uses the fixed literal EOF_NIX_CONFIG as its delimiter. If extra_nix_config (or, in principle, extra_substituters/extra_trusted_public_keys after collapsing) ever contains a line equal to EOF_NIX_CONFIG, the heredoc terminates early and corrupts the nix_config output that cachix/install-nix-action consumes downstream. Use a randomly generated delimiter for each run to eliminate this class of collision.

♻️ Proposed fix using a random delimiter
+        delimiter="EOF_NIX_CONFIG_$(openssl rand -hex 8)"
         {
-          echo 'nix_config<<EOF_NIX_CONFIG'
+          echo "nix_config<<${delimiter}"
           echo "experimental-features = nix-command flakes recursive-nix"
           echo "substituters = $substituters"
           echo "trusted-public-keys = $keys"
           echo "download-attempts = 10"
           echo "connect-timeout = 15"
           echo "stalled-download-timeout = 60"
           echo "fallback = true"
           if [ -n "$EXTRA_CONFIG" ]; then printf '%s\n' "$EXTRA_CONFIG"; fi
-          echo 'EOF_NIX_CONFIG'
+          echo "${delimiter}"
         } >> "$GITHUB_OUTPUT"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/actions/genlayerlabs-nix-setup/action.yaml around lines 60 - 71,
Update the multiline GITHUB_OUTPUT write in the nix configuration generation
block to use a newly generated random heredoc delimiter for each run instead of
the fixed EOF_NIX_CONFIG token. Use that same delimiter for both the opening
marker and closing marker while preserving the existing nix configuration
contents and EXTRA_CONFIG handling.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.claude/skills/agentic-fuzzing/SKILL.md:
- Around line 92-95: Clarify the safe-mode runner rule in the guidance paragraph
by replacing the incomplete wording with language stating that safe refuses both
wall-clock exposure and the :test alias. Preserve the surrounding runner-by-hash
resolution instructions unchanged.

In @.github/actions/genlayerlabs-nix-cache-push/action.yaml:
- Around line 34-77: Make the entire cache-upload path fail-soft, not just the
final xargs attic push. In the shell block, ensure failures from nix build and
attic login are caught and emit the same warning without causing the action to
exit nonzero; preserve the existing early exit when no paths are built and the
current push warning behavior. Anchor the changes around the nix build command
and the attic login invocation.

In `@docs/contributing/howto/building/docs.md`:
- Around line 39-42: Update the documentation deployment description to
reference _site/versions.json instead of a repository-root versions.json in both
occurrences, including the version-switcher location and the file contributors
should inspect after deploy-docs.

In `@docs/contributing/howto/docs/style.md`:
- Around line 31-34: Update the name-formatting rule near the examples to fix
subject-verb agreement by changing “Write names as it is native to the referee”
to plural-consistent wording, preferably “Write names in their native form.”

In `@docs/contributing/howto/extending/write-a-script.md`:
- Around line 3-6: Update the language names in the contributor guide’s
scripting recommendations to use “Python” and “Bash” with capitalization, while
leaving the surrounding guidance and code formatting unchanged.

In `@docs/contributing/howto/pr.md`:
- Around line 24-27: Update the ci-safe paragraph near the `support/ci/`
explanation by replacing the comma splice after “scope” with a period, making
“Authors with write access get it automatically” and “Everyone else needs a
maintainer to add it after reading the diff” separate sentences.

In `@docs/contributing/howto/testing/fuzzing.md`:
- Around line 16-19: Update the Host Preparation section in the fuzzing guide to
warn that changing kernel.yama.ptrace_scope weakens a system-wide security
control. Recommend performing this only on an isolated runner, and document how
to capture the existing value and restore it after fuzzing.

In `@docs/contributing/howto/testing/python.md`:
- Around line 12-14: Update the Nix flake reference in the testing command after
the genlayer-py-std directory change to use four parent traversals, resolving
the repository-level support/nix/py-test path correctly. Keep the existing
environment setup and pytest invocation unchanged.

In `@docs/contributing/README.md`:
- Around line 19-20: Update the GenVM security guidance sentence so the two
independent commands are separated with a period: end the instruction not to
open a public vulnerability issue after “vulnerability,” then begin “Follow
[SECURITY.md](../../SECURITY.md) instead” as a new sentence.

In `@docs/README.md`:
- Around line 11-12: Update the navigation note in docs/README.md to say that
docs-layout.md explains which documentation page a new page belongs in and why,
replacing the ambiguous reference to “line” with “page.”

In `@executors/v0.3.x`:
- Line 1: Update the executors/v0.3.x submodule pointer from the unavailable
commit to a valid commit on genvm-executor’s v0.3.x branch, then verify the
manager checkout initializes and resolves the submodule successfully before
merging.

In `@flake.nix`:
- Around line 225-239: In the install-manager-push-refs hook, update the failure
branch that reports an existing $user_legacy in install-manager-push-refs to
exit explicitly with status 1 instead of invoking false, preventing execution
from reaching the subsequent ln -sfn command.

In `@support/scripts/get-all-git.py`:
- Around line 149-152: Serialize concurrent get-all-git.py executions, or
introduce a lock keyed to each cache path. Hold the lock across ensure_cache()
check/initialize, remote updates, fetches, and update_submodules_with_cache()
operations using the shared cached reference, and release it reliably after
completion or failure.

---

Nitpick comments:
In @.github/actions/genlayerlabs-nix-setup/action.yaml:
- Around line 60-71: Update the multiline GITHUB_OUTPUT write in the nix
configuration generation block to use a newly generated random heredoc delimiter
for each run instead of the fixed EOF_NIX_CONFIG token. Use that same delimiter
for both the opening marker and closing marker while preserving the existing nix
configuration contents and EXTRA_CONFIG handling.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 825d195a-0ccf-4a33-bbaf-244d4e7a6d66

📥 Commits

Reviewing files that changed from the base of the PR and between 64de460 and d68c920.

⛔ Files ignored due to path filters (22)
  • support/tools/genvm-tool/default.nix is excluded by !support/tools/genvm-tool/**
  • support/tools/genvm-tool/genvm_tool/__main__.py is excluded by !support/tools/genvm-tool/**
  • support/tools/genvm-tool/genvm_tool/cmd_configure.py is excluded by !support/tools/genvm-tool/**
  • support/tools/genvm-tool/genvm_tool/cmd_docs.py is excluded by !support/tools/genvm-tool/**
  • support/tools/genvm-tool/genvm_tool/cmd_howto.py is excluded by !support/tools/genvm-tool/**
  • support/tools/genvm-tool/genvm_tool/codegen/model.py is excluded by !support/tools/genvm-tool/**
  • support/tools/genvm-tool/genvm_tool/codegen/rst.py is excluded by !support/tools/genvm-tool/**
  • support/tools/genvm-tool/genvm_tool/common.py is excluded by !support/tools/genvm-tool/**
  • support/tools/genvm-tool/genvm_tool/git/__init__.py is excluded by !support/tools/genvm-tool/**
  • support/tools/genvm-tool/genvm_tool/git/check_for_push.py is excluded by !support/tools/genvm-tool/**
  • support/tools/genvm-tool/genvm_tool/git/create_branches.py is excluded by !support/tools/genvm-tool/**
  • support/tools/genvm-tool/genvm_tool/git/verify_pushed_executors.py is excluded by !support/tools/genvm-tool/**
  • support/tools/genvm-tool/genvm_tool/tests/__init__.py is excluded by !support/tools/genvm-tool/**
  • support/tools/genvm-tool/genvm_tool/tests/util/watchdog.py is excluded by !support/tools/genvm-tool/**
  • support/tools/genvm-tool/genvm_tool/tests/util/watchdog_main.py is excluded by !support/tools/genvm-tool/**
  • support/tools/genvm-tool/unit_tests/test_verify_pushed_executors.py is excluded by !support/tools/genvm-tool/**
  • tests/runner/genvm_tool_plugins/genvm.py is excluded by !tests/**
  • tests/runner/genvm_tool_plugins/integration.py is excluded by !tests/**
  • tests/runner/genvm_tool_plugins/ninja.py is excluded by !tests/**
  • tests/runner/origin/log_asserts.py is excluded by !tests/**
  • tests/runner/origin/logger.py is excluded by !tests/**
  • tests/templates/util.jsonnet is excluded by !tests/**
📒 Files selected for processing (50)
  • .claude/settings.fuzzing.json
  • .claude/skills/agentic-fuzzing/SKILL.md
  • .genvm-tool.py
  • .github/actions/genlayerlabs-nix-cache-push/action.yaml
  • .github/actions/genlayerlabs-nix-setup/action.yaml
  • .github/actions/get-src/action.yaml
  • .github/workflows/incl_initial.yaml
  • .github/workflows/incl_release_build_test_cell_build.yaml
  • .github/workflows/incl_release_build_test_cell_test.yaml
  • .github/workflows/queue_test_cell.yaml
  • CLAUDE.md
  • docs/README.md
  • docs/contributing/README.md
  • docs/contributing/explanation/README.md
  • docs/contributing/explanation/docs-layout.md
  • docs/contributing/explanation/executor-lines.md
  • docs/contributing/explanation/merge-model.md
  • docs/contributing/explanation/vendored-trees.md
  • docs/contributing/howto/README.md
  • docs/contributing/howto/building/build.md
  • docs/contributing/howto/building/docs.md
  • docs/contributing/howto/building/runners.md
  • docs/contributing/howto/committing/git-third-party.md
  • docs/contributing/howto/committing/runners.md
  • docs/contributing/howto/committing/submodules.md
  • docs/contributing/howto/docs/style.md
  • docs/contributing/howto/extending/add-host-function.md
  • docs/contributing/howto/extending/add-llm-provider.md
  • docs/contributing/howto/extending/add-wasi-function.md
  • docs/contributing/howto/extending/modify-runner.md
  • docs/contributing/howto/extending/modify-wasmtime.md
  • docs/contributing/howto/extending/write-a-script.md
  • docs/contributing/howto/genvm-tool.md
  • docs/contributing/howto/pr.md
  • docs/contributing/howto/releasing/release-build.md
  • docs/contributing/howto/releasing/versioning.md
  • docs/contributing/howto/setup.md
  • docs/contributing/howto/testing/README.md
  • docs/contributing/howto/testing/fuzzing.md
  • docs/contributing/howto/testing/integration.md
  • docs/contributing/howto/testing/python.md
  • docs/contributing/howto/testing/rust.md
  • docs/contributing/howto/write-a-script.md
  • docs/contributing/tutorial/README.md
  • docs/contributing/tutorial/first-contribution.md
  • executors/v0.2.x
  • executors/v0.3.x
  • flake.nix
  • support/scripts/check-source-text.py
  • support/scripts/get-all-git.py
💤 Files with no reviewable changes (2)
  • docs/contributing/howto/write-a-script.md
  • .claude/settings.fuzzing.json

Comment thread .claude/skills/agentic-fuzzing/SKILL.md Resolved
Comment thread docs/contributing/howto/docs/style.md Resolved
Comment thread docs/contributing/README.md Resolved
Comment thread docs/README.md
Comment on lines +11 to +12
Which of these a new page belongs in, and why the line falls where it does:
[docs-layout.md](contributing/explanation/docs-layout.md)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use “page” instead of “line” in the navigation note.

line does not identify a documentation category. State that docs-layout.md explains where a new page belongs and why.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/README.md` around lines 11 - 12, Update the navigation note in
docs/README.md to say that docs-layout.md explains which documentation page a
new page belongs in and why, replacing the ambiguous reference to “line” with
“page.”

Comment thread executors/v0.3.x Resolved
Comment thread flake.nix
Comment on lines +225 to +239
install-manager-push-refs = ''
hooks_dir="$(git rev-parse --git-path hooks)"
legacy="$hooks_dir/pre-push.legacy"
user_legacy="$hooks_dir/pre-push.user-legacy"
installed="$(${pkgs.coreutils}/bin/readlink "$legacy" 2>/dev/null || true)"
if [[ -e "$legacy" && "$installed" != *-verify-manager-push-refs && "$installed" != *-verify-single-manager-push-ref ]]; then
if [[ ! -e "$user_legacy" ]]; then
mv "$legacy" "$user_legacy"
else
echo "cannot preserve existing $legacy: $user_legacy already exists" >&2
false
fi
fi
ln -sfn ${verify-manager-push-refs} "$legacy"
'';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🌐 Web query:

Does nix mkShell shellHook run with bash's set -e enabled by default?

💡 Result:

No, nix mkShell's shellHook does not run with bash's set enabled by default [1][2][3]. The shellHook is a string of bash commands that are executed by nix-shell when the environment is initialized [1][4][3]. These commands are evaluated within the context of the shell, but they do not automatically inherit or enable bash flags such as -e (errexit) or -u (nounset) unless you explicitly include them in the shellHook string itself [1][3]. Because shellHook is treated as a script fragment to be sourced or executed upon entering the shell, it behaves like standard bash code [5][3]. If you require specific bash behavior, you can manually set it at the beginning of your shellHook, for example: shellHook = '' set -euo pipefail # your commands here ''; This allows you to control the environment settings explicitly rather than relying on default shell behavior [3][6].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== locate docs/config files =="
git ls-files | rg '(^|/)flake\.nix$|(^|/)docs/contributing/|(^|/)README|pkgs|mkShell|install-manager-push-refs|verify-manager-push-refs|shellHook' | head -200

echo
echo "== flake references =="
if [ -f flake.nix ]; then
  wc -l flake.nix
  sed -n '200,255p' flake.nix | nl -ba -v200
  echo
  sed -n '730,770p' flake.nix | nl -ba -v730
  rg -n "set -euo pipefail|shellHook|install-manager-push-refs|install-manager-push" flake.nix
fi

echo
echo "== docs presence =="
if [ -d docs/contributing ]; then
  find docs/contributing -maxdepth 2 -type f -print | sort
  rg -n "how-to|design|implement|flake|shellHook|mkShell|contributing" docs/contributing -i || true
elif [ -d docs ]; then
  find docs -maxdepth 3 -type f -print | sort | head -100
fi

Repository: genlayerlabs/genvm-manager

Length of output: 1828


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== relevant flake.nix blocks =="
sed -n '218,242p' flake.nix
echo
sed -n '745,756p' flake.nix
echo

echo "== shellHook/flow flags and install-manager-push-refs occurrences in flake.nix =="
grep -nE 'flake\.nix:\s*shellHook\s*=|set -euo pipefail|install-manager-push-refs|verify-manager-push-refs|mkShell' flake.nix || true

echo
echo "== bash errexit behavior for the exact control flow =="
bash -c '
hooks_dir=/tmp/cr-shellhook-test-hooks-$$
rm -rf "$hooks_dir"
mkdir -p "$hooks_dir"
legacy="$hooks_dir/pre-push.legacy"
user_legacy="$hooks_dir/pre-push.user-legacy"
target="$hooks_dir/target"
touch "$user_legacy" "$target"
installed="$(readlink "$legacy" 2>/dev/null || true)"
if [[ -e "$legacy" && "$installed" != *-verify-manager-push-refs && "$installed" != *-verify-single-manager-push-ref ]]; then
  if [[ ! -e "$user_legacy" ]]; then
    mv "$legacy" "$user_legacy"
  else
    echo "cannot preserve existing $legacy: $user_legacy already exists" >&2
    false
  fi
fi
ln -sfn "$target" "$legacy"
echo "legacy points to: $(readlink "$legacy")"
'
rm -rf "$hooks_dir" 2>/dev/null || true

Repository: genlayerlabs/genvm-manager

Length of output: 3191


Exit explicitly after failing to preserve the user hook.

If it cannot move the existing $legacy to $user_legacy, only printing a warning lets execution fall through to ln -sfn ${verify-manager-push-refs} "$legacy" and overwrite the managed hook, which conflicts with the preservation attempt. Use exit 1 instead of false so this cannot silently be ignored by the surrounding hook.

🛡️ Proposed fix
               if [[ ! -e "$user_legacy" ]]; then
                 mv "$legacy" "$user_legacy"
               else
                 echo "cannot preserve existing $legacy: $user_legacy already exists" >&2
-                false
+                exit 1
               fi
             fi
             ln -sfn ${verify-manager-push-refs} "$legacy"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
install-manager-push-refs = ''
hooks_dir="$(git rev-parse --git-path hooks)"
legacy="$hooks_dir/pre-push.legacy"
user_legacy="$hooks_dir/pre-push.user-legacy"
installed="$(${pkgs.coreutils}/bin/readlink "$legacy" 2>/dev/null || true)"
if [[ -e "$legacy" && "$installed" != *-verify-manager-push-refs && "$installed" != *-verify-single-manager-push-ref ]]; then
if [[ ! -e "$user_legacy" ]]; then
mv "$legacy" "$user_legacy"
else
echo "cannot preserve existing $legacy: $user_legacy already exists" >&2
false
fi
fi
ln -sfn ${verify-manager-push-refs} "$legacy"
'';
install-manager-push-refs = ''
hooks_dir="$(git rev-parse --git-path hooks)"
legacy="$hooks_dir/pre-push.legacy"
user_legacy="$hooks_dir/pre-push.user-legacy"
installed="$(${pkgs.coreutils}/bin/readlink "$legacy" 2>/dev/null || true)"
if [[ -e "$legacy" && "$installed" != *-verify-manager-push-refs && "$installed" != *-verify-single-manager-push-ref ]]; then
if [[ ! -e "$user_legacy" ]]; then
mv "$legacy" "$user_legacy"
else
echo "cannot preserve existing $legacy: $user_legacy already exists" >&2
exit 1
fi
fi
ln -sfn ${verify-manager-push-refs} "$legacy"
'';
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@flake.nix` around lines 225 - 239, In the install-manager-push-refs hook,
update the failure branch that reports an existing $user_legacy in
install-manager-push-refs to exit explicitly with status 1 instead of invoking
false, preventing execution from reaching the subsequent ln -sfn command.

Comment thread support/scripts/get-all-git.py Resolved
@kp2pml30
kp2pml30 force-pushed the chore/test-improvements branch from d68c920 to 0961143 Compare July 31, 2026 05:13
@kp2pml30

Copy link
Copy Markdown
Member Author

/run-e2e

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

❌ Merge blocked: no approving review on 870d5a2c57ef. A maintainer must approve this exact commit — approvals of earlier commits do not carry over.

@kp2pml30

kp2pml30 commented Aug 1, 2026

Copy link
Copy Markdown
Member Author

/genvm-force-merge

@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

⚠️ Forced merge requested by kp2pml30 (repo admin) on 870d5a2c57ef: the review, full-CI and E2E gates are NOT being enforced. The base, draft/open, title and 0-behind checks still apply.

* fix: add pre-push hook
* chore: restructure contributor docs and rework the test harness 📝♻️
* fix(git): ask the remote for the gitlink commit, not for a matching ref 🐛
* chore(ci): push locally built store paths to the nix cache 🏗️
* docs: fix wording and the versions.json path flagged in review 📝
* chore(ci): make the whole nix cache push fail-soft 💚
* fix(build): keep a user pre-push hook and serialize the submodule cache 🐛
* chore(codegen): assert a non-empty description in $str constructors ✅
@kp2pml30
kp2pml30 force-pushed the chore/test-improvements branch from 870d5a2 to 98148e9 Compare August 1, 2026 09:28
kp2pml30 added a commit to genlayerlabs/genvm-executor that referenced this pull request Aug 1, 2026
* chore(executor): harden the precompile cache and speed up dev builds 🔒️⚡
* chore(sdk-rs): reject an empty description in vm_error constructors ✅
@kp2pml30
kp2pml30 merged commit 98148e9 into v0.6-dev Aug 1, 2026
8 of 10 checks passed
@github-actions

github-actions Bot commented Aug 1, 2026

Copy link
Copy Markdown

✅ Merged into v0.6-dev (98148e99f82d4e9150c31a1ffec6704e7dfc3cd1) via fast-forward. Forced by kp2pml30 — the review, CI and E2E gates were not enforced.

@kp2pml30
kp2pml30 deleted the chore/test-improvements branch August 4, 2026 06:19
@coderabbitai coderabbitai Bot mentioned this pull request Aug 10, 2026
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