huskies: merge 996

This commit is contained in:
dave
2026-05-13 22:23:46 +00:00
parent cd9021fedf
commit 1ee23e7bfe
3 changed files with 352 additions and 0 deletions
+8
View File
@@ -65,6 +65,11 @@ pub(crate) fn spawn_event_bridges(
root.clone(),
);
// Content-store GC subscriber: purges all ContentKey::* entries for a
// story when it reaches a terminal stage, preventing zombie entries from
// accumulating in the process heap (story 996).
crate::db::gc::spawn_content_gc_subscriber();
let watcher_auto_rx = watcher_tx.subscribe();
let watcher_auto_agents = Arc::clone(&agents);
tokio::spawn(async move {
@@ -200,6 +205,9 @@ pub(crate) fn spawn_startup_reconciliation(
) {
if let Some(root) = startup_root {
tokio::spawn(async move {
// Purge content-store entries for stories that reached terminal
// stages in a previous session (before the GC subscriber was active).
crate::db::gc::sweep_zombie_content_on_startup();
crate::slog!("[startup] Reconciling completed worktrees from previous session.");
startup_agents
.reconcile_on_startup(&root, &startup_reconciliation_tx)