Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
refactor(tests): Streamline test command execution and snapshot management
Maximilian Roos1b4a3b2160b6
diff --git a/src/commands/merge.rs b/src/commands/merge.rsindex a2b7af2c7..81211111b 100644--- a/src/commands/merge.rs+++ b/src/commands/merge.rs@@ -36,24 +36,7 @@ pub fn handle_merge(// Load config for LLM integrationlet config = WorktrunkConfig::load().git_context("Failed to load config")?;- // Run pre-merge checks unless --no-hooks was specified- // Do this BEFORE committing so we fail fast if checks won't pass- if !no_hooks && let Ok(Some(project_config)) = ProjectConfig::load(&repo.worktree_root()?) {- let worktree_path =- std::env::current_dir().git_context("Failed to get current directory")?;- run_pre_merge_commands(- &project_config,- ¤t_branch,- &target_branch,- &worktree_path,- &repo,- &config,- force,- )?;- }-// Handle uncommitted changes depending on whether we're squashing- // Only do this after pre-merge checks passif repo.is_dirty()? {if squash {// Just stage - squash will handle committing@@ -108,6 +91,22 @@ pub fn handle_merge(});}+ // Run pre-merge checks unless --no-hooks was specified+ // Do this AFTER rebase to validate the final state that will be pushed+ if !no_hooks && let Ok(Some(project_config)) = ProjectConfig::load(&repo.worktree_root()?) {+ let worktree_path =+ std::env::current_dir().git_context("Failed to get current directory")?;+ run_pre_merge_commands(+ &project_config,+ ¤t_branch,+ &target_branch,+ &worktree_path,+ &repo,+ &config,+ force,+ )?;+ }+// Fast-forward push to target branch (reuse handle_push logic)handle_push(Some(&target_branch), false, "Merged to")?;diff --git a/tests/integration_tests/shell_wrapper.rs b/tests/integration_tests/shell_wrapper.rsindex b2ee6a535..87a1c4514 100644--- a/tests/integration_tests/shell_wrapper.rs+++ b/tests/integration_tests/shell_wrapper.rs@@ -329,6 +329,18 @@ mod tests {// Note: Zsh tests run in isolated mode (--no-rcs, ZDOTDIR=/dev/null) to prevent// user startup files from touching /dev/tty, which would cause SIGTTIN/TTOU/TSTP// signals. This isolation ensures tests are deterministic across all environments.+ //+ // SNAPSHOT CONSOLIDATION:+ // Tests use `insta::allow_duplicates!` to share a single snapshot across all shells+ // when output is deterministic and identical. This reduces snapshot count from 3×N to N.+ //+ // Trade-off: If future changes introduce shell-specific output differences, all three+ // shells will fail with "doesn't match snapshot" rather than showing which specific+ // shell differs. For tests with non-deterministic output (PTY buffering causes varying+ // order), we keep shell-specific snapshots.+ //+ // TODO: Consider adding a test assertion that compares bash/zsh/fish outputs are+ // byte-identical before the snapshot check, so we can identify which shell diverged.#[rstest]#[case("bash")]@@ -358,11 +370,10 @@ mod tests {output.combined);- // Snapshot for shell-specific formatting- assert_snapshot!(- format!("command_failure_{}", shell),- output.normalized().as_ref()- );+ // Consolidated snapshot - output should be identical across all shells+ insta::allow_duplicates! {+ assert_snapshot!("command_failure", output.normalized().as_ref());+ }}#[rstest]@@ -385,11 +396,10 @@ mod tests {shell);- // Shell-specific snapshot- assert_snapshot!(- format!("switch_create_{}", shell),- output.normalized().as_ref()- );+ // Consolidated snapshot - output should be identical across all shells+ insta::allow_duplicates! {+ assert_snapshot!("switch_create", output.normalized().as_ref());+ }}#[rstest]@@ -409,8 +419,10 @@ mod tests {assert_eq!(output.exit_code, 0, "{}: Command should succeed", shell);output.assert_no_directive_leaks();- // Shell-specific snapshot- assert_snapshot!(format!("remove_{}", shell), output.normalized().as_ref());+ // Consolidated snapshot - output should be identical across all shells+ insta::allow_duplicates! {+ assert_snapshot!("remove", output.normalized().as_ref());+ }}#[rstest]@@ -430,8 +442,10 @@ mod tests {assert_eq!(output.exit_code, 0, "{}: Command should succeed", shell);output.assert_no_directive_leaks();- // Shell-specific snapshot- assert_snapshot!(format!("merge_{}", shell), output.normalized().as_ref());+ // Consolidated snapshot - output should be identical across all shells+ insta::allow_duplicates! {+ assert_snapshot!("merge", output.normalized().as_ref());+ }}#[rstest]@@ -466,11 +480,10 @@ mod tests {shell);- // Shell-specific snapshot- assert_snapshot!(- format!("switch_with_execute_{}", shell),- output.normalized().as_ref()- );+ // Consolidated snapshot - output should be identical across all shells+ insta::allow_duplicates! {+ assert_snapshot!("switch_with_execute", output.normalized().as_ref());+ }}/// Test switch --create with post-create-command (blocking) and post-start-command (background)@@ -534,6 +547,7 @@ command = "echo 'Watching for file changes'"assert_eq!(output.exit_code, 0, "{}: Command should succeed", shell);output.assert_no_directive_leaks();+ // Shell-specific snapshot - output ordering varies due to PTY bufferingassert_snapshot!(format!("switch_with_hooks_{}", shell),output.normalized().as_ref()@@ -619,6 +633,7 @@ command = "echo '✓ All 47 tests passed in 2.3s'"assert_eq!(output.exit_code, 0, "{}: Merge should succeed", shell);output.assert_no_directive_leaks();+ // Shell-specific snapshot - output ordering varies due to PTY bufferingassert_snapshot!(format!("merge_with_pre_merge_success_{}", shell),output.normalized().as_ref()@@ -698,6 +713,7 @@ command = "echo '✗ Test suite failed: 3 tests failing' && exit 1"output.assert_no_directive_leaks();+ // Shell-specific snapshot - output ordering varies due to PTY bufferingassert_snapshot!(format!("merge_with_pre_merge_failure_{}", shell),output.normalized().as_ref()diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__command_failure_zsh.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__command_failure.snapsimilarity index 100%rename from tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__command_failure_zsh.snaprename to tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__command_failure.snapdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__command_failure_bash.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__command_failure_bash.snapdeleted file mode 100644index ac84809cb..000000000--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__command_failure_bash.snap+++ /dev/null@@ -1,7 +0,0 @@-----source: tests/integration_tests/shell_wrapper.rs-expression: normalized.as_ref()-----❌ [31mBranch [1m[31mexisting[0m already exists[0m--💡 [2mRemove --create flag to switch to it[0mdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__command_failure_fish.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__command_failure_fish.snapdeleted file mode 100644index ac84809cb..000000000--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__command_failure_fish.snap+++ /dev/null@@ -1,7 +0,0 @@-----source: tests/integration_tests/shell_wrapper.rs-expression: normalized.as_ref()-----❌ [31mBranch [1m[31mexisting[0m already exists[0m--💡 [2mRemove --create flag to switch to it[0mdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_bash.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge.snapsimilarity index 100%rename from tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_bash.snaprename to tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge.snapdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_fish.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_fish.snapdeleted file mode 100644index f0f2b867a..000000000--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_fish.snap+++ /dev/null@@ -1,5 +0,0 @@-----source: tests/integration_tests/shell_wrapper.rs-expression: output.normalized().as_ref()-----✅ [32mAlready on [1m[32mmain[0m, nothing to merge[0mdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_bash.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_bash.snapindex 793f6eba1..4ece4dbc7 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_bash.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_bash.snap@@ -2,6 +2,7 @@source: tests/integration_tests/shell_wrapper.rsexpression: output.normalized().as_ref()---+🔄 [36mRebasing onto [1m[36mmain[0m...[0m🔄 [36mRunning pre-merge: format[0m[40m [0m [1m[34mecho [32m'✓ Code formatting check passed'diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_fish.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_fish.snapindex c40d1fdba..3c881fa1f 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_fish.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_fish.snap@@ -2,6 +2,7 @@source: tests/integration_tests/shell_wrapper.rsexpression: output.normalized().as_ref()---+🔄 [36mRebasing onto [1m[36mmain[0m...[0m🔄 [36mRunning pre-merge: format[0m[40m [0m [1m[34mecho [32m'✓ Code formatting check passed'diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_zsh.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_zsh.snapindex f0e6bd678..b120b47be 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_zsh.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_failure_zsh.snap@@ -9,6 +9,7 @@ expression: output.normalized().as_ref()Command failed with exit code: exit status: 1💡 [2mUse --no-hooks to skip pre-merge commands[0m+🔄 [36mRebasing onto [1m[36mmain[0m...[0m🔄 [36mRunning pre-merge: format[0m[40m [0m [1m[34mecho [32m'✓ Code formatting check passed'diff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_bash.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_bash.snapindex f246b0d01..52d40277f 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_bash.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_bash.snap@@ -2,6 +2,7 @@source: tests/integration_tests/shell_wrapper.rsexpression: output.normalized().as_ref()---+🔄 [36mRebasing onto [1m[36mmain[0m...[0m🔄 [36mRunning pre-merge: format[0m[40m [0m [1m[34mecho [32m'✓ Code formatting check passed'@@ -17,7 +18,6 @@ expression: output.normalized().as_ref()✓ All 47 tests passed in 2.3s-🔄 [36mRebasing onto [1m[36mmain[0m...[0m🔄 [36mMerging 1 commit to [1m[36mmain[0m[0m @ [2md067f01[0m* [33md067f01[m[33m ([m[1;36mHEAD[m[33m -> [m[1;32mfeature[m[33m)[m Add featurediff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_fish.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_fish.snapindex e8167e084..f42702cbf 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_fish.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_fish.snap@@ -2,6 +2,7 @@source: tests/integration_tests/shell_wrapper.rsexpression: output.normalized().as_ref()---+🔄 [36mRebasing onto [1m[36mmain[0m...[0m🔄 [36mRunning pre-merge: format[0m[40m [0m [1m[34mecho [32m'✓ Code formatting check passed'@@ -14,7 +15,6 @@ expression: output.normalized().as_ref()[40m [0m [1m[34mecho [32m'✓ All 47 tests passed in 2.3s'✓ All 47 tests passed in 2.3s-🔄 [36mRebasing onto [1m[36mmain[0m...[0m🔄 [36mMerging 1 commit to [1m[36mmain[0m[0m @ [2md067f01[0m* [33md067f01[m[33m ([m[1;36mHEAD[m[33m -> [m[1;32mfeature[m[33m)[m Add featurediff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_zsh.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_zsh.snapindex 92a95eaf8..c9c58c67c 100644--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_zsh.snap+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_with_pre_merge_success_zsh.snap@@ -5,6 +5,7 @@ expression: output.normalized().as_ref()✓ Code formatting check passed✓ Linting passed - no warnings✓ All 47 tests passed in 2.3s+🔄 [36mRebasing onto [1m[36mmain[0m...[0m🔄 [36mRunning pre-merge: format[0m[40m [0m [1m[34mecho [32m'✓ Code formatting check passed'@@ -17,7 +18,6 @@ expression: output.normalized().as_ref()[40m [0m [1m[34mecho [32m'✓ All 47 tests passed in 2.3s'-🔄 [36mRebasing onto [1m[36mmain[0m...[0m🔄 [36mMerging 1 commit to [1m[36mmain[0m[0m @ [2md067f01[0m* [33md067f01[m[33m ([m[1;36mHEAD[m[33m -> [m[1;32mfeature[m[33m)[m Add featurediff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_zsh.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_zsh.snapdeleted file mode 100644index f0f2b867a..000000000--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_zsh.snap+++ /dev/null@@ -1,5 +0,0 @@-----source: tests/integration_tests/shell_wrapper.rs-expression: output.normalized().as_ref()-----✅ [32mAlready on [1m[32mmain[0m, nothing to merge[0mdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__remove_bash.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__remove.snapsimilarity index 100%rename from tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__remove_bash.snaprename to tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__remove.snapdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__remove_fish.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__remove_fish.snapdeleted file mode 100644index 8b824a4bb..000000000--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__remove_fish.snap+++ /dev/null@@ -1,6 +0,0 @@-----source: tests/integration_tests/shell_wrapper.rs-expression: output.normalized().as_ref()-----🔄 [36mRemoving worktree for [1mto-remove[0m...[0m-✅ [32mRemoved worktree for [1m[32mto-remove[0m[0mdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__remove_zsh.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__remove_zsh.snapdeleted file mode 100644index 8b824a4bb..000000000--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__remove_zsh.snap+++ /dev/null@@ -1,6 +0,0 @@-----source: tests/integration_tests/shell_wrapper.rs-expression: output.normalized().as_ref()-----🔄 [36mRemoving worktree for [1mto-remove[0m...[0m-✅ [32mRemoved worktree for [1m[32mto-remove[0m[0mdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_create_bash.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_create.snapsimilarity index 100%rename from tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_create_bash.snaprename to tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_create.snapdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_create_fish.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_create_fish.snapdeleted file mode 100644index 2c88e4e9d..000000000--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_create_fish.snap+++ /dev/null@@ -1,5 +0,0 @@-----source: tests/integration_tests/shell_wrapper.rs-expression: output.normalized().as_ref()-----✅ [32mCreated new worktree for [1m[32mfeature[0m, changed directory to [1m[32m[TMPDIR]/test-repo.feature[0m[0mdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_create_zsh.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_create_zsh.snapdeleted file mode 100644index 2c88e4e9d..000000000--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_create_zsh.snap+++ /dev/null@@ -1,5 +0,0 @@-----source: tests/integration_tests/shell_wrapper.rs-expression: output.normalized().as_ref()-----✅ [32mCreated new worktree for [1m[32mfeature[0m, changed directory to [1m[32m[TMPDIR]/test-repo.feature[0m[0mdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_execute_bash.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_execute.snapsimilarity index 100%rename from tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_execute_bash.snaprename to tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_execute.snapdiff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_execute_fish.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_execute_fish.snapdeleted file mode 100644index 2450fdfa2..000000000--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_execute_fish.snap+++ /dev/null@@ -1,9 +0,0 @@-----source: tests/integration_tests/shell_wrapper.rs-expression: output.normalized().as_ref()-----✅ [32mCreated new worktree for [1m[32mtest-exec[0m, changed directory to [1m[32m[TMPDIR]/test-repo.test-exec[0m[0m-🔄 [36mExecuting (--execute):[0m-[40m [0m [1m[34mecho executed--executeddiff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_execute_zsh.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_execute_zsh.snapdeleted file mode 100644index 2450fdfa2..000000000--- a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_execute_zsh.snap+++ /dev/null@@ -1,9 +0,0 @@-----source: tests/integration_tests/shell_wrapper.rs-expression: output.normalized().as_ref()-----✅ [32mCreated new worktree for [1m[32mtest-exec[0m, changed directory to [1m[32m[TMPDIR]/test-repo.test-exec[0m[0m-🔄 [36mExecuting (--execute):[0m-[40m [0m [1m[34mecho executed--executeddiff --git a/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks.snap b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks.snapnew file mode 100644index 000000000..64c1da482--- /dev/null+++ b/tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_hooks.snap@@ -0,0 +1,21 @@+---+source: tests/integration_tests/shell_wrapper.rs+expression: output.normalized().as_ref()+---+🔄 [36mRunning post-create: 1[0m+[40m [0m [1m[34mecho [32m'Installing dependencies...'++Installing dependencies...++🔄 [36mRunning post-create: 2[0m+[40m [0m [1m[34mecho [32m'Building project...'++Building project...++🔄 [36mRunning post-start: server[0m+[40m [0m [1m[34mecho [32m'Starting dev server on port 3000'++🔄 [36mRunning post-start: watch[0m+[40m [0m [1m[34mecho [32m'Watching for file changes'++✅ [32mCreated new worktree for [1m[32mfeature-hooks[0m, changed directory to [1m[32m[TMPDIR]/test-repo.feature-hooks[0m[0mdiff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_combined_output.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_combined_output.snapindex d402fe669..fe2a85cc6 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_combined_output.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_combined_output.snap@@ -3,6 +3,7 @@ source: tests/integration_tests/merge.rsexpression: output---Exit code: 0+🔄 [36mRebasing onto [1m[36mmain[0m...[0m🔄 [36mRunning pre-merge: first[0m[40m [0m [1m[34mecho [32m'STDOUT-FROM-FIRST' [36m&& [1m[34mecho [32m'STDERR-FROM-FIRST' >&2@@ -13,7 +14,6 @@ STDERR-FROM-FIRSTSTDOUT-FROM-SECONDSTDERR-FROM-SECOND-🔄 [36mRebasing onto [1m[36mmain[0m...[0m🔄 [36mMerging 1 commit to [1m[36mmain[0m[0m @ [SHA]* [SHA][33m ([m[1;36mHEAD[m[33m -> [m[1;32mfeature[m[33m)[m Add feature filediff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_failure.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_failure.snapindex 854bcca8b..a2462342e 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_failure.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_failure.snap@@ -17,11 +17,12 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp94U8xj/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmp1a9gRi/test-config.toml---success: falseexit_code: 1----- stdout -----+🔄 [36mRebasing onto [1m[36mmain[0m...[0m🔄 [36mRunning pre-merge:[0m[40m [0m [1m[34mexit 1diff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snapindex d55bbd990..fcee81663 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_named.snap@@ -17,11 +17,12 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpPrCPpK/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpSbuIzF/test-config.toml---success: trueexit_code: 0----- stdout -----+🔄 [36mRebasing onto [1m[36mmain[0m...[0m🔄 [36mRunning pre-merge: format[0m[40m [0m [1m[34mexit 0@@ -31,7 +32,6 @@ exit_code: 0🔄 [36mRunning pre-merge: test[0m[40m [0m [1m[34mexit 0-🔄 [36mRebasing onto [1m[36mmain[0m...[0m🔄 [36mMerging 1 commit to [1m[36mmain[0m[0m @ [SHA]* [SHA][33m ([m[1;36mHEAD[m[33m -> [m[1;32mfeature[m[33m)[m Add feature filediff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_stdout_stderr_ordering.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_stdout_stderr_ordering.snapindex d2dd57f17..f9632b218 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_stdout_stderr_ordering.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_stdout_stderr_ordering.snap@@ -17,18 +17,18 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpFCOghX/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpJGAaLr/test-config.toml---success: trueexit_code: 0----- stdout -----+🔄 [36mRebasing onto [1m[36mmain[0m...[0m🔄 [36mRunning pre-merge: check1[0m[40m [0m [1m[34m[PROJECT_ROOT]/tests/fixtures/mixed-output.sh check1 3🔄 [36mRunning pre-merge: check2[0m[40m [0m [1m[34m[PROJECT_ROOT]/tests/fixtures/mixed-output.sh check2 3-🔄 [36mRebasing onto [1m[36mmain[0m...[0m🔄 [36mMerging 1 commit to [1m[36mmain[0m[0m @ [SHA]* [SHA][33m ([m[1;36mHEAD[m[33m -> [m[1;32mfeature[m[33m)[m Add feature filediff --git a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_success.snap b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_success.snapindex f6e24bd9c..27db741c3 100644--- a/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_success.snap+++ b/tests/snapshots/integration__integration_tests__merge__merge_pre_merge_command_success.snap@@ -17,15 +17,15 @@ info:LANG: CLC_ALL: CSOURCE_DATE_EPOCH: "1761609600"- WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmpEcOa0w/test-config.toml+ WORKTRUNK_CONFIG_PATH: /var/folders/wf/s6ycxvvs4ln8qsdbfx40hnc40000gn/T/.tmplKmOf1/test-config.toml---success: trueexit_code: 0----- stdout -----+🔄 [36mRebasing onto [1m[36mmain[0m...[0m🔄 [36mRunning pre-merge:[0m[40m [0m [1m[34mexit 0-🔄 [36mRebasing onto [1m[36mmain[0m...[0m🔄 [36mMerging 1 commit to [1m[36mmain[0m[0m @ [SHA]* [SHA][33m ([m[1;36mHEAD[m[33m -> [m[1;32mfeature[m[33m)[m Add feature file