[PR #221] [CLOSED] fix(tools): defer var/run creation until after pivot #263

Closed
opened 2026-10-29 14:21:37 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/kvcache-ai/AgentENV/pull/221
Author: @ethe
Created: 8/27/2026
Status: ❌ Closed

Base: main ← Head: fix/pre-pivot-var-run


📝 Commits (1)

  • f74dd8e fix(tools): defer var/run creation until after pivot

📊 Changes

4 files changed (+40 additions, -1 deletions)

View changed files

📝 .github/workflows/ci.yml (+6 -0)
📝 Makefile (+1 -0)
➕ scripts/tests/verify-tools-init.sh (+30 -0)
📝 tools-image/init (+3 -1)

📄 Description

Fixes #202

Summary

  • stop traversing /mnt/user/var/run before pivot_root
  • keep the real /mnt/user/run preparation and let pivot-init create /var/run after the root switch
  • add a regression check to make test-unit and cover both init scripts in the CI path filters

Why

Some distribution images, including Ubuntu, provide /var/run as an absolute symlink to /run. Before pivot_root, following that symlink resolves against the tools-drive root instead of the mounted user root and produces the deterministic bootstrap warning reported in #202.

pivot-init already creates and mounts /run, then prepares /var/run after the root switch. Deferring this redundant directory preparation therefore fixes absolute-symlink resolution without distro detection or image-specific behavior.

Validation

  • bash scripts/tests/verify-tools-init.sh
  • shellcheck tools-image/init tools-image/pivot-init scripts/tests/verify-tools-init.sh
  • actionlint .github/workflows/ci.yml
  • git diff --check

Release note

This updates the tools-image source. After merge, a new immutable ghcr.io/kvcache-ai/agentenv-tools version still needs to be published and selected in config/deps_manifest.toml; the existing 0.1.0 artifact will not contain the change.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/kvcache-ai/AgentENV/pull/221 **Author:** [@ethe](https://github.com/ethe) **Created:** 8/27/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/pre-pivot-var-run` --- ### 📝 Commits (1) - [`f74dd8e`](https://github.com/kvcache-ai/AgentENV/commit/f74dd8eb69e69e61b9c3885604477974140d0f84) fix(tools): defer var/run creation until after pivot ### 📊 Changes **4 files changed** (+40 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yml` (+6 -0) 📝 `Makefile` (+1 -0) ➕ `scripts/tests/verify-tools-init.sh` (+30 -0) 📝 `tools-image/init` (+3 -1) </details> ### 📄 Description Fixes #202 ## Summary - stop traversing `/mnt/user/var/run` before `pivot_root` - keep the real `/mnt/user/run` preparation and let `pivot-init` create `/var/run` after the root switch - add a regression check to `make test-unit` and cover both init scripts in the CI path filters ## Why Some distribution images, including Ubuntu, provide `/var/run` as an absolute symlink to `/run`. Before `pivot_root`, following that symlink resolves against the tools-drive root instead of the mounted user root and produces the deterministic bootstrap warning reported in #202. `pivot-init` already creates and mounts `/run`, then prepares `/var/run` after the root switch. Deferring this redundant directory preparation therefore fixes absolute-symlink resolution without distro detection or image-specific behavior. ## Validation - `bash scripts/tests/verify-tools-init.sh` - `shellcheck tools-image/init tools-image/pivot-init scripts/tests/verify-tools-init.sh` - `actionlint .github/workflows/ci.yml` - `git diff --check` ## Release note This updates the tools-image source. After merge, a new immutable `ghcr.io/kvcache-ai/agentenv-tools` version still needs to be published and selected in `config/deps_manifest.toml`; the existing `0.1.0` artifact will not contain the change. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-29 14:21:37 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kvcache-ai/AgentENV#263
No description provided.