docs(#1989): add # errors doc to rebuild_agent + rebuild (argus review)

This commit is contained in:
damocles 2026-06-25 23:59:54 +02:00
commit 678f50f3fb
2 changed files with 16 additions and 0 deletions

View file

@ -72,6 +72,10 @@ pub fn agent_config_pending(name: &str, deployed_sha: Option<&str>) -> bool {
/// the container rebuild. Pass `false` only for meta-update cascade
/// rebuilds, where re-locking would revert the bump the cascade just
/// committed (see `lifecycle::rebuild`).
///
/// # Errors
///
/// Propagates errors from `coord.ensure_runtime` and `lifecycle::rebuild`.
pub async fn rebuild_agent(
coord: &Arc<Coordinator>,
name: &str,

View file

@ -409,6 +409,18 @@ pub async fn destroy(name: &str) -> Result<()> {
Ok(())
}
/// Rebuild `name`'s container: sync the meta flake, optionally re-lock
/// the agent's input, then re-apply + restart via `nixos-container`.
///
/// When `relock` is `true` the agent's meta input is bumped to whatever
/// `applied/<n>/main` points at before the build. Pass `false` for
/// meta-update cascade rebuilds, where re-locking would revert the bump
/// the cascade just committed (see the inline note below).
///
/// # Errors
///
/// Propagates errors from meta-flake sync / lock-update and the
/// `nixos-container` apply + restart shellouts.
pub async fn rebuild(
name: &str,
hive: &HiveEnv,