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