Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Clarify recovery hints and file-operation diagnostics (#4346)
Maximilian Roosb3d6fd2700f0
diff --git a/src/commands/relocate.rs b/src/commands/relocate.rsindex 9f50b18d5..7b0f4e4d7 100644--- a/src/commands/relocate.rs+++ b/src/commands/relocate.rs@@ -451,12 +451,13 @@ impl<'a> RelocationExecutor<'a> {eprintln!("{}", progress_message(cformat!("Backed up {src} → {dest}")));} else {let blocked_path = format_path_for_display(expected_path);- let msg = cformat!("Skipping <bold>{branch}</> (target blocked: {blocked_path})");+ let msg =+ cformat!("Skipping <bold>{branch}</> (path already exists @ {blocked_path})");eprintln!("{}", warning_message(msg));eprintln!("{}",hint_message(cformat!(- "To backup blocking paths, use <underline>--clobber</>"+ "To back up blocking paths before relocating, use <underline>--clobber</>")));blocked.insert(i);@@ -531,7 +532,7 @@ impl<'a> RelocationExecutor<'a> {let branch = self.pending[i].branch();let blocked_path = format_path_for_display(&self.pending[i].expected_path);let msg = cformat!(- "Skipping <bold>{branch}</> (target occupied: {blocked_path})"+ "Skipping <bold>{branch}</> (path already exists @ {blocked_path})");eprintln!("{}", warning_message(msg));self.blocked.insert(i);diff --git a/src/commands/step/promote.rs b/src/commands/step/promote.rsindex d4e054862..bab4b55c8 100644--- a/src/commands/step/promote.rs+++ b/src/commands/step/promote.rs@@ -6,7 +6,6 @@ use std::path::{Path, PathBuf};use anyhow::{Context, bail};use color_print::cformat;-use path_slash::PathExt as _;use worktrunk::copy::{copy_dir_recursive, copy_leaf};use worktrunk::git::{Repository, duplicated_branches};use worktrunk::path::format_path_for_display;@@ -19,8 +18,12 @@ use super::shared::list_and_filter_ignored_entries;fn move_entry(src: &Path, dest: &Path, is_dir: bool) -> anyhow::Result<()> {// Ensure parent directory existsif let Some(parent) = dest.parent() {- fs::create_dir_all(parent)- .context(format!("creating parent directory for {}", dest.display()))?;+ fs::create_dir_all(parent).with_context(|| {+ format!(+ "creating parent directory for {}",+ format_path_for_display(dest)+ )+ })?;}match fs::rename(src, dest) {@@ -28,8 +31,8 @@ fn move_entry(src: &Path, dest: &Path, is_dir: bool) -> anyhow::Result<()> {Err(e) if e.kind() == ErrorKind::CrossesDevices => copy_and_remove(src, dest, is_dir),Err(e) => Err(anyhow::Error::from(e).context(format!("moving {} to {}",- src.display(),- dest.display()+ format_path_for_display(src),+ format_path_for_display(dest)))),}}@@ -48,15 +51,18 @@ fn copy_and_remove(src: &Path, dest: &Path, is_dir: bool) -> anyhow::Result<()>};if skipped > 0 {bail!(- "{} was not fully copied, so the source is left in place; run with -vv to list what was skipped",+ "{} was not fully copied; refusing to remove the source; run with -vv to list what was skipped",format_path_for_display(src));}if is_dir {- fs::remove_dir_all(src).context(format!("removing source directory {}", src.display()))?;+ fs::remove_dir_all(src).with_context(|| {+ format!("removing source directory {}", format_path_for_display(src))+ })?;} else {- fs::remove_file(src).context(format!("removing source file {}", src.display()))?;+ fs::remove_file(src)+ .with_context(|| format!("removing source file {}", format_path_for_display(src)))?;}Ok(())}@@ -91,7 +97,7 @@ fn stage_ignored(let staging_entry = staging_a.join(relative);if fs::symlink_metadata(src_entry).is_ok() {move_entry(src_entry, &staging_entry, *is_dir)- .context(format!("staging {}", relative.display()))?;+ .with_context(|| format!("staging {}", format_path_for_display(relative)))?;count += 1;}}@@ -104,7 +110,7 @@ fn stage_ignored(let staging_entry = staging_b.join(relative);if fs::symlink_metadata(src_entry).is_ok() {move_entry(src_entry, &staging_entry, *is_dir)- .context(format!("staging {}", relative.display()))?;+ .with_context(|| format!("staging {}", format_path_for_display(relative)))?;count += 1;}}@@ -142,7 +148,7 @@ fn distribute_staged(let dest_entry = path_a.join(relative);if fs::symlink_metadata(&staging_entry).is_ok() {move_entry(&staging_entry, &dest_entry, *is_dir)- .context(format!("distributing {}", relative.display()))?;+ .with_context(|| format!("distributing {}", format_path_for_display(relative)))?;count += 1;}}@@ -156,7 +162,7 @@ fn distribute_staged(let dest_entry = path_b.join(relative);if fs::symlink_metadata(&staging_entry).is_ok() {move_entry(&staging_entry, &dest_entry, *is_dir)- .context(format!("distributing {}", relative.display()))?;+ .with_context(|| format!("distributing {}", format_path_for_display(relative)))?;count += 1;}}@@ -215,10 +221,10 @@ fn check_leftover_staging(staging_path: &Path) -> anyhow::Result<()> {if !staging_path.exists() {return Ok(());}- let display = staging_path.to_slash_lossy();+ let display = format_path_for_display(staging_path);Err(anyhow::anyhow!("Files may need manual recovery from: {display}\n\- Remove it to retry: rm -rf \"{display}\""+ Remove it to retry: rm -rf {display}").context("Found leftover staging directory from an interrupted promote"))}@@ -398,7 +404,7 @@ pub fn handle_promote(branch: Option<&str>) -> anyhow::Result<PromoteResult> {).context(format!("Failed to stage ignored files. Already-staged files may be recoverable from: {}",- staging_path.to_slash_lossy()+ format_path_for_display(&staging_path)))?;if count > 0 { Some((dir, count)) } else { None }} else {@@ -426,7 +432,7 @@ pub fn handle_promote(branch: Option<&str>) -> anyhow::Result<PromoteResult> {).context(format!("Failed to distribute staged files. Staged files may be recoverable from: {}",- staging_dir.display()+ format_path_for_display(staging_dir)))?} else {0@@ -495,6 +501,49 @@ mod tests {assert_eq!(fs::read_to_string(dest.join("root.txt")).unwrap(), "root");}+ #[test]+ fn test_move_entry_failure_keeps_source_and_destination() {+ use path_slash::PathExt;++ let tmp = worktrunk::testing::test_tempdir();+ let src = tmp.path().join("source file");+ let blocker = tmp.path().join("existing file");+ fs::write(&src, b"source data").unwrap();+ fs::write(&blocker, b"existing data").unwrap();+ let blocked_parent = blocker.join("destination");++ let error = move_entry(&src, &blocked_parent, false).unwrap_err();+ assert!(error.downcast_ref::<std::io::Error>().is_some());+ assert_eq!(+ error.to_string(),+ format!(+ "creating parent directory for '{}'",+ blocked_parent.to_slash_lossy()+ )+ );+ assert_eq!(fs::read(&src).unwrap(), b"source data");+ assert_eq!(fs::read(&blocker).unwrap(), b"existing data");++ let occupied = tmp.path().join("existing directory");+ fs::create_dir(&occupied).unwrap();+ fs::write(occupied.join("protected"), b"existing data").unwrap();+ let error = move_entry(&src, &occupied, false).unwrap_err();+ assert!(error.downcast_ref::<std::io::Error>().is_some());+ assert_eq!(+ error.to_string(),+ format!(+ "moving '{}' to '{}'",+ src.to_slash_lossy(),+ occupied.to_slash_lossy()+ )+ );+ assert_eq!(fs::read(&src).unwrap(), b"source data");+ assert_eq!(+ fs::read(occupied.join("protected")).unwrap(),+ b"existing data"+ );+ }+#[test]fn test_copy_and_remove_file() {let tmp = tempfile::tempdir().unwrap();diff --git a/src/config/deprecation.rs b/src/config/deprecation.rsindex c98964d84..7534f2a91 100644--- a/src/config/deprecation.rs+++ b/src/config/deprecation.rs@@ -1927,7 +1927,7 @@ pub fn format_deprecation_details(info: &DeprecationInfo, original_content: &strlet _ = writeln!(out,"{}",- hint_message(cformat!("To apply: <underline>{cmd}</>"))+ hint_message(cformat!("To apply these updates, run <underline>{cmd}</>")));return out;}@@ -1935,7 +1935,9 @@ pub fn format_deprecation_details(info: &DeprecationInfo, original_content: &strlet _ = writeln!(out,"{}",- hint_message(cformat!("To apply: <underline>wt config update</>"))+ hint_message(cformat!(+ "To apply these updates, run <underline>wt config update</>"+ )));let migrated = compute_migrated_content(original_content);diff --git a/src/copy.rs b/src/copy.rsindex 20e173793..01d45a2f9 100644--- a/src/copy.rs+++ b/src/copy.rs@@ -225,9 +225,10 @@ pub fn copy_leaf(return Ok(None);}Err(e) => {- return Err(- anyhow::Error::from(e).context(format!("reading metadata for {}", src.display()))- );+ return Err(anyhow::Error::from(e).context(format!(+ "reading metadata for {}",+ format_path_for_display(src)+ )));}};@@ -250,9 +251,8 @@ pub fn copy_leaf(return Ok(None);}Err(e) => {- return Err(- anyhow::Error::from(e).context(format!("reading symlink {}", src.display()))- );+ return Err(anyhow::Error::from(e)+ .context(format!("reading symlink {}", format_path_for_display(src))));}};create_symlink(&target, src, dest)?;@@ -295,7 +295,11 @@ pub fn copy_leaf(return Ok(None);}Err(e) => {- return Err(anyhow::Error::from(e).context(format!("copying {}", src.display())));+ return Err(anyhow::Error::from(e).context(format!(+ "copying {} to {}",+ format_path_for_display(src),+ format_path_for_display(dest)+ )));}}};@@ -418,13 +422,16 @@ pub fn copy_dir_recursive(continue;}Err(e) => {- return Err(anyhow::Error::from(e)- .context(format!("reading directory {}", src_dir.display())));+ return Err(anyhow::Error::from(e).context(format!(+ "reading directory {}",+ format_path_for_display(&src_dir)+ )));}};- fs::create_dir_all(&dest_dir)- .with_context(|| format!("creating directory {}", dest_dir.display()))?;+ fs::create_dir_all(&dest_dir).with_context(|| {+ format!("creating directory {}", format_path_for_display(&dest_dir))+ })?;#[cfg(unix)]dirs_for_perms.push((src_dir.clone(), dest_dir.clone()));@@ -438,8 +445,10 @@ pub fn copy_dir_recursive(continue;}Err(e) => {- return Err(anyhow::Error::from(e)- .context(format!("reading metadata for {}", entry.path().display())));+ return Err(anyhow::Error::from(e).context(format!(+ "reading metadata for {}",+ format_path_for_display(&entry.path())+ )));}};let src_path = entry.path();@@ -491,12 +500,18 @@ pub fn copy_dir_recursive(continue;}Err(e) => {- return Err(anyhow::Error::from(e)- .context(format!("reading permissions for {}", src_dir.display())));+ return Err(anyhow::Error::from(e).context(format!(+ "reading permissions for {}",+ format_path_for_display(src_dir)+ )));}};- fs::set_permissions(dest_dir, src_perms)- .with_context(|| format!("setting permissions on {}", dest_dir.display()))?;+ fs::set_permissions(dest_dir, src_perms).with_context(|| {+ format!(+ "setting permissions on {}",+ format_path_for_display(dest_dir)+ )+ })?;}Ok(skipped)@@ -518,17 +533,19 @@ fn create_symlink(target: &Path, src_path: &Path, dest_path: &Path) -> anyhow::R{let _ = src_path; // Used on Windows to determine symlink typestd::os::unix::fs::symlink(target, dest_path)- .with_context(|| format!("creating symlink {}", dest_path.display()))?;+ .with_context(|| format!("creating symlink {}", format_path_for_display(dest_path)))?;}#[cfg(windows)]{let is_dir = src_path.metadata().map(|m| m.is_dir()).unwrap_or(false);if is_dir {- std::os::windows::fs::symlink_dir(target, dest_path)- .with_context(|| format!("creating symlink {}", dest_path.display()))?;+ std::os::windows::fs::symlink_dir(target, dest_path).with_context(|| {+ format!("creating symlink {}", format_path_for_display(dest_path))+ })?;} else {- std::os::windows::fs::symlink_file(target, dest_path)- .with_context(|| format!("creating symlink {}", dest_path.display()))?;+ std::os::windows::fs::symlink_file(target, dest_path).with_context(|| {+ format!("creating symlink {}", format_path_for_display(dest_path))+ })?;}}#[cfg(not(any(unix, windows)))]@@ -921,4 +938,61 @@ mod tests {);assert!(!dest.exists());}++ /// Failed filesystem operations retain their cause and quote paths that+ /// contain spaces, including failures before any data can be copied.+ #[cfg(unix)]+ #[test]+ fn test_copy_errors_quote_paths_and_retain_io_causes() {+ let dir = crate::testing::test_tempdir();+ let blocker = dir.path().join("file as parent");+ fs::write(&blocker, b"existing data").unwrap();+ let invalid_source = blocker.join("child");+ let dest = dir.path().join("destination");+ let metadata_error = copy_leaf(&invalid_source, &dest, None, false).unwrap_err();+ assert!(metadata_error.downcast_ref::<std::io::Error>().is_some());+ assert_eq!(+ metadata_error.to_string(),+ format!("reading metadata for '{}'", invalid_source.display())+ );+ assert!(!dest.exists());++ let src = dir.path().join("source");+ fs::create_dir(&src).unwrap();+ fs::write(src.join("data"), b"data").unwrap();+ let invalid_dest = blocker.join("destination");+ let directory_error =+ copy_dir_recursive(&src, &invalid_dest, None, false, &Progress::disabled())+ .unwrap_err();+ assert!(directory_error.downcast_ref::<std::io::Error>().is_some());+ assert_eq!(+ directory_error.to_string(),+ format!("creating directory '{}'", invalid_dest.display())+ );++ let source_file = src.join("source file");+ fs::write(&source_file, b"source data").unwrap();+ let copy_error = copy_leaf(&source_file, &invalid_dest, None, false).unwrap_err();+ assert!(copy_error.downcast_ref::<std::io::Error>().is_some());+ assert_eq!(+ copy_error.to_string(),+ format!(+ "copying '{}' to '{}'",+ source_file.display(),+ invalid_dest.display()+ )+ );+ assert_eq!(fs::read(&source_file).unwrap(), b"source data");++ let source_link = src.join("source link");+ std::os::unix::fs::symlink(&source_file, &source_link).unwrap();+ let link_error = copy_leaf(&source_link, &invalid_dest, None, false).unwrap_err();+ assert!(link_error.downcast_ref::<std::io::Error>().is_some());+ assert_eq!(+ link_error.to_string(),+ format!("creating symlink '{}'", invalid_dest.display())+ );+ assert_eq!(fs::read_link(&source_link).unwrap(), source_file);+ assert_eq!(fs::read(&blocker).unwrap(), b"existing data");+ }}diff --git a/src/git/error.rs b/src/git/error.rsindex 10f66efa3..de25d8fb5 100644--- a/src/git/error.rs+++ b/src/git/error.rs@@ -738,6 +738,8 @@ pub enum GitError {message: String,/// Full stderr output for debuggingstderr: String,+ /// Worktrunk-owned recovery advice, separate from the CLI verdict+ hint: Option<String>,},Other {message: String,@@ -1761,9 +1763,16 @@ impl GitError {}GitError::CliApiError {- message, stderr, ..+ message,+ stderr,+ hint,+ ..} => {- write!(f, "{}", format_error_block(error_message(message), stderr))+ write!(f, "{}", format_error_block(error_message(message), stderr))?;+ if let Some(hint) = hint {+ write!(f, "\n{}", hint_message(hint))?;+ }+ Ok(())}GitError::Other { message } => {@@ -2959,6 +2968,7 @@ mod tests {ref_type: RefType::Pr,message: "gh api failed for PR #42".into(),stderr: "error: unexpected response\ncode: 500".into(),+ hint: None,};assert_snapshot!(err.render(), @"[31m✗[39m [31mgh api failed for PR #42[39mdiff --git a/src/git/remote_ref/azure.rs b/src/git/remote_ref/azure.rsindex c903c10bf..2e17427b6 100644--- a/src/git/remote_ref/azure.rs+++ b/src/git/remote_ref/azure.rs@@ -279,6 +279,7 @@ pub(super) fn fetch_pr_info(pr_number: u32, repo: &Repository) -> anyhow::ResultForgeKind::AzureDevOps.ref_type(),format!("az repos pr show failed for PR #{}", pr_number),&output,+ None,));}diff --git a/src/git/remote_ref/gitea.rs b/src/git/remote_ref/gitea.rsindex 7e61ed2b0..7c505c95f 100644--- a/src/git/remote_ref/gitea.rs+++ b/src/git/remote_ref/gitea.rs@@ -168,6 +168,7 @@ pub(super) fn fetch_pr_info(pr_number: u32, repo: &Repository) -> anyhow::ResultForgeKind::Gitea.ref_type(),format!("tea api failed for PR #{}", pr_number),&output,+ None,));}diff --git a/src/git/remote_ref/github.rs b/src/git/remote_ref/github.rsindex 187255f2f..0793d51bb 100644--- a/src/git/remote_ref/github.rs+++ b/src/git/remote_ref/github.rs@@ -3,6 +3,7 @@use std::path::Path;use anyhow::{Context, bail};+use color_print::cformat;use serde::Deserialize;use super::{@@ -132,17 +133,13 @@ pub(super) fn fetch_pr_info(pr_number: u32, repo: &Repository) -> anyhow::Resultif serde_json::from_slice::<GhApiErrorResponse>(&output.stdout).is_ok_and(|error| error.status == "404"){- let hint = if source == "gh default" {- "Check that `gh repo set-default` points to the correct repository."- } else {- "If the PR is on a different repository, \- run `gh repo set-default` to set the default \- or configure a different primary remote."- };+ let hint =+ cformat!("To query a different repository, run <underline>gh repo set-default</>");return Err(cli_api_error(ForgeKind::GitHub.ref_type(),- format!("PR #{pr_number} not found on {owner}/{repo_name} ({source}). {hint}"),+ format!("PR #{pr_number} not found on {owner}/{repo_name} ({source})"),&output,+ Some(hint),));}@@ -150,6 +147,7 @@ pub(super) fn fetch_pr_info(pr_number: u32, repo: &Repository) -> anyhow::ResultForgeKind::GitHub.ref_type(),format!("gh api failed for PR #{}", pr_number),&output,+ None,));}diff --git a/src/git/remote_ref/gitlab.rs b/src/git/remote_ref/gitlab.rsindex b4b2bd0a9..0cc375a2f 100644--- a/src/git/remote_ref/gitlab.rs+++ b/src/git/remote_ref/gitlab.rs@@ -77,6 +77,7 @@ pub(super) fn fetch_mr_info(mr_number: u32, repo: &Repository) -> anyhow::ResultForgeKind::GitLab.ref_type(),format!("glab api failed for MR !{}", mr_number),&output,+ None,));}@@ -230,6 +231,7 @@ fn fetch_project_urls(ForgeKind::GitLab.ref_type(),format!("glab api failed for {} project {}", role, project_id),&output,+ None,));}diff --git a/src/git/remote_ref/mod.rs b/src/git/remote_ref/mod.rsindex a65d420cf..ccf4796de 100644--- a/src/git/remote_ref/mod.rs+++ b/src/git/remote_ref/mod.rs@@ -191,12 +191,18 @@ pub(super) fn cli_api_error_details(output: &Output) -> String {/// gutter carries the CLI's verdict on it. A backend with something of its own/// to say — the cases in the module docs — passes it as `message` rather than/// bailing, so its words are added to the CLI's rather than substituted for-/// them.-pub(super) fn cli_api_error(ref_type: RefType, message: String, output: &Output) -> anyhow::Error {+/// them. Recovery commands belong in `hint`, rendered separately from diagnosis.+pub(super) fn cli_api_error(+ ref_type: RefType,+ message: String,+ output: &Output,+ hint: Option<String>,+) -> anyhow::Error {GitError::CliApiError {ref_type,message,stderr: cli_api_error_details(output),+ hint,}.into()}diff --git a/tests/integration_tests/switch.rs b/tests/integration_tests/switch.rsindex 4dfa1673d..a60d4006f 100644--- a/tests/integration_tests/switch.rs+++ b/tests/integration_tests/switch.rs@@ -4524,7 +4524,7 @@ fn test_switch_pr_not_found(#[from(repo_with_remote)] repo: TestRepo) {/// A 404 is the one GitHub failure worded by us rather than forwarded from/// `gh`, because it answers about an owner/repo we chose — so the message has to/// name where that choice came from. With `gh repo set-default` configured, that-/// is the default, and the remedy is to check it rather than the remotes.+/// is the default, and the hint names the command that changes it.#[rstest]fn test_switch_pr_not_found_gh_default(#[from(repo_with_remote)] repo: TestRepo) {set_github_remote_url(&repo);diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_displays_deprecation_details.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_displays_deprecation_details.snapindex 79bad9023..f8e341bb4 100644--- a/tests/snapshots/integration__integration_tests__config_show__config_show_displays_deprecation_details.snap+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_displays_deprecation_details.snap@@ -60,7 +60,7 @@ exit_code: 0[36mUSER CONFIG[39m @ ~/.config/worktrunk/config.toml[33m▲[39m [33mUser config: template variable [1mrepo_root[22m is deprecated in favor of [1mrepo_path[22m[39m[33m▲[39m [33mUser config: template variable [1mmain_worktree[22m is deprecated in favor of [1mrepo[22m[39m-[2m↳[22m [2mTo apply: [4mwt config update[24m[22m+[2m↳[22m [2mTo apply these updates, run [4mwt config update[24m[22m[2m○[22m Proposed diff:[107m [0m [1mdiff --git a/config.toml/current b/config.toml/migrated[m[107m [0m [1mindex dee4883..5eef8a6 100644[mdiff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_displays_project_commit_generation_deprecations.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_displays_project_commit_generation_deprecations.snapindex b8e173aea..94cd89f46 100644--- a/tests/snapshots/integration__integration_tests__config_show__config_show_displays_project_commit_generation_deprecations.snap+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_displays_project_commit_generation_deprecations.snap@@ -59,7 +59,7 @@ exit_code: 0----- stdout -----[36mUSER CONFIG[39m @ ~/.config/worktrunk/config.toml[33m▲[39m [33mUser config: [1m[projects."github.com/example/repo".commit-generation][22m is deprecated in favor of [1m[projects."github.com/example/repo".commit.generation][22m[39m-[2m↳[22m [2mTo apply: [4mwt config update[24m[22m+[2m↳[22m [2mTo apply these updates, run [4mwt config update[24m[22m[2m○[22m Proposed diff:[107m [0m [1mdiff --git a/config.toml/current b/config.toml/migrated[m[107m [0m [1mindex de80729..131a2fd 100644[mdiff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_from_linked_worktree_shows_main_worktree_hint.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_from_linked_worktree_shows_main_worktree_hint.snapindex 9a0b98b59..9af163336 100644--- a/tests/snapshots/integration__integration_tests__config_show__config_show_from_linked_worktree_shows_main_worktree_hint.snap+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_from_linked_worktree_shows_main_worktree_hint.snap@@ -64,7 +64,7 @@ exit_code: 0[36mPROJECT CONFIG[39m @ [PROJECT_ID][2m○[22m Identifier: [1m../origin[22m[33m▲[39m [33mProject config: template variable [1mmain_worktree[22m is deprecated in favor of [1mrepo[22m[39m-[2m↳[22m [2mTo apply: [4mwt -C _REPO_ config update[24m[22m+[2m↳[22m [2mTo apply these updates, run [4mwt -C _REPO_ config update[24m[22m[36mAPPROVALS[39m @ [TEST_APPROVALS][2m○[22m 1 project command awaiting approvaldiff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_suggests_project_config_for_ci.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_suggests_project_config_for_ci.snapindex 2dfafc8b3..76b8de881 100644--- a/tests/snapshots/integration__integration_tests__config_show__config_show_suggests_project_config_for_ci.snap+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_suggests_project_config_for_ci.snap@@ -59,7 +59,7 @@ exit_code: 0----- stdout -----[36mUSER CONFIG[39m @ ~/.config/worktrunk/config.toml[33m▲[39m [33mUser config: [1m[ci][22m is deprecated in favor of [1m[forge][22m[39m-[2m↳[22m [2mTo apply: [4mwt config update[24m[22m+[2m↳[22m [2mTo apply these updates, run [4mwt config update[24m[22m[2m○[22m Proposed diff:[107m [0m [1mdiff --git a/config.toml/current b/config.toml/migrated[m[107m [0m [1mindex 2e0e0bb..9d78d51 100644[mdiff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_suggests_user_config_for_commit_generation.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_suggests_user_config_for_commit_generation.snapindex 4d26d0208..d42b799b9 100644--- a/tests/snapshots/integration__integration_tests__config_show__config_show_suggests_user_config_for_commit_generation.snap+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_suggests_user_config_for_commit_generation.snap@@ -64,7 +64,7 @@ exit_code: 0[36mPROJECT CONFIG[39m @ _REPO_/.config/wt.toml[2m○[22m Identifier: [1m../origin[22m[33m▲[39m [33mProject config: [1m[commit-generation][22m is deprecated in favor of [1m[commit.generation][22m[39m-[2m↳[22m [2mTo apply: [4mwt config update[24m[22m+[2m↳[22m [2mTo apply these updates, run [4mwt config update[24m[22m[2m○[22m Proposed diff:[107m [0m [1mdiff --git a/wt.toml/current b/wt.toml/migrated[m[107m [0m [1mindex 074c30f..bcaf404 100644[mdiff --git a/tests/snapshots/integration__integration_tests__step_promote__promote_stale_staging_blocks_with_guidance.snap b/tests/snapshots/integration__integration_tests__step_promote__promote_stale_staging_blocks_with_guidance.snapindex 3329f7f29..e26491373 100644--- a/tests/snapshots/integration__integration_tests__step_promote__promote_stale_staging_blocks_with_guidance.snap+++ b/tests/snapshots/integration__integration_tests__step_promote__promote_stale_staging_blocks_with_guidance.snap@@ -62,4 +62,4 @@ exit_code: 1----- stderr -----[31m✗[39m [31mFound leftover staging directory from an interrupted promote[39m[107m [0m Files may need manual recovery from: _REPO_/.git/wt/staging/promote-[107m [0m Remove it to retry: rm -rf "_REPO_/.git/wt/staging/promote"+[107m [0m Remove it to retry: rm -rf _REPO_/.git/wt/staging/promotediff --git a/tests/snapshots/integration__integration_tests__step_relocate__relocate_blocked_occupant_skips_chain.snap b/tests/snapshots/integration__integration_tests__step_relocate__relocate_blocked_occupant_skips_chain.snapindex 252ab2020..77082ac29 100644--- a/tests/snapshots/integration__integration_tests__step_relocate__relocate_blocked_occupant_skips_chain.snap+++ b/tests/snapshots/integration__integration_tests__step_relocate__relocate_blocked_occupant_skips_chain.snap@@ -62,8 +62,8 @@ exit_code: 0----- stdout ---------- stderr ------[33m▲[39m [33mSkipping [1mgamma[22m (target blocked: _REPO_.gamma)[39m-[2m↳[22m [2mTo backup blocking paths, use [4m--clobber[24m[22m+[33m▲[39m [33mSkipping [1mgamma[22m (path already exists @ _REPO_.gamma)[39m+[2m↳[22m [2mTo back up blocking paths before relocating, use [4m--clobber[24m[22m[33m▲[39m [33mSkipping [1mbeta[22m (blocked by [1mgamma[22m, which can't be relocated)[39m[33m▲[39m [33mSkipping [1malpha[22m (blocked by [1mbeta[22m, which can't be relocated)[39mdiff --git a/tests/snapshots/integration__integration_tests__step_relocate__relocate_blocked_occupant_skips_dependent.snap b/tests/snapshots/integration__integration_tests__step_relocate__relocate_blocked_occupant_skips_dependent.snapindex 80ad439f1..fe1bed6ed 100644--- a/tests/snapshots/integration__integration_tests__step_relocate__relocate_blocked_occupant_skips_dependent.snap+++ b/tests/snapshots/integration__integration_tests__step_relocate__relocate_blocked_occupant_skips_dependent.snap@@ -61,8 +61,8 @@ exit_code: 0----- stdout ---------- stderr ------[33m▲[39m [33mSkipping [1mbeta[22m (target blocked: _REPO_.beta)[39m-[2m↳[22m [2mTo backup blocking paths, use [4m--clobber[24m[22m+[33m▲[39m [33mSkipping [1mbeta[22m (path already exists @ _REPO_.beta)[39m+[2m↳[22m [2mTo back up blocking paths before relocating, use [4m--clobber[24m[22m[33m▲[39m [33mSkipping [1malpha[22m (blocked by [1mbeta[22m, which can't be relocated)[39m[2m○[22m Relocated 0 worktrees, skipped 2 worktreesdiff --git a/tests/snapshots/integration__integration_tests__step_relocate__relocate_same_target_no_panic.snap b/tests/snapshots/integration__integration_tests__step_relocate__relocate_same_target_no_panic.snapindex 0a8566acb..97089af2b 100644--- a/tests/snapshots/integration__integration_tests__step_relocate__relocate_same_target_no_panic.snap+++ b/tests/snapshots/integration__integration_tests__step_relocate__relocate_same_target_no_panic.snap@@ -62,6 +62,6 @@ exit_code: 0----- stderr -----[32m✓[39m [32mRelocated [1malpha[22m: _PARENT_/wrong-location-1 → _REPO_/repo.shared[39m-[33m▲[39m [33mSkipping [1mbeta[22m (target occupied: _REPO_/repo.shared)[39m+[33m▲[39m [33mSkipping [1mbeta[22m (path already exists @ _REPO_/repo.shared)[39m[32m✓[39m [32mRelocated 1 worktree, skipped 1 worktree[39mdiff --git a/tests/snapshots/integration__integration_tests__step_relocate__relocate_target_exists.snap b/tests/snapshots/integration__integration_tests__step_relocate__relocate_target_exists.snapindex a5bc72105..b7dd249f1 100644--- a/tests/snapshots/integration__integration_tests__step_relocate__relocate_target_exists.snap+++ b/tests/snapshots/integration__integration_tests__step_relocate__relocate_target_exists.snap@@ -59,7 +59,7 @@ exit_code: 0----- stdout ---------- stderr ------[33m▲[39m [33mSkipping [1mfeature[22m (target blocked: _REPO_.feature)[39m-[2m↳[22m [2mTo backup blocking paths, use [4m--clobber[24m[22m+[33m▲[39m [33mSkipping [1mfeature[22m (path already exists @ _REPO_.feature)[39m+[2m↳[22m [2mTo back up blocking paths before relocating, use [4m--clobber[24m[22m[2m○[22m Relocated 0 worktrees, skipped 1 worktreediff --git a/tests/snapshots/integration__integration_tests__switch__switch_pr_not_found.snap b/tests/snapshots/integration__integration_tests__switch__switch_pr_not_found.snapindex dae862369..91b23f618 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_pr_not_found.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_pr_not_found.snap@@ -60,5 +60,6 @@ exit_code: 1----- stderr -----[36m◎[39m [36mFetching PR #9999...[39m-[31m✗[39m [31mPR #9999 not found on owner/test-repo (github remote). If the PR is on a different repository, run `gh repo set-default` to set the default or configure a different primary remote.[39m+[31m✗[39m [31mPR #9999 not found on owner/test-repo (github remote)[39m[107m [0m gh: Not Found (HTTP 404)+[2m↳[22m [2mTo query a different repository, run [4mgh repo set-default[24m[22mdiff --git a/tests/snapshots/integration__integration_tests__switch__switch_pr_not_found_gh_default.snap b/tests/snapshots/integration__integration_tests__switch__switch_pr_not_found_gh_default.snapindex 80f0ff42f..b244b9b53 100644--- a/tests/snapshots/integration__integration_tests__switch__switch_pr_not_found_gh_default.snap+++ b/tests/snapshots/integration__integration_tests__switch__switch_pr_not_found_gh_default.snap@@ -60,5 +60,6 @@ exit_code: 1----- stderr -----[36m◎[39m [36mFetching PR #9999...[39m-[31m✗[39m [31mPR #9999 not found on owner/other-repo (gh default). Check that `gh repo set-default` points to the correct repository.[39m+[31m✗[39m [31mPR #9999 not found on owner/other-repo (gh default)[39m[107m [0m gh: Not Found (HTTP 404)+[2m↳[22m [2mTo query a different repository, run [4mgh repo set-default[24m[22m