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