refactor(#2897): carry the meta-update inputs on the MetaLock node
Second of the `Dag` field removals, and the same shape as the first:
`DagSpec`/`NodeKind::Dag` carried an `inputs: Vec<String>` that exactly
one node ever read. Both reads live inside `run_meta_lock` — the
`meta::lock_update` call and the `meta_update_cascade_agents` fan-out —
so the list now rides `NodeKind::MetaLock` itself.
The executor stops touching `Claim` for this node entirely: its dispatch
arm already destructured `MetaLock { sweep, fanout }`, so `inputs` joins
them and the `claim` parameter, which had no other use, is gone.
Falls out of that:
- `Claim::inputs` and `DagMeta::inputs` delete.
- `dag_view`'s DAG-level projection onto the `MetaLock` node reads the
payload instead. The wire `NodeView::inputs` is unchanged: still
populated on the `meta_lock` node alone.
- the boot sweep names no inputs (it bumps `hyperhive` alone via
`lock_update_hyperhive`), which the construction site now says out loud
rather than leaving implicit in an empty DAG-level field.
Checked with clippy (`--all-targets -D warnings`), `cargo test -p
hive-c0re` (320 passed) and `nix fmt`. No option surface is touched, so
no nix-eval gate.
This commit is contained in:
parent
84aed5fb51
commit
af2b1ce0e2
7 changed files with 22 additions and 31 deletions
|
|
@ -84,15 +84,20 @@ pub enum NodeKind {
|
|||
/// upstream `Provision` node already registered the agent in meta.
|
||||
Create { agent: String },
|
||||
/// Meta flake lock bump. `sweep = false`: `meta::lock_update`
|
||||
/// (commit fused, under `META_LOCK`) with the DAG's `inputs`;
|
||||
/// (commit fused, under `META_LOCK`) with this node's own `inputs`;
|
||||
/// `sweep = true`: `meta::lock_update_hyperhive`, *non-fatal* (a
|
||||
/// failed boot-time bump must not cancel the fan-out rebuilds).
|
||||
/// On success the scheduler appends child `Rebuild` DAGs: the
|
||||
/// precomputed `fanout` list when present (boot sweep), else the
|
||||
/// post-bump affected set (`meta_update_cascade_agents`).
|
||||
///
|
||||
/// `inputs` are the flake inputs to bump — empty means "all", and the
|
||||
/// boot sweep leaves them empty since it bumps `hyperhive` alone. They
|
||||
/// ride this node because it is the only thing that reads them.
|
||||
MetaLock {
|
||||
sweep: bool,
|
||||
fanout: Option<Vec<String>>,
|
||||
inputs: Vec<String>,
|
||||
},
|
||||
/// Idempotent power converge *planner*: read `wanted` + observed
|
||||
/// state and decide the action (start if `Up` & down, stop if
|
||||
|
|
@ -281,7 +286,6 @@ pub enum NodeKind {
|
|||
source: Source,
|
||||
reason: String,
|
||||
transient: Option<TransientKind>,
|
||||
inputs: Vec<String>,
|
||||
created_at: i64,
|
||||
},
|
||||
}
|
||||
|
|
@ -459,8 +463,6 @@ pub struct DagSpec {
|
|||
pub source: Source,
|
||||
/// Free-form "why".
|
||||
pub reason: String,
|
||||
/// Meta-update only: the inputs to bump. Display copy lives on the DAG.
|
||||
pub inputs: Vec<String>,
|
||||
/// Dashboard transient pill (and crash-watch suppression) held for
|
||||
/// the lease window — from lease acquisition to DAG terminal.
|
||||
pub transient: Option<crate::coordinator::TransientKind>,
|
||||
|
|
|
|||
Loading…
Reference in a new issue