docs: correct stale recv_blocking + vacuum references
This commit is contained in:
parent
c15eb85085
commit
44c86b9278
4 changed files with 10 additions and 9 deletions
|
|
@ -22,9 +22,9 @@ hive-c0re/ host daemon + CLI (one binary, subcommand-dispatched)
|
||||||
src/manager_server.rs manager-privileged socket (ManagerRequest)
|
src/manager_server.rs manager-privileged socket (ManagerRequest)
|
||||||
src/agent_server.rs per-sub-agent socket listener (long-poll Recv)
|
src/agent_server.rs per-sub-agent socket listener (long-poll Recv)
|
||||||
src/broker.rs sqlite Message store + intra-process broadcast
|
src/broker.rs sqlite Message store + intra-process broadcast
|
||||||
channel (`MessageEvent`) for `recv_blocking` +
|
channel (`MessageEvent`) for `recv_blocking_batch` +
|
||||||
the dashboard forwarder; hourly vacuum of
|
the dashboard forwarder; hourly vacuum of
|
||||||
delivered>30d
|
acked>30d
|
||||||
src/dashboard_events.rs unified wire-facing event channel feeding
|
src/dashboard_events.rs unified wire-facing event channel feeding
|
||||||
`/dashboard/stream`. Carries broker `Sent` /
|
`/dashboard/stream`. Carries broker `Sent` /
|
||||||
`Delivered` (mirrored by the forwarder task
|
`Delivered` (mirrored by the forwarder task
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@ claude has access to in return.
|
||||||
Each agent harness (`hive-ag3nt serve` or `hive-m1nd serve`) runs:
|
Each agent harness (`hive-ag3nt serve` or `hive-m1nd serve`) runs:
|
||||||
|
|
||||||
1. Long-poll `Recv` on its socket. The host-side broker
|
1. Long-poll `Recv` on its socket. The host-side broker
|
||||||
(`broker.rs::recv_blocking`) returns immediately if there's a
|
(`broker.rs::recv_blocking_batch`) returns immediately if there's
|
||||||
pending message, otherwise waits up to 30 s for a broker `Sent`
|
a pending message, otherwise waits up to 30 s for a broker `Sent`
|
||||||
event for this recipient.
|
event for this recipient.
|
||||||
2. Pop one message. Peek the remaining inbox depth with `Status`.
|
2. Pop one message. Peek the remaining inbox depth with `Status`.
|
||||||
3. Emit `LiveEvent::TurnStart { from, body, unread }` onto the SSE
|
3. Emit `LiveEvent::TurnStart { from, body, unread }` onto the SSE
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
//! and re-emits each `MessageEvent` as a `DashboardEvent::Sent` /
|
//! and re-emits each `MessageEvent` as a `DashboardEvent::Sent` /
|
||||||
//! `DashboardEvent::Delivered` with a freshly-stamped seq. Keeping the
|
//! `DashboardEvent::Delivered` with a freshly-stamped seq. Keeping the
|
||||||
//! broker's intra-process channel separate avoids coupling the broker
|
//! broker's intra-process channel separate avoids coupling the broker
|
||||||
//! (used by `recv_blocking` inside the harness loop) to dashboard
|
//! (used by `recv_blocking_batch` inside the harness loop) to dashboard
|
||||||
//! presentation concerns.
|
//! presentation concerns.
|
||||||
//!
|
//!
|
||||||
//! New mutation kinds (approval added/resolved, question added/answered,
|
//! New mutation kinds (approval added/resolved, question added/answered,
|
||||||
|
|
|
||||||
|
|
@ -148,9 +148,10 @@ async fn main() -> Result<()> {
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
forge::ensure_all().await;
|
forge::ensure_all().await;
|
||||||
});
|
});
|
||||||
// Periodic broker vacuum: drop delivered messages older than
|
// Periodic broker vacuum: drop fully-acked messages older
|
||||||
// 30 days. Undelivered messages are always kept (still in
|
// than 30 days. Delivered-but-unacked rows (recoverable via
|
||||||
// flight). Runs hourly; first sweep happens immediately.
|
// requeue_inflight) and undelivered rows are always kept.
|
||||||
|
// Runs hourly; first sweep happens immediately.
|
||||||
let vacuum_coord = coord.clone();
|
let vacuum_coord = coord.clone();
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
let interval_secs = 3600u64;
|
let interval_secs = 3600u64;
|
||||||
|
|
@ -178,7 +179,7 @@ async fn main() -> Result<()> {
|
||||||
// channel with a freshly-stamped seq, so the dashboard SSE
|
// channel with a freshly-stamped seq, so the dashboard SSE
|
||||||
// sees broker messages + future mutation events on one
|
// sees broker messages + future mutation events on one
|
||||||
// stream with one monotonic seq. The broker's intra-process
|
// stream with one monotonic seq. The broker's intra-process
|
||||||
// channel (used by `recv_blocking`) stays untouched.
|
// channel (used by `recv_blocking_batch`) stays untouched.
|
||||||
spawn_broker_to_dashboard_forwarder(coord.clone());
|
spawn_broker_to_dashboard_forwarder(coord.clone());
|
||||||
let dash_coord = coord.clone();
|
let dash_coord = coord.clone();
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue