huskies: merge 1066

This commit is contained in:
dave
2026-05-14 23:39:56 +00:00
parent bf813d910b
commit bb6a6063e8
15 changed files with 361 additions and 120 deletions
-1
View File
@@ -21,7 +21,6 @@ mod sweep;
pub use events::WatcherEvent;
pub(crate) use sweep::spawn_done_to_archived_subscriber;
#[cfg(test)]
pub(crate) use sweep::sweep_done_to_archived;
use crate::slog;
+4 -3
View File
@@ -70,7 +70,7 @@ pub(crate) fn spawn_done_to_archived_subscriber(done_retention: Duration) {
});
}
/// Sweep items in `Stage::Done` whose `merged_at` timestamp exceeds the
/// Reconcile: sweep items in `Stage::Done` whose `merged_at` timestamp exceeds the
/// retention duration to `Stage::Archived` via the typed transition table.
///
/// Routes through [`crate::pipeline_state::apply_transition`] so the
@@ -78,9 +78,10 @@ pub(crate) fn spawn_done_to_archived_subscriber(done_retention: Duration) {
/// `TransitionFired` event is emitted to subscribers (worktree pruning,
/// matrix notifier, etc.).
///
/// Used in tests for direct one-shot sweeps; production code uses
/// Called at startup and by the periodic reconciler to archive Done stories
/// whose retention has elapsed, even when the `TransitionFired` subscriber
/// lagged and missed their Done event. Production reactive archiving uses
/// [`spawn_done_to_archived_subscriber`] instead.
#[cfg(test)]
pub(crate) fn sweep_done_to_archived(done_retention: Duration) {
use crate::pipeline_state::{PipelineEvent, Stage, apply_transition, read_all_typed};