hyperhive/docs
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas e8e6998ac5 refactor(#2756): replace the DAG terminal hook with real tail nodes
The queue carried a per-DAG `HookKind` that fired an inline side effect
from outside the graph when a container rolled up terminal. mara asked
three times why this could not be an ordinary node; the answer in the
code was a doc-comment claiming a node could not work, and it was wrong.

`DepWhen::AfterAny` already existed with two live users, and a weak edge
is satisfied by a `Cancelled` dep, so a tail node runs on success,
failure and cancel alike. What was genuinely missing was smaller than a
hook: a node had no way to learn how the work it followed ended.

So: `Claim` now carries `deps: Vec<DepOutcome>`, snapshotted at claim
time from the graph the scheduler already holds (no `hive-jobq` change).
`Claim::deps_state()` / `deps_error()` roll that up, and two new kinds
consume it — `ResolveApproval { approval_id }` and `EmitRebuilt { agent }`.
Templates append one as a group-root with `AfterAny` edges onto the DAG's
other group roots; a root's state is its subtree's roll-up, so that
covers every node without fanning out to each of them.

Deleted: `HookKind`, `DagSpec.hook`, `NodeKind::Dag.hook`, `DagMeta.hook`,
`TerminalDag`, `terminal_dag()`, `terminal_summary()`, `dag_agents()`,
`dag_rollup()`, `fire_terminal_hook()`, `run_terminal_hook()`,
`emit_rebuilt()`. `complete_node` returns `()`.

Load-bearing details:

- `JobQueue::cancel` spares tail nodes instead of cancelling the whole
  subtree, and returns `bool`. Without this a cancelled approval DAG
  would dangle its approval forever — the hazard `tests.rs` already
  named. The spared tail's deps are `Cancelled`, which satisfies its weak
  edge, so the scheduler claims it and it resolves the row as cancelled.
  `hive-jobq` anticipated exactly this: `cancel_node`'s doc already says
  to settle afterwards so "a weak-edge terminal node observing the
  cancellation" can advance.
- The existing `complete(container)` call after cancelling is kept and is
  deliberately a no-op when a tail was spared (a non-terminal child parks
  the container back in `Finishing`), so power ops still settle
  synchronously with no branch.
- `DeployTail` is NOT `is_tail()`: it does real compensating work, and a
  cancelled DAG has nothing to compensate.
- `exec::failure_reason` falls back to `first_error(dag_id)` because a
  group root that rolled up `Failed` from a child carries no error of its
  own — without it every tail-reported failure would lose its reason.
- `EmitRebuilt` is per agent, so a multi-agent DAG reports each agent's
  own outcome rather than painting all of them with the DAG roll-up.
- `ResolveApproval` is agentless: the approval row already names its
  agent, and that is also what lets one tail close a multi-agent DAG.

Transients-derived-from-running-nodes and the frontend's node-kind
strings stay out of this change; they touch iris's slice and review
better next to their own diff.
2026-07-27 15:06:27 +02:00
..
tools fix(hivectl): ask the daemon whether an agent exists 2026-07-27 09:34:43 +02:00
turn-loop feat(#2693): let the operator pin the claude-code every agent runs 2026-07-27 13:56:28 +02:00
web-ui job_queue: retire the now-off-wire step sub-step label 2026-07-26 15:24:35 +02:00
agent-hierarchy.md refactor(hive-agent): split the forge notification poller into its own crate 2026-07-26 21:30:29 +02:00
approvals.md job_queue: grow the rebuild subgraph from DeployApply (#2664) 2026-07-26 02:28:03 +02:00
boundary.md feat(#2641): sudoless hivectl via a hive-admin group on the host socket 2026-07-22 22:50:27 +02:00
ci.md docs(#2415): update docs/ci.md for c0re-owned runner registration 2026-07-16 15:30:34 +02:00
conventions.md docs(#2552): never add #[allow(clippy::...)] — fix lints instead 2026-07-20 19:38:56 +02:00
coordinator.md refactor(#2756): replace the DAG terminal hook with real tail nodes 2026-07-27 15:06:27 +02:00
forge.md refactor(hive-agent): split the forge notification poller into its own crate 2026-07-26 21:30:29 +02:00
gateway.md route gateway htpasswd management through a daemon wire command (#2504) 2026-07-15 23:23:47 +02:00
github.md fix(#1970): bake token path into gh/git wrappers — env var didn't reach claude's bash-tool context 2026-07-11 14:12:25 +02:00
gotchas.md feat(#2693): let the operator pin the claude-code every agent runs 2026-07-27 13:56:28 +02:00
knowledge.md docs(security): ci netns, knowledge .git tmpfs, matrix id/secret split 2026-07-10 19:17:17 +02:00
matrix.md refactor: nix/host-modules + nix/agent-modules layout, update doc paths 2026-07-13 22:05:49 +02:00
network.md fix(gateway): resync the gateway's resolv.conf when the host's changes 2026-07-26 18:01:34 +02:00
observability.md feat(#2007): export per-agent container cpu/mem/disk via otel 2026-07-15 22:51:31 +02:00
persistence.md docs(#2754): document the container weights in coordinator/security/persistence 2026-07-27 11:01:36 +02:00
security.md docs(#2754): document the container weights in coordinator/security/persistence 2026-07-27 11:01:36 +02:00
setup.md refactor(#2416): remove the non-pr config-change flow (request_apply_commit / applycommit) 2026-07-15 21:03:52 +02:00
swarm.md feat(#1997): add prettier markdown formatter to treefmt 2026-07-02 23:33:11 +02:00
terminal-rendering.md refactor(#2416): remove the non-pr config-change flow (request_apply_commit / applycommit) 2026-07-15 21:03:52 +02:00
turn-loop.md refactor(hive-agent): split the forge notification poller into its own crate 2026-07-26 21:30:29 +02:00
web-ui.md feat: rename matrix-accounts page to credentials, add github PAT tab 2026-07-11 12:40:13 +02:00