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