hyperhive/hive-jobq/src
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 82ef06f445 refactor(#2949): kill Declare — a running node declares onto its own builder
A node no longer hands back a recipe for the scheduler to replay later. It
declares straight onto a builder it was given, and that builder is inserted
as part of completing the node.

Deleted: `pub type Declare`, `struct NodeOutput` (+ its hand-written `Debug`),
`JobQueue::append_subgraph`. Nothing added to `Dag` / `DagView`.

jobq gains `Scheduler::new_job()` (the only way to obtain a `JobBuilder`) and
`complete_growing(id, outcome, grown)`, which inserts under `id` and *then*
completes it, so a DAG cannot roll terminal while grown work is still pending.
`complete()` and `complete_growing()` share a private `finish()` rather than
one redirecting through the other. The DAG-gone guard lives beside the graph
now, where it cannot be skipped, instead of being a caller-side lookup.

The growth executors return data (`run_meta_lock -> (Vec<String>, RebuildOpts)`,
`run_reconcile -> Option<NodeKind>`) rather than taking the builder: a `&Job`
parameter is live for the whole function body, and `&RefCell<T>` is never
`Send`, so an async fn taking one cannot be spawned. `run_node` threads the
builder by value and hands it back.

A node can now declare work and then fail, which was previously inexpressible.
`grown` is dropped in that case — failure cancel-cascades downstream, so
inserting it would only add nodes to immediately cancel — and the log line
carries `grown_nodes` so the drop is visible.
2026-08-02 22:00:34 +02:00
..
builder.rs jobq: drop JobBuilder's Default impl so it is really unconstructible outside 2026-08-02 22:00:34 +02:00
lib.rs jobq: make the builder the only way nodes enter a graph 2026-08-02 15:45:27 +02:00
resources.rs refactor(#2500): encapsulate the jobq lock, drop the dead borrowed-guard layer 2026-07-19 15:24:11 +02:00
scheduler.rs refactor(#2949): kill Declare — a running node declares onto its own builder 2026-08-02 22:00:34 +02:00