Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
Fix CI: PTY echo timing normalization and workflow permissions (#456)
Maximilian Roosd2051f3ef910
diff --git a/.github/workflows/claude-ci-fix.yaml b/.github/workflows/claude-ci-fix.yamlindex 9709f27d3..b6f2da3ef 100644--- a/.github/workflows/claude-ci-fix.yaml+++ b/.github/workflows/claude-ci-fix.yaml@@ -23,6 +23,7 @@ jobs:contents: writepull-requests: writeactions: read+ id-token: writesteps:- name: 📂 Checkout codeuses: actions/checkout@v6diff --git a/tests/integration_tests/configure_shell.rs b/tests/integration_tests/configure_shell.rsindex c825485a1..52c593d19 100644--- a/tests/integration_tests/configure_shell.rs+++ b/tests/integration_tests/configure_shell.rs@@ -983,6 +983,17 @@ mod pty_tests {.unwrap().replace_all(&output, "");+ // Remove echoed user input at end of prompt line (PTY echo timing varies).+ // The prompt ends with [y/N/?][22m and then the echoed input appears.+ // Normalize to just the prompt without echoed input.+ let output = regex::Regex::new(r"(\[y/N/\?\]\x1b\[22m) [yn]")+ .unwrap()+ .replace_all(&output, "$1 ");++ // Remove standalone echoed input lines (just y or n on their own line)+ // that appear due to PTY timing differences+ let output = regex::Regex::new(r"^[yn]\n").unwrap().replace(&output, "");+// Replace temp home path with ~/let home_path = temp_home.path().to_string_lossy();output.replace(&*home_path, "~").to_string()diff --git a/tests/snapshots/integration__integration_tests__configure_shell__pty_tests__install_preview_declined.snap b/tests/snapshots/integration__integration_tests__configure_shell__pty_tests__install_preview_declined.snapindex 7edea3f09..eb6db1bb6 100644--- a/tests/snapshots/integration__integration_tests__configure_shell__pty_tests__install_preview_declined.snap+++ b/tests/snapshots/integration__integration_tests__configure_shell__pty_tests__install_preview_declined.snap@@ -2,7 +2,6 @@source: tests/integration_tests/configure_shell.rsexpression: normalized----n[36m❯[39m Install shell integration? [1m[y/N/?][22m✗ Cancelled by userdiff --git a/tests/snapshots/integration__integration_tests__configure_shell__pty_tests__install_preview_with_gutter.snap b/tests/snapshots/integration__integration_tests__configure_shell__pty_tests__install_preview_with_gutter.snapindex 9690a2655..95a228bde 100644--- a/tests/snapshots/integration__integration_tests__configure_shell__pty_tests__install_preview_with_gutter.snap+++ b/tests/snapshots/integration__integration_tests__configure_shell__pty_tests__install_preview_with_gutter.snap@@ -2,7 +2,6 @@source: tests/integration_tests/configure_shell.rsexpression: normalized----y[36m❯[39m Install shell integration? [1m[y/N/?][22m✓ Added shell extension & completions for zsh @ ~/.zshrc