Watch
0
0
Fork
You've already forked hyperhive
0

keep the meta-rev record in hive-c0re's state, written by rename

on deploy, the commit a rebuild builds an agent from is recorded under
/var/lib/hyperhive/meta-rev/<agent> instead of the agent's runtime dir, which
is mounted read-write into its container. an agent can no longer pick or
redirect the record. the file is written to a temp name and renamed over.
This commit is contained in:
atlas 2026-10-24 19:20:37 +02:00
commit 4323097964
2 changed files with 65 additions and 23 deletions

View file

@ -195,6 +195,17 @@ pub fn meta_git_index_lock() -> PathBuf {
meta_root().join(".git/index.lock")
}
/// `meta-rev/` — one file per agent naming the `internal/meta` commit its
/// rebuild builds from (`crate::meta_rev`).
///
/// ⚠️ Deliberately **not** in the agent's runtime dir: that is bind-mounted
/// read-write into the container as `/run/hive`, and the commit decides which
/// flake the agent's own toplevel is built from.
#[must_use]
pub fn meta_rev_dir() -> PathBuf {
state_root().join("meta-rev")
}
/// `shared/` — the cross-agent `/shared` scratch space. A `&str`, so it
/// stays a const; [`shared_root`] wraps it.
// nix: bind-mounted into every agent container as `/shared` (the harness nix modules) — must match.