Add the Review Loop: unattended review-and-fix rounds in the desktop app and in loop phases

AI Assisted
This commit is contained in:
jparkerweb committed 2026-11-28 21:09:02 -08:00
1 parent d6a28b5dc8
commit 57567d7a0b
71 files changed
+11331 -443

No files matched your search

@@ -0,0 +1,28 @@
//! The retry rule and the strength step-up, called by both the Implementation
//! Loop and the Review Loop.
use std::collections::BTreeMap;
use crate::loop_driver::{LoopSetup, StopCause};
use crate::models::{self, StrengthRow};
/// One fresh retry for a crash, silence or an announce notice that never came
/// (a crash), when the setup allows it and the phase has not used it yet. A
/// failed watcher is never retried.
pub fn should_retry(cause: &StopCause, setup: &LoopSetup, retries_used_this_phase: u32) -> bool {
matches!(
cause,
StopCause::Crash | StopCause::Silence | StopCause::NoSession
) && setup.retry_once
&& retries_used_this_phase == 0
}
/// The strength word one step above `current`, or `None` when there is none
/// (Best stays, an unmapped word stays). A thin wrapper over
/// `models::next_strength`, so a caller without a `RunningRecord` can step up.
pub fn next_strength_word(
resolved: &BTreeMap<String, StrengthRow>,
current: &str,
) -> Option<String> {
models::next_strength(resolved, current)
}