1#![deny(missing_docs)]
23
24pub mod advise;
25pub mod agent;
26pub mod already;
27pub mod ask;
28mod base_conflict;
29mod base_recovery_control;
30mod base_sync_recovery;
31pub mod blind;
32pub mod blockers;
33pub mod bump;
34pub mod cache;
35pub mod chat_control;
36mod chat_merge;
37pub mod chat_notify;
38pub mod chat_watch;
39pub mod chat_worker;
40pub mod clean;
41pub mod conduct;
42pub mod config;
43pub mod consult;
44pub mod daemon;
45pub mod deputy;
46pub mod direct;
47pub mod disk;
48mod driver;
49pub mod dupes;
50pub mod fixer;
51mod fold_evidence;
52pub mod followup;
53pub mod foreign_checkout;
54pub mod git;
55pub mod github_text;
56pub mod graft;
57pub mod graft_report;
58pub mod graph;
59pub mod handover;
60mod id_reserve;
61pub mod incremental;
62pub mod land;
63pub mod lang;
64mod lock_file;
65pub mod md;
66pub mod merge_decision;
67pub mod notice_delivery;
68mod notice_semantics;
69pub mod notices;
70pub mod persona;
71pub mod persona_icon;
72mod pr_head;
73pub mod pr_outcome;
74pub mod pr_recovery;
75pub mod proc;
76pub mod prompt;
77pub mod question_delivery;
78pub mod queue;
79pub mod rebase;
80pub mod reconcile;
81pub mod recovery;
82pub mod refs;
83pub mod release_local;
84pub mod release_manifest;
85pub mod release_watch;
86pub mod repair_budget;
87pub mod repo_clone;
88mod repo_lock;
89pub mod report;
90pub mod report_view;
91pub mod repos;
92pub mod retention;
93pub mod review_repair;
94pub mod rng;
95pub mod run;
96pub mod run_progress;
97pub mod scrub;
98mod seat_process;
99pub mod settings;
100pub mod startup_reconcile;
102pub mod stats;
103mod stop_reason;
104pub mod talk;
105pub mod task_chat;
106pub mod task_decision;
107pub mod task_inquiry;
108pub mod triage;
109pub mod tui;
110pub mod updater;
111pub mod verdict;
112pub mod waiter;
113pub mod web;
114pub mod worker;
115mod worktree_clean;
116pub mod worktree_setup;
117
118pub mod choice_effect;
119mod resume;
120
121#[cfg(test)]
124pub(crate) fn standalone_test(name: &str) -> bool {
125 const CHILD: &str = "MAGI_STANDALONE_TEST";
126 if std::env::var(CHILD).as_deref() == Ok(name) {
127 return true;
128 }
129 let mut command = std::process::Command::new(std::env::current_exe().expect("test executable"));
130 for key in worker::INVOCATION_ENV {
131 command.env_remove(key);
132 }
133 let output = command
134 .args(["--exact", name, "--nocapture"])
135 .env(CHILD, name)
136 .output()
137 .expect("standalone test process");
138 assert!(
139 output.status.success() && String::from_utf8_lossy(&output.stdout).contains("1 passed"),
140 "standalone test {name} failed: {}\n{}\n{}",
141 output.status,
142 String::from_utf8_lossy(&output.stdout),
143 String::from_utf8_lossy(&output.stderr)
144 );
145 false
146}
147
148pub mod repo_selector;
149pub mod task_reassign;