Skip to content

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.rs
index 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 integration
let 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,
- &current_branch,
- &target_branch,
- &worktree_path,
- &repo,
- &config,
- force,
- )?;
- }
-
// Handle uncommitted changes depending on whether we're squashing
- // Only do this after pre-merge checks pass
if 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,
+ &current_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.rs
index 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 buffering
assert_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 buffering
assert_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 buffering
assert_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.snap
similarity index 100%
rename from tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__command_failure_zsh.snap
rename to tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__command_failure.snap
diff --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.snap
deleted file mode 100644
index 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()
----
-❌ Branch existing already exists
-
-💡 Remove --create flag to switch to it
diff --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.snap
deleted file mode 100644
index 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()
----
-❌ Branch existing already exists
-
-💡 Remove --create flag to switch to it
diff --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.snap
similarity index 100%
rename from tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge_bash.snap
rename to tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__merge.snap
diff --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.snap
deleted file mode 100644
index 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()
----
-✅ Already on main, nothing to merge
diff --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.snap
index 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.rs
expression: output.normalized().as_ref()
---
+🔄 Rebasing onto main...
🔄 Running pre-merge: format
  echo '✓ 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.snap
index 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.rs
expression: output.normalized().as_ref()
---
+🔄 Rebasing onto main...
🔄 Running pre-merge: format
  echo '✓ 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.snap
index 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
💡 Use --no-hooks to skip pre-merge commands
+🔄 Rebasing onto main...
🔄 Running pre-merge: format
  echo '✓ 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.snap
index 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.rs
expression: output.normalized().as_ref()
---
+🔄 Rebasing onto main...
🔄 Running pre-merge: format
  echo '✓ Code formatting check passed'
@@ -17,7 +18,6 @@ expression: output.normalized().as_ref()
✓ All 47 tests passed in 2.3s
-🔄 Rebasing onto main...
🔄 Merging 1 commit to main @ d067f01
* d067f01 (HEAD -> feature) Add feature
diff --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.snap
index 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.rs
expression: output.normalized().as_ref()
---
+🔄 Rebasing onto main...
🔄 Running pre-merge: format
  echo '✓ Code formatting check passed'
@@ -14,7 +15,6 @@ expression: output.normalized().as_ref()
  echo '✓ All 47 tests passed in 2.3s'
✓ All 47 tests passed in 2.3s
-🔄 Rebasing onto main...
🔄 Merging 1 commit to main @ d067f01
* d067f01 (HEAD -> feature) Add feature
diff --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.snap
index 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
+🔄 Rebasing onto main...
🔄 Running pre-merge: format
  echo '✓ Code formatting check passed'
@@ -17,7 +18,6 @@ expression: output.normalized().as_ref()
  echo '✓ All 47 tests passed in 2.3s'
-🔄 Rebasing onto main...
🔄 Merging 1 commit to main @ d067f01
* d067f01 (HEAD -> feature) Add feature
diff --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.snap
deleted file mode 100644
index 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()
----
-✅ Already on main, nothing to merge
diff --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.snap
similarity index 100%
rename from tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__remove_bash.snap
rename to tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__remove.snap
diff --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.snap
deleted file mode 100644
index 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()
----
-🔄 Removing worktree for to-remove...
-✅ Removed worktree for to-remove
diff --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.snap
deleted file mode 100644
index 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()
----
-🔄 Removing worktree for to-remove...
-✅ Removed worktree for to-remove
diff --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.snap
similarity index 100%
rename from tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_create_bash.snap
rename to tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_create.snap
diff --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.snap
deleted file mode 100644
index 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()
----
-✅ Created new worktree for feature, changed directory to [TMPDIR]/test-repo.feature
diff --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.snap
deleted file mode 100644
index 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()
----
-✅ Created new worktree for feature, changed directory to [TMPDIR]/test-repo.feature
diff --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.snap
similarity index 100%
rename from tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_execute_bash.snap
rename to tests/integration_tests/snapshots/integration__integration_tests__shell_wrapper__tests__switch_with_execute.snap
diff --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.snap
deleted file mode 100644
index 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()
----
-✅ Created new worktree for test-exec, changed directory to [TMPDIR]/test-repo.test-exec
-🔄 Executing (--execute):
-  echo executed
-
-executed
diff --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.snap
deleted file mode 100644
index 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()
----
-✅ Created new worktree for test-exec, changed directory to [TMPDIR]/test-repo.test-exec
-🔄 Executing (--execute):
-  echo executed
-
-executed
diff --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.snap
new file mode 100644
index 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()
+---
+🔄 Running post-create: 1
+  echo 'Installing dependencies...'
+
+Installing dependencies...
+
+🔄 Running post-create: 2
+  echo 'Building project...'
+
+Building project...
+
+🔄 Running post-start: server
+  echo 'Starting dev server on port 3000'
+
+🔄 Running post-start: watch
+  echo 'Watching for file changes'
+
+✅ Created new worktree for feature-hooks, changed directory to [TMPDIR]/test-repo.feature-hooks
diff --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.snap
index 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.rs
expression: output
---
Exit code: 0
+🔄 Rebasing onto main...
🔄 Running pre-merge: first
  echo 'STDOUT-FROM-FIRST' && echo 'STDERR-FROM-FIRST' >&2
@@ -13,7 +14,6 @@ STDERR-FROM-FIRST
STDOUT-FROM-SECOND
STDERR-FROM-SECOND
-🔄 Rebasing onto main...
🔄 Merging 1 commit to main @ [SHA]
* [SHA] (HEAD -> feature) Add feature file
diff --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.snap
index 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: C
LC_ALL: C
SOURCE_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: false
exit_code: 1
----- stdout -----
+🔄 Rebasing onto main...
🔄 Running pre-merge:
  exit 1
diff --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.snap
index 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: C
LC_ALL: C
SOURCE_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: true
exit_code: 0
----- stdout -----
+🔄 Rebasing onto main...
🔄 Running pre-merge: format
  exit 0
@@ -31,7 +32,6 @@ exit_code: 0
🔄 Running pre-merge: test
  exit 0
-🔄 Rebasing onto main...
🔄 Merging 1 commit to main @ [SHA]
* [SHA] (HEAD -> feature) Add feature file
diff --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.snap
index 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: C
LC_ALL: C
SOURCE_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: true
exit_code: 0
----- stdout -----
+🔄 Rebasing onto main...
🔄 Running pre-merge: check1
  [PROJECT_ROOT]/tests/fixtures/mixed-output.sh check1 3
🔄 Running pre-merge: check2
  [PROJECT_ROOT]/tests/fixtures/mixed-output.sh check2 3
-🔄 Rebasing onto main...
🔄 Merging 1 commit to main @ [SHA]
* [SHA] (HEAD -> feature) Add feature file
diff --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.snap
index 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: C
LC_ALL: C
SOURCE_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: true
exit_code: 0
----- stdout -----
+🔄 Rebasing onto main...
🔄 Running pre-merge:
  exit 0
-🔄 Rebasing onto main...
🔄 Merging 1 commit to main @ [SHA]
* [SHA] (HEAD -> feature) Add feature file