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
6 changes: 3 additions & 3 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "agent-runtime"
version = "0.5.1"
version = "0.5.2"
edition = "2024"
rust-version = "1.92"
license = "MIT OR Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "agent-client"
version = "0.5.1"
version = "0.5.2"
edition = "2024"
rust-version = "1.92"
license = "MIT OR Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion sonny/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "sonny"
version = "0.5.1"
version = "0.5.2"
edition = "2024"
rust-version = "1.92"
license = "MIT OR Apache-2.0"
Expand Down
19 changes: 12 additions & 7 deletions sonny/tests/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
//! runs them (`sonny tool NAME`), with a stand-in for the daemon's
//! `agent`: a task gets a worktree by default and a sandfs copy when Sonny
//! is set to, is started there with what the lead asked for, and a start
//! that fails leaves no folder behind. The sandfs case mounts for real, so it needs what a
//! mount needs: FUSE 3 on Linux, nothing on macOS.
use std::os::unix::fs::PermissionsExt;
//! that fails leaves no folder behind. Sandfs uses a cloned folder when
//! supported, otherwise a real mount that needs FUSE 3 on Linux.
use std::os::unix::fs::{MetadataExt, PermissionsExt};
use std::path::{Path, PathBuf};
use std::process::Command;

Expand Down Expand Up @@ -363,10 +363,15 @@ fn a_sandfs_task_copy_takes_the_checkout_and_pushes_back() {
lab.git(&copy, &["commit", "-q", "--allow-empty", "-m", "loose"]);
let (ok, err) = lab.remove(&lab.repo, false);
assert!(!ok && err.contains("on HEAD"), "{err}");
// Left unmounted, as by a restart, it is mounted again to be checked.
// A real mount left unmounted, as by a restart, is mounted again to be
// checked. Sandfs may instead keep the copy as a cloned folder.
let sandfs = sandfs::Home::at(lab.home.join("sandfs")).unwrap();
sandfs.unmount("demo.fix").unwrap();
assert!(!copy.join(".git").exists());
if std::fs::metadata(&copy).unwrap().dev()
!= std::fs::metadata(copy.parent().unwrap()).unwrap().dev()
{
sandfs.unmount("demo.fix").unwrap();
assert!(!copy.join(".git").exists());
}
let (ok, err) = lab.remove(&lab.repo, false);
assert!(!ok && err.contains("on HEAD"), "{err}");
// A tag keeps it too, as does a stash.
Expand All @@ -380,7 +385,7 @@ fn a_sandfs_task_copy_takes_the_checkout_and_pushes_back() {
let (ok, err) = lab.remove(&lab.repo, false);
assert!(!ok && err.contains("on stash@{0}"), "{err}");
lab.git(&copy, &["stash", "drop", "-q"]);
// Unmounted, so the folder can go with the test.
// The clean copy can now go with the test.
let (ok, err) = lab.remove(&lab.repo, false);
assert!(ok, "{err}");
assert!(sandfs.workspaces().unwrap().is_empty());
Expand Down