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