Watch
0
0
Fork
You've already forked hyperhive
0

drop the leftover matrix sweep references in docs and comments

This commit is contained in:
damocles 2026-10-28 22:18:53 +01:00 • committed by mara
commit bdda69a080
4 changed files with 9 additions and 10 deletions

View file

@ -73,7 +73,6 @@ Cheap — no build slot:
| `EmitRebuilt` | tail of a rebuild — emit the agent's `Rebuilt` manager event (ok/fail per outcome, nothing on cancel). One node per agent _and_ per outcome |
| `WriteDropin` | `set_nspawn_flags` + `set_resource_limits` + daemon-reload |
| `ForgeSweep` | one-shot boot-time publish of the hive's forge read token for nix (`forge::ensure_all`) as a first-class node, so it shows as real work on the dashboard instead of running invisibly in a bare `tokio::spawn`. Agentless |
| `MatrixSweep` | matrix sender-token sweep (`matrix::ensure_all`): the boot-time instance, plus one every 30 min from a loop in `main.rs`. Holds `Resource::MatrixSweep` (capacity 1), so two passes never overlap; each tick queues its own pass, which waits for the resource if one is already live. Agentless |
| `KnowledgePull` | `/knowledge` pull (`knowledge::pull`): at boot (commits that landed while `hive-c0re` was down), on the swarm knowledge-changed event, and hourly as a fallback. Holds `Resource::KnowledgeTree` (capacity 1), so two pulls never overlap on the working tree; each trigger queues its own pass, which waits for the resource if one is already live. Agentless |
| `WantedPull` | pull of the agent set the swarm controller declares for this hive (`wanted::pull`), converging the agents it names. Runs at boot, waiting up to a minute in total for the queue connection, and again after every attach of the wanted-state watch (which retries with a backoff when the attach fails or the stream ends); the deploy event (`swarm_status`) and the watch are the fast path, this repairs a missed one. A first deploy already queued or running for an agent isn't queued again. Agentless |

View file

@ -642,7 +642,7 @@ async fn substitute(host: &impl Host, name: &str, rev: &str) -> Result<String, L
/// Profile-swap: re-apply drop-ins (rebuild is the reconcile verb),
/// `nixos-container update`, then the post-rebuild bookkeeping tail
/// (rev marker, `Rebuilt` event, forge/matrix sync, kick, rescan).
/// (rev marker, `Rebuilt` event, forge sync, kick, rescan).
/// The recovery-start on failure is NOT here — the DAG's tail
/// `Reconcile` runs after this node terminal ok *or* fail.
async fn run_swap(
@ -658,7 +658,7 @@ async fn run_swap(
let paths = Coordinator::agent_paths(name, agent_dir)?;
let rev = host.recorded_rev(name)?;
let result = host.swap_update(name, &hive, &paths, &rev, id.get()).await;
// On success the Ok-only bookkeeping tail (rev marker, forge/matrix
// On success the Ok-only bookkeeping tail (rev marker, forge
// sync, kick, rescan, snapshot) runs in the sibling `RebuildBookkeeping` node,
// which deps `AfterOk(Swap)`. On failure `RebuildBookkeeping` is cancel-cascaded
// and the tail `Reconcile` (`AfterAny(RebuildBookkeeping)`) handles recovery; here

View file

@ -201,7 +201,7 @@ async fn main() -> Result<()> {
}
/// One periodic sweep tick. Queues unconditionally; the node's own
/// capacity-1 resource dep (`Resource::MatrixSweep` / `KnowledgeTree`) is
/// capacity-1 resource dep (`Resource::KnowledgeTree`) is
/// what keeps two passes of the same kind from running together, so a tick
/// landing while one is live just queues one more pass behind it.
fn submit_periodic_sweep(

View file

@ -196,17 +196,17 @@ fn boot_action(wanted: Option<crate::power::Wanted>, fresh: bool, running: bool)
}
}
/// Submit the boot-time forge/matrix/knowledge/wanted-state sweeps as DAG
/// nodes — `ForgeSweep`, `MatrixSweep`, `KnowledgePull`, `WantedPull`. Unlike
/// Submit the boot-time forge/knowledge/wanted-state sweeps as DAG
/// nodes — `ForgeSweep`, `KnowledgePull`, `WantedPull`. Unlike
/// [`submit_boot_tree`] this runs on **every** boot, quiet or not: these
/// aren't config-drift work, they're startup housekeeping that always needs
/// to happen, and the point of moving them here is exactly so they show up
/// as real work on the dashboard instead of an invisible `tokio::spawn` that
/// only surfaces on failure. Four independent, build-slot- and lease-exempt
/// only surfaces on failure. Three independent, build-slot- and lease-exempt
/// roots — no dependency edges between them, matching the existing
/// `Reconcile`-root pattern in [`boot_nodes`]. `MatrixSweep` and
/// `KnowledgePull` hold their sweep's own resource, so each queues behind any
/// pass of the same sweep already running.
/// `Reconcile`-root pattern in [`boot_nodes`]. `KnowledgePull` holds its
/// sweep's own resource, so it queues behind any pass of the same sweep
/// already running.
fn submit_startup_sweep_nodes(coord: &Arc<Coordinator>) {
use crate::job_queue::NodeKind;