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