hive-c0re: create the agent subvolume before seeding dirs in init_config
This commit is contained in:
parent
4b318a809a
commit
1caf978004
1 changed files with 8 additions and 1 deletions
|
|
@ -324,8 +324,15 @@ async fn run_approval_init_config(
|
||||||
crate::topology::add_child(&approval.agent, &approval.commit_ref)
|
crate::topology::add_child(&approval.agent, &approval.commit_ref)
|
||||||
.map_err(|e| anyhow::anyhow!("topology add_child: {e}"))?;
|
.map_err(|e| anyhow::anyhow!("topology add_child: {e}"))?;
|
||||||
}
|
}
|
||||||
lifecycle::setup_proposed(&proposed_dir, &approval.agent).await?;
|
// Create the agent's state root as a btrfs subvolume FIRST, before
|
||||||
|
// any dir-seed touches it. `ensure_agent_state_subvolume` is
|
||||||
|
// progressive ("root exists → skip"), and `setup_proposed` does a
|
||||||
|
// `create_dir_all` on the proposed-config path which would
|
||||||
|
// materialise the state root as a plain directory — after which
|
||||||
|
// the subvolume create is silently skipped and the agent never
|
||||||
|
// lands on a subvolume (no quota, no snapshot). Order matters.
|
||||||
lifecycle::ensure_agent_state_subvolume(&approval.agent).await?;
|
lifecycle::ensure_agent_state_subvolume(&approval.agent).await?;
|
||||||
|
lifecycle::setup_proposed(&proposed_dir, &approval.agent).await?;
|
||||||
lifecycle::ensure_claude_dir(&claude_dir)?;
|
lifecycle::ensure_claude_dir(&claude_dir)?;
|
||||||
lifecycle::ensure_state_dir(¬es_dir)?;
|
lifecycle::ensure_state_dir(¬es_dir)?;
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue