Watch
0
0
Fork
You've already forked hyperhive
0

hive-agent: drop the legacy todos/reminders db migration

This commit is contained in:
damocles 2026-11-22 16:59:24 +01:00
commit 44b248bf6d

View file

@ -14,7 +14,6 @@ mod boot_announce;
mod claude_credentials;
mod claude_md_watch;
mod claude_usage_watch;
mod db_migrate;
mod disk_watch;
mod events;
mod harness_state;
@ -561,26 +560,13 @@ async fn serve_main<S: Surface>(socket: &Path, poll_ms: u64) -> Result<()> {
});
// Before the first turn, so claude's own auto-load finds `AGENTS.md`.
agents_md_migrate::run(&paths::state_dir());
// Messages made inside this container rather than by the broker:
// reminders and the swarm UI's operator input.
let (local_msg_tx, local_msg_rx) = tokio::sync::mpsc::unbounded_channel();
// Harness-local reminders fire into an mpsc channel the serve loop races
// against the broker long-poll (see `reminder_timer`). Best-effort: it
// parks forever instead of closing the channel when the store can't open.
// Opened before the todo socket, which shares the same `Arc`.
// Fold the pre-consolidation per-concern db files into the single
// `hyperhive-state.sqlite`, if this is the first boot since the
// upgrade — see `db_migrate` module docs. Best-effort: a failure here
// just leaves the legacy file(s) in place to retry next boot, so the
// subsystems below still start (`Todos`/`Reminders::open` create the
// schema fresh if nothing migrated across).
if let Err(e) = db_migrate::run(
&paths::state_db(),
&paths::legacy_todos_db(),
&paths::legacy_reminders_db(),
) {
tracing::warn!(error = ?e, "legacy db_migrate failed — continuing with fresh/partial state db");
}
// Messages made inside this container rather than by the broker:
// reminders and the swarm UI's operator input.
let (local_msg_tx, local_msg_rx) = tokio::sync::mpsc::unbounded_channel();
let reminder_store = open_reminders();
let (todo_wake, todos_store) =
start_local_inputs(reminder_store, local_msg_tx, &bus, &interrupted);