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;
80mod repo_lock;
81pub mod report;
82pub mod report_view;
83pub mod repos;
84pub mod retention;
85pub mod review_repair;
86pub mod rng;
87pub mod run;
88pub mod scrub;
89mod seat_process;
90pub mod settings;
91pub mod stats;
92mod stop_reason;
93pub mod talk;
94pub mod task_chat;
95pub mod triage;
96pub mod tui;
97pub mod updater;
98pub mod verdict;
99pub mod waiter;
100pub mod web;
101pub mod worker;
102pub mod worktree_setup;
103
104pub mod choice_effect;
105mod resume;
106
107#[cfg(test)]
110pub(crate) fn standalone_test(name: &str) -> bool {
111 const CHILD: &str = "MAGI_STANDALONE_TEST";
112 if std::env::var(CHILD).as_deref() == Ok(name) {
113 return true;
114 }
115 let mut command = std::process::Command::new(std::env::current_exe().expect("test executable"));
116 for key in worker::INVOCATION_ENV {
117 command.env_remove(key);
118 }
119 let output = command
120 .args(["--exact", name, "--nocapture"])
121 .env(CHILD, name)
122 .output()
123 .expect("standalone test process");
124 assert!(
125 output.status.success() && String::from_utf8_lossy(&output.stdout).contains("1 passed"),
126 "standalone test {name} failed: {}\n{}\n{}",
127 output.status,
128 String::from_utf8_lossy(&output.stdout),
129 String::from_utf8_lossy(&output.stderr)
130 );
131 false
132}