Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
5f1701f
refactor(core): share one atomic file writer between rocm and rocmd
rominf Oct 8, 2026
b680a80
test(runtimes): pin the active-runtime marker's atomic replacement
rominf Oct 8, 2026
c83ef23
docs(architecture): point at rocm-core's shared atomic writer
rominf Oct 8, 2026
463bc5c
style(core): give the atomic writer's test seams short doc summaries
rominf Oct 8, 2026
0ef5fcd
fix(rocmd): gate std::fs import to the targets that still use it
rominf Oct 8, 2026
b52216b
ci(coverage): lower rocmd's floor for the tests that moved to rocm-core
rominf Oct 8, 2026
ea48bf4
fix(rocmd): drop the windows-sys dependency the move left unused
rominf Oct 9, 2026
8f94aaa
build(rocm): drop the windows-sys dependency the move left unused
rominf Oct 13, 2026
f9de09a
fix(core): state what the atomic writer guarantees, and test the full…
rominf Oct 13, 2026
304c1fa
test(runtimes): describe the marker tests as what they pin after #424
rominf Oct 13, 2026
5141199
docs(architecture): call atomic_write the shared writer and name exce…
rominf Oct 13, 2026
fe60533
fix(core): keep the new contents when a Windows replace fails part-way
rominf Nov 3, 2026
9eab4c8
fix(core): decide a kept replacement from the error, not a stale look
rominf Nov 5, 2026
08e3db3
test(core): cover the writer giving up when every temp name is taken
rominf Nov 5, 2026
0f9f4c8
fix(core): name the destination, not the temp file, on a full disk
rominf Nov 5, 2026
4be5acc
test(rocm): drop the millis-only temp-name marker test
rominf Nov 6, 2026
77d8ad9
test(runtimes): gate the marker test helpers to Unix
rominf Nov 9, 2026
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
2 changes: 0 additions & 2 deletions Cargo.lock

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

1 change: 0 additions & 1 deletion apps/rocm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ libc.workspace = true
[target.'cfg(windows)'.dependencies]
self-replace = "1.5"
windows-native-keyring-store = "1.1"
windows-sys = { version = "0.61", features = ["Win32_Storage_FileSystem"] }

[target.'cfg(target_os = "macos")'.dependencies]
apple-native-keyring-store = { version = "1.0", features = ["keychain"] }
Expand Down
417 changes: 394 additions & 23 deletions apps/rocm/src/runtimes_cmd.rs

Large diffs are not rendered by default.

12 changes: 0 additions & 12 deletions apps/rocm/src/therock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ pub(crate) use self::consent::{
use self::family::{family_override_or_recovered_arch, resolve_family};
pub(crate) use self::fetch::truthy_env;
use self::fetch::{download_file, preflight_tarball_space};
pub(crate) use self::io::write_file_atomically;
use self::probe::probe_rocm_sdk_runtime_for_target;
pub(crate) use self::probe::{
RuntimeDeviceProbe, TorchAlignmentProbe, install_pinned_package, probe_rocm_sdk_runtime,
Expand Down Expand Up @@ -1161,17 +1160,6 @@ mod tests {
assert_eq!(estimate, archive * disk_space::EXTRACTED_SIZE_MULTIPLIER);
}

#[test]
fn write_file_atomically_reports_a_full_disk_clearly() {
// Exercise the mapping the write path uses, without filling a disk.
let error = disk_space::map_write_error(
std::io::Error::from(std::io::ErrorKind::StorageFull),
Path::new("/cache/rocm.tar.gz.tmp"),
);
let text = format!("{error:#}");
assert!(text.contains("ran out of disk space"), "{text}");
}

#[test]
fn normalize_therock_family_maps_gfx1103_to_gfx110x_all() {
assert_eq!(
Expand Down
10 changes: 5 additions & 5 deletions apps/rocm/src/therock/fetch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
//!
//! Owns the pinned metadata trust root,
//! which `cargo xtask verify-pinned-keys` checks against the canonical
//! published key. Depends on the sibling `io` module for atomic writes and on
//! `slugify` in the parent for cache file names.
//! published key. Depends on `rocm_core::atomic_write` for atomic writes and
//! on `slugify` in the parent for cache file names.

#[cfg(test)]
use super::io::{publish_temp_file, write_file_atomically_with_publish};
use super::io::{stage_file_for_atomic_publish, write_file_atomically};
use super::slugify;
use anyhow::{Context, Result, bail};
#[cfg(test)]
use rocm_core::atomic_write::{publish_temp_file, write_file_atomically_with_publish};
use rocm_core::atomic_write::{stage_file_for_atomic_publish, write_file_atomically};
use rocm_core::{AppPaths, disk_space, unix_time_millis, verify_rsa_pkcs1_sha256_signature};
use serde::{Deserialize, Serialize};
#[cfg(test)]
Expand Down
Loading
Loading