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

+25 -4
View File
@@ -78,6 +78,10 @@ pub struct AgentEntry {
pub args: Vec<String>,
#[serde(default)]
pub bypass_args: Vec<String>,
/// The agent can start a subagent from inside a session. Missing means it
/// cannot, so a custom agent without the key reads `false`.
#[serde(default)]
pub helpers: bool,
#[serde(default)]
pub model_args: Vec<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
@@ -1678,6 +1682,21 @@ mod tests {
.all(|e| !e.command.is_empty() && !e.args.is_empty()));
}
#[test]
fn helpers_is_true_for_claude_and_false_for_everything_else() {
// The Review Loop picks its round shape from this flag: one session
// with a reviewer subagent, or a reviewer session then a fixer one.
let list = parse_agent_list(BAKED_AGENTS).expect("the baked list parses");
for e in list.builtins.iter().chain(list.templates.iter()) {
assert_eq!(e.helpers, e.id == "claude", "helpers for {}", e.id);
}
// An entry without the key reads false.
let text =
r#"{"schema":1,"agents":[{"id":"x","name":"X","kind":"template","command":"x"}]}"#;
let list = parse_agent_list(text).expect("parses");
assert!(!list.templates[0].helpers);
}
#[test]
fn the_list_loader_rejects_a_bad_file_and_reads_the_installed_path() {
// Not JSON, not an object, or the wrong schema is an error: the
@@ -1809,6 +1828,7 @@ mod tests {
prompt: String::new(),
args: vec![],
bypass_args: vec![],
helpers: false,
model_args: vec![],
install_url: None,
install: PerOs::default(),
@@ -1985,10 +2005,11 @@ mod tests {
let dir = temp_dir("find");
let file = dir.join("agents.json");
std::fs::write(&file, GOOSE).unwrap();
assert_eq!(
find_agent_in("claude", Some(&file)),
Some(Agent::Builtin(entry("claude")))
);
// A built-in wins over the file. Only its identity is compared: the list the
// lookup reads is the installed one, which a machine may still hold from before
// a field was added, so a whole-entry comparison depended on that machine.
let found = find_agent_in("claude", Some(&file));
assert!(matches!(&found, Some(Agent::Builtin(e)) if e.id == entry("claude").id));
let goose = find_agent_in("goose", Some(&file)).unwrap();
assert_eq!(
(