Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions codex-rs/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions codex-rs/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ codex-plugin = { workspace = true }
codex-protocol = { workspace = true }
codex-responses-api-proxy = { workspace = true }
codex-rmcp-client = { workspace = true }
codex-rollout = { workspace = true }
codex-rollout-trace = { workspace = true }
codex-sandboxing = { workspace = true }
codex-state = { workspace = true }
Expand Down
9 changes: 9 additions & 0 deletions codex-rs/cli/src/doctor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ mod output;
mod progress;
mod runtime;
mod system;
mod thread_inventory;
mod title;
mod updates;

Expand All @@ -84,6 +85,7 @@ use progress::doctor_progress;
use runtime::runtime_check;
use runtime::search_check;
use system::system_check;
use thread_inventory::thread_inventory_check;
use title::terminal_title_check;
use updates::updates_check;

Expand Down Expand Up @@ -362,6 +364,7 @@ async fn build_report(
git_check,
terminal_title_check,
state_check,
thread_inventory_check,
background_server_check,
reachability_check,
) = tokio::join!(
Expand Down Expand Up @@ -392,6 +395,11 @@ async fn build_report(
})
},
run_async_check("state", progress.clone(), state_check(config)),
run_async_check(
"thread inventory",
progress.clone(),
thread_inventory_check(config),
),
run_async_check(
"app-server",
progress.clone(),
Expand All @@ -415,6 +423,7 @@ async fn build_report(
git_check,
terminal_title_check,
state_check,
thread_inventory_check,
background_server_check,
reachability_check,
]);
Expand Down
23 changes: 23 additions & 0 deletions codex-rs/cli/src/doctor/output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ const GROUPS: &[OutputGroup] = &[
title: "Environment",
keys: &[
"system", "runtime", "install", "search", "git", "terminal", "title", "state",
"threads",
],
},
OutputGroup {
Expand Down Expand Up @@ -1340,6 +1341,28 @@ Run codex doctor without --summary for detailed diagnostics.
assert_eq!(rendered, expected);
}

#[test]
fn render_human_report_includes_threads_row_in_environment() {
let mut report = sample_report();
report.checks.push(DoctorCheck::new(
"state.rollout_db_parity",
"threads",
CheckStatus::Warning,
"rollout files and state DB thread inventory differ",
));

let rendered = render_human_report(&report, summary_no_color_unicode_options());

let threads_line = rendered
.lines()
.find(|line| line.contains("threads"))
.expect("threads row should be rendered");
assert!(
threads_line.contains("rollout files and state DB thread inventory differ"),
"{threads_line}"
);
}

#[test]
fn render_human_report_supports_ascii_output() {
let rendered = render_human_report(
Expand Down
Loading
Loading