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