Watch
0
0
Fork
You've already forked hyperhive
0

deploy the closure the swarm declares, read no forge head, drop the update badge

This commit is contained in:
atlas 2026-11-01 23:56:40 +01:00 • committed by mara
commit 47c2acb640

View file

@ -305,15 +305,15 @@ const DEPLOY_SUBJECT_PREFIX: &str = "$SWARM.deploy";
/// No hive: the subject already names it, and repeating it here would be two
/// places stating one fact, free to disagree.
///
/// With [`Self::rev`] set it names the commit of the agent's config repo to
/// deploy. The config itself stays in git: the hive fetches that commit from
/// the forge, so a hive that misses a message is behind, never wrong.
/// What a hive deploys is the closure in the agent's `agent-closures` record,
/// not anything this message names, so a hive that misses a message is behind,
/// never wrong: it catches up from the record.
#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub struct DeployRequest {
/// The agent to rebuild, as the swarm knows it.
pub agent: String,
/// The commit on the agent's config repo `main` to deploy. `None`
/// rebuilds whatever the hive already has applied.
/// The commit on the agent's config repo `main` the swarm deployed. A hive
/// does not read it; it stays for controllers and hives of other versions.
///
/// `serde(default)` so a payload without the field still decodes: the
/// controller and the hives are deployed independently.