hive-c0re: graceful agent stop — quiesce harness, flush state, then stop
This commit is contained in:
parent
bf65345b83
commit
03ea5d601b
8 changed files with 202 additions and 2 deletions
|
|
@ -529,6 +529,11 @@ pub enum Request {
|
|||
/// crashed-mid-turn sessions. See
|
||||
/// `docs/conventions.md::Broker delivery + ack cycle`.
|
||||
RequeueInflight,
|
||||
/// Harness → c0re: "I saw the `GracefulStop` signal, ran my
|
||||
/// stop-checkpoint turn (durable `/state` flushed) and am exiting my
|
||||
/// serve loop now." Lets the `GracefulStop` orchestration stop the
|
||||
/// container immediately instead of waiting out its timeout fallback.
|
||||
GracefulStopComplete,
|
||||
/// *(capability-gated: `read_host_journal`)* Fetch recent lines
|
||||
/// from the host journal. Filters are all optional; omitting all
|
||||
/// returns the last `lines` entries from the global journal.
|
||||
|
|
@ -700,6 +705,15 @@ pub enum Response {
|
|||
/// status. Ordered by topology depth (parents before children), then
|
||||
/// alphabetically within each depth tier.
|
||||
Containers { containers: Vec<ContainerInfo> },
|
||||
/// `Recv` result when a graceful stop is pending for this agent
|
||||
/// (set by hive-c0re's `GracefulStop` orchestration). Returned in
|
||||
/// place of `Messages` — it doubles as the inbound fence: the harness
|
||||
/// stops consuming normal inbox messages and instead runs one
|
||||
/// stop-checkpoint turn (flush durable `/state`), then reports
|
||||
/// `GracefulStopComplete` and exits its serve loop so the container
|
||||
/// can be stopped cleanly. New sends keep queueing in the broker for
|
||||
/// the agent's next start.
|
||||
GracefulStop,
|
||||
}
|
||||
|
||||
/// Backwards-compatible response aliases.
|
||||
|
|
|
|||
Loading…
Reference in a new issue