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 notices;
61pub mod persona;
62pub mod persona_icon;
63mod pr_head;
64pub mod pr_outcome;
65pub mod pr_recovery;
66pub mod proc;
67pub mod prompt;
68pub mod question_delivery;
69pub mod queue;
70pub mod rebase;
71pub mod reconcile;
72pub mod recovery;
73pub mod refs;
74pub mod release_local;
75pub mod release_manifest;
76pub mod release_watch;
77mod repo_lock;
78pub mod report;
79pub mod report_view;
80pub mod repos;
81pub mod retention;
82pub mod review_repair;
83pub mod rng;
84pub mod run;
85pub mod scrub;
86mod seat_process;
87pub mod settings;
88pub mod stats;
89mod stop_reason;
90pub mod talk;
91pub mod task_chat;
92pub mod triage;
93pub mod tui;
94pub mod updater;
95pub mod verdict;
96pub mod waiter;
97pub mod web;
98pub mod worker;
99pub mod worktree_setup;
100
101pub mod choice_effect;
102mod resume;
103
104#[cfg(test)]
107pub(crate) fn standalone_test(name: &str) -> bool {
108 const CHILD: &str = "MAGI_STANDALONE_TEST";
109 if std::env::var(CHILD).as_deref() == Ok(name) {
110 return true;
111 }
112 let output = std::process::Command::new(std::env::current_exe().expect("test executable"))
113 .args(["--exact", name, "--nocapture"])
114 .env(CHILD, name)
115 .env_remove("MAGI_WORKER_ID")
116 .env_remove("MAGI_WORKER_GENERATION")
117 .env_remove("MAGI_WORKER_HOME")
118 .env_remove("MAGI_WORKER_EXE")
119 .output()
120 .expect("standalone test process");
121 assert!(
122 output.status.success() && String::from_utf8_lossy(&output.stdout).contains("1 passed"),
123 "standalone test {name} failed: {}\n{}\n{}",
124 output.status,
125 String::from_utf8_lossy(&output.stdout),
126 String::from_utf8_lossy(&output.stderr)
127 );
128 false
129}