address mara: drop CompactionMode, always checkpoint-then-compact

This commit is contained in:
damocles 2026-06-29 19:35:29 +02:00 committed by mara
commit c7bac398b2
4 changed files with 17 additions and 89 deletions

View file

@ -546,9 +546,6 @@ async fn serve_loop<S: Surface>(
stats.as_ref(),
files,
&turn_lock,
// The graceful prompt IS the checkpoint — compact
// directly afterwards if needed, no second wake.
turn::CompactionMode::CompactOnly,
graceful_stop_message(),
)
.await;
@ -557,16 +554,7 @@ async fn serve_loop<S: Surface>(
}
},
};
let ctrl = handle_turn::<S>(
socket,
&bus,
stats.as_ref(),
files,
&turn_lock,
turn::CompactionMode::CheckpointThenCompact,
next,
)
.await;
let ctrl = handle_turn::<S>(socket, &bus, stats.as_ref(), files, &turn_lock, next).await;
if ctrl.auth_failed {
*login_state.lock().unwrap() = LoginState::NeedsLogin;
turn::wait_for_login(
@ -595,7 +583,6 @@ async fn handle_turn<S: Surface>(
stats: Option<&TurnStats>,
files: &turn::TurnFiles,
turn_lock: &TurnLock,
compaction: turn::CompactionMode,
first: hive_sh4re::DeliveredMessage,
) -> TurnControl {
let from = first.from;
@ -616,7 +603,7 @@ async fn handle_turn<S: Surface>(
let prompt = serve_common::format_wake_prompt(&from, &body, unread, redelivered);
let outcome = {
let _guard = turn_lock.lock().await;
turn::drive_turn_with(&prompt, files, bus, compaction).await
turn::drive_turn(&prompt, files, bus).await
};
turn::emit_turn_end(bus, &outcome);
bus.set_state(TurnState::Idle);