feat(maestro): trigger haiku naming for ACP sessions (#206)
ci / web (push) Has been cancelled
ci / rust (push) Has been cancelled
ci / flake (push) Has been cancelled

This commit was merged in pull request #206.
This commit is contained in:
2026-09-08 15:35:27 +01:00
parent fbdcec6f69
commit 5af5ceb9a8
3 changed files with 24 additions and 20 deletions
+11 -14
View File
@@ -80,24 +80,21 @@ mod tests {
}
#[test]
fn non_repo_dir_is_none() {
// A temp dir with no `.git` anywhere up the chain. We need a path whose
// *entire* ancestor chain is `.git`-free, but `/tmp` itself may live
// inside a repo (CI containers, sandbox VMs). Work around this by
// creating a tmpfs-like isolated root via an in-memory mount when
// possible, or — more portably — by asserting the result is NOT inside
// the temp dir we control rather than asserting None outright.
fn non_repo_dir_does_not_find_root_inside_fixture() {
// The fixture has no `.git`, so `find_root` must not return a path
// inside it. On hosts where an ancestor of the temp dir *is* a repo
// (e.g. `/tmp` lives inside a checkout), the function legitimately
// returns that ancestor — the test only asserts the fixture itself
// was not mistaken for a repo.
let tmp = tempfile::tempdir().unwrap();
let sub = tmp.path().join("plain/dir");
fs::create_dir_all(&sub).unwrap();
// If an ancestor of /tmp has .git, find_root will return that — but it
// must never return anything at or below our tempdir.
let result = find_root(&sub);
if let Some(ref root) = result {
assert!(
match find_root(&sub) {
None => {} // expected on most hosts
Some(root) => assert!(
!root.starts_with(tmp.path()),
"find_root returned {root:?} which is inside our .git-free tempdir",
);
"found .git inside the fixture at {root:?}, but none was created"
),
}
}