fix(#2569): wake body points at get_loose_ends (get_todos rename is a later increment); strip tracker tags from source comments per hive-rules
This commit is contained in:
parent
711e0ece2a
commit
8149dc7633
9 changed files with 12 additions and 12 deletions
|
|
@ -33,7 +33,7 @@ pub struct Coordinator {
|
|||
pub broker: Arc<Broker>,
|
||||
pub approvals: Arc<Approvals>,
|
||||
pub questions: Arc<OperatorQuestions>,
|
||||
/// Dynamic, subsystem-pushed todos (loose-ends v2, #2569). In-agent
|
||||
/// Dynamic, subsystem-pushed todos (loose-ends v2). In-agent
|
||||
/// subsystems (matrix, forge, bash) upsert/clear todos over mcp.sock
|
||||
/// instead of firing wakes directly; `get_todos` merges these with
|
||||
/// the computed static loose ends.
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ pub fn for_agent(coord: &Coordinator, agent: &str) -> Result<Vec<LooseEnd>> {
|
|||
age_seconds: saturating_age(now, r.created_at.timestamp()),
|
||||
});
|
||||
}
|
||||
// Dynamic, subsystem-pushed todos (loose-ends v2, #2569). Scoped to
|
||||
// Dynamic, subsystem-pushed todos (loose-ends v2). Scoped to
|
||||
// this agent; the producing subsystem or the agent itself clears them.
|
||||
out.extend(todos_for(coord, agent, None)?);
|
||||
Ok(out)
|
||||
|
|
|
|||
|
|
@ -575,7 +575,7 @@ async fn dispatch(req: &AgentRequest, agent: &str, coord: &Arc<Coordinator>) ->
|
|||
since_secs,
|
||||
agent: target,
|
||||
} => handle_reminder_rollup(coord, agent, target.as_deref(), *since_secs),
|
||||
// Todos (loose-ends v2, #2569): in-container subsystems push/clear
|
||||
// Todos (loose-ends v2): in-container subsystems push/clear
|
||||
// their own; the agent lists / marks its own done. Scoped to the
|
||||
// calling agent (the socket identity) — no cross-agent access.
|
||||
AgentRequest::UpsertTodo {
|
||||
|
|
@ -819,7 +819,7 @@ fn handle_upsert_todo(
|
|||
let _ = coord.broker.send(&Message {
|
||||
from: "todo".to_owned(),
|
||||
to: agent.to_owned(),
|
||||
body: "you have todos — call get_todos".to_owned(),
|
||||
body: "you have todos — call get_loose_ends to see them".to_owned(),
|
||||
in_reply_to: None,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//! Todo store — the persistent, DB-backed half of the "todos"
|
||||
//! (loose-ends v2) system (issue #2569).
|
||||
//! (loose-ends v2) system.
|
||||
//!
|
||||
//! Subsystems inside an agent's container (matrix, forge-notify, bash,
|
||||
//! …) push *todos* to the agent over the mcp.sock protocol instead of
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
//! (no duplicate) and a producer can list / clear / rebuild only its own
|
||||
//! set (e.g. matrix wipes + recreates its todos on daemon restart).
|
||||
//!
|
||||
//! Removal has two paths (mara's call on #2569): the producing subsystem
|
||||
//! Removal has two paths (mara's call): the producing subsystem
|
||||
//! `clear`s a todo it has resolved (keyed by subsystem + key), or the
|
||||
//! agent itself `mark_done`s one by id. Both delete the row.
|
||||
//!
|
||||
|
|
|
|||
|
|
@ -909,7 +909,7 @@ pub async fn collect_unread(client: &Client) -> Vec<crate::protocol::RoomUnread>
|
|||
}
|
||||
|
||||
/// Like [`collect_unread`] but pairs each entry with its `OwnedRoomId`.
|
||||
/// The todo producer (loose-ends v2, #2569) needs the room id as the
|
||||
/// The todo producer (loose-ends v2) needs the room id as the
|
||||
/// per-room upsert/dedup key, which the claude-facing `RoomUnread`
|
||||
/// payload intentionally doesn't carry.
|
||||
#[must_use]
|
||||
|
|
|
|||
|
|
@ -299,7 +299,7 @@ async fn bring_up_account(
|
|||
// each sweep (see the sweep fns) so re-invites / new messages re-wake.
|
||||
let invite_notified = Arc::new(tokio::sync::Mutex::new(std::collections::HashSet::new()));
|
||||
let unread_notified = Arc::new(tokio::sync::Mutex::new(std::collections::HashSet::new()));
|
||||
// Startup cancel-and-recreate (loose-ends v2, #2569): wipe this agent's
|
||||
// Startup cancel-and-recreate (loose-ends v2): wipe this agent's
|
||||
// matrix todos so stale ones (rooms read while the daemon was down) don't
|
||||
// linger, then let the first sweep rebuild the set to match current
|
||||
// unread reality. Best-effort; the sweep converges regardless.
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ use tokio::sync::Mutex;
|
|||
|
||||
use crate::{handlers, wake};
|
||||
|
||||
/// Push a *todo* (loose-ends v2, #2569) for each joined room carrying
|
||||
/// Push a *todo* (loose-ends v2) for each joined room carrying
|
||||
/// unread notifications, and clear the todo for rooms that have been read.
|
||||
/// Replaces the old direct-wake path: instead of firing an all-rooms wake,
|
||||
/// each unread room becomes a per-room `upsert_todo` keyed by its room id,
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ pub async fn send_wake(socket: &Path, body: impl AsRef<str>) -> Result<()> {
|
|||
send_line(socket, &payload).await
|
||||
}
|
||||
|
||||
/// Upsert a matrix-subsystem *todo* (loose-ends v2, #2569) on the
|
||||
/// Upsert a matrix-subsystem *todo* (loose-ends v2) on the
|
||||
/// hyperhive control socket — the replacement for a direct wake. `key` is
|
||||
/// the room id (the dedup key); hive-c0re coalesces a wake iff the todo is
|
||||
/// new or its `summary` changed. Best-effort like [`send_wake`].
|
||||
|
|
|
|||
|
|
@ -269,7 +269,7 @@ pub enum LooseEnd {
|
|||
#[serde(default)]
|
||||
summary: String,
|
||||
},
|
||||
/// A dynamic, subsystem-pushed todo (loose-ends v2, #2569). Produced
|
||||
/// A dynamic, subsystem-pushed todo (loose-ends v2). Produced
|
||||
/// by an in-container subsystem (matrix / forge / bash) via
|
||||
/// `UpsertTodo`. Cleared by that subsystem (`ClearTodo`) or by the
|
||||
/// agent itself (`MarkTodoDone`, by `id`).
|
||||
|
|
@ -439,7 +439,7 @@ pub enum Request {
|
|||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
agent: Option<String>,
|
||||
},
|
||||
/// Upsert a *todo* (loose-ends v2, #2569) from an in-container
|
||||
/// Upsert a *todo* (loose-ends v2) from an in-container
|
||||
/// subsystem (matrix / forge / bash). `subsystem` is the producer
|
||||
/// marker; `key` is the optional subsystem-specific dedup key (a
|
||||
/// matrix room id, a bash task id). Re-pushing an identical keyed
|
||||
|
|
|
|||
Loading…
Reference in a new issue