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