Files
codex/codex-rs/cli/src/doctor/windows_dev_drive_tests.rs
T
chess 6efcdad4c3 Add storage diagnostics to codex doctor (#38795)
## What changed

- Report available space for `CODEX_HOME` and the active worktree, warning below 5 GiB and failing below 1 GiB.
- On Windows, report whether the active Git worktree is on a trusted Dev Drive and provide remediation when it is not.
- Run attached doctor reports against the conversation workspace, including workspaces recovered from persisted thread metadata, while keeping the subprocess anchored in `CODEX_HOME` so deleted workspaces do not prevent it from starting.

## Testing

- Cover disk thresholds, measurement failures, missing paths, conversation workspace selection, command construction, Windows volume detection, and human-readable output.

GitOrigin-RevId: 0a99f9d278717e7d19936ffc504984b3a0958c25
2026-08-15 18:47:25 +00:00

17 lines
438 B
Rust

use std::path::PathBuf;
use pretty_assertions::assert_eq;
use super::DEV_VOLUME;
use super::volume_flags;
#[test]
fn the_windows_system_volume_is_not_a_dev_drive() {
let system_root = std::env::var_os("SystemRoot")
.map(PathBuf::from)
.expect("Windows exposes its system directory");
let flags = volume_flags(&system_root).expect("the system volume can be inspected");
assert_eq!(flags & DEV_VOLUME, 0);
}