From bd76039d70e69201b5484bc9a29865330e5ae93b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 15 May 2026 12:50:38 +0000 Subject: [PATCH 1/8] Initial plan From c82b09489de218e2c56e72c4f37016b7ecc9acf7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 15 May 2026 12:52:21 +0000 Subject: [PATCH 2/8] feat(actions): add reusable zsh ci workflow Agent-Logs-Url: https://github.com/z-shell/.github/sessions/049d7344-1f68-482a-a7df-c757da5c5a75 Co-authored-by: ss-o <59910950+ss-o@users.noreply.github.com> --- .github/workflows/reusable-zsh-ci.yml | 32 +++++++++++++++++++++++++++ .github/workflows/zsh-n.yml | 1 + 2 files changed, 33 insertions(+) create mode 100644 .github/workflows/reusable-zsh-ci.yml diff --git a/.github/workflows/reusable-zsh-ci.yml b/.github/workflows/reusable-zsh-ci.yml new file mode 100644 index 000000000..d867f7dc7 --- /dev/null +++ b/.github/workflows/reusable-zsh-ci.yml @@ -0,0 +1,32 @@ +--- +name: Reusable Zsh CI + +"on": + workflow_call: {} + +jobs: + zsh-ci: + runs-on: ubuntu-latest + steps: + - name: ⤵️ Check out code from GitHub + uses: actions/checkout@v4.2.2 + + - name: ⚡ Install Zsh + run: sudo apt update && sudo apt-get install -yq zsh + + - name: ⚡ zsh -n on all .zsh files + run: | + set -euo pipefail + find . -type f -name '*.zsh' -print0 | + while IFS= read -r -d '' file; do + zsh -n "${file}" + done + + - name: ⚡ zcompile all .zsh files + run: | + set -euo pipefail + find . -type f -name '*.zsh' -print0 | + while IFS= read -r -d '' file; do + zsh -fc "zcompile ${file}" + ls -al "${file}.zwc" + done diff --git a/.github/workflows/zsh-n.yml b/.github/workflows/zsh-n.yml index 0995718fd..50a485ea5 100644 --- a/.github/workflows/zsh-n.yml +++ b/.github/workflows/zsh-n.yml @@ -1,6 +1,7 @@ --- name: "✅ Zsh" on: + workflow_call: {} push: paths: - "**/*.zsh" From 3b323544ba2ba20c70c3cb5cdfcd06f96887ee7b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 15 May 2026 12:53:11 +0000 Subject: [PATCH 3/8] fix(actions): harden reusable zsh compilation step Agent-Logs-Url: https://github.com/z-shell/.github/sessions/049d7344-1f68-482a-a7df-c757da5c5a75 Co-authored-by: ss-o <59910950+ss-o@users.noreply.github.com> --- .github/workflows/reusable-zsh-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable-zsh-ci.yml b/.github/workflows/reusable-zsh-ci.yml index d867f7dc7..dc1e66b9e 100644 --- a/.github/workflows/reusable-zsh-ci.yml +++ b/.github/workflows/reusable-zsh-ci.yml @@ -18,7 +18,7 @@ jobs: run: | set -euo pipefail find . -type f -name '*.zsh' -print0 | - while IFS= read -r -d '' file; do + while IFS= read -r -d $'\0' file; do zsh -n "${file}" done @@ -26,7 +26,7 @@ jobs: run: | set -euo pipefail find . -type f -name '*.zsh' -print0 | - while IFS= read -r -d '' file; do - zsh -fc "zcompile ${file}" + while IFS= read -r -d $'\0' file; do + zsh -fc 'zcompile -- "$1"' zsh "${file}" ls -al "${file}.zwc" done From 0301b85636f49e58d0196c11cf608bed919eb9e5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 15 May 2026 12:53:46 +0000 Subject: [PATCH 4/8] fix(actions): avoid subshell loops in reusable zsh ci Agent-Logs-Url: https://github.com/z-shell/.github/sessions/049d7344-1f68-482a-a7df-c757da5c5a75 Co-authored-by: ss-o <59910950+ss-o@users.noreply.github.com> --- .github/workflows/reusable-zsh-ci.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/reusable-zsh-ci.yml b/.github/workflows/reusable-zsh-ci.yml index dc1e66b9e..839fa8be4 100644 --- a/.github/workflows/reusable-zsh-ci.yml +++ b/.github/workflows/reusable-zsh-ci.yml @@ -17,16 +17,14 @@ jobs: - name: ⚡ zsh -n on all .zsh files run: | set -euo pipefail - find . -type f -name '*.zsh' -print0 | - while IFS= read -r -d $'\0' file; do + while IFS= read -r -d $'\0' file; do zsh -n "${file}" - done + done < <(find . -type f -name '*.zsh' -print0) - name: ⚡ zcompile all .zsh files run: | set -euo pipefail - find . -type f -name '*.zsh' -print0 | - while IFS= read -r -d $'\0' file; do + while IFS= read -r -d $'\0' file; do zsh -fc 'zcompile -- "$1"' zsh "${file}" ls -al "${file}.zwc" - done + done < <(find . -type f -name '*.zsh' -print0) From 12b54a06326e1651d5ebc087d2c52aa1d3b66e91 Mon Sep 17 00:00:00 2001 From: Sall <59910950+ss-o@users.noreply.github.com> Date: Fri, 15 May 2026 14:09:30 +0100 Subject: [PATCH 5/8] Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Signed-off-by: Sall <59910950+ss-o@users.noreply.github.com> --- .github/workflows/reusable-zsh-ci.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/reusable-zsh-ci.yml b/.github/workflows/reusable-zsh-ci.yml index 839fa8be4..3098c7f53 100644 --- a/.github/workflows/reusable-zsh-ci.yml +++ b/.github/workflows/reusable-zsh-ci.yml @@ -17,14 +17,24 @@ jobs: - name: ⚡ zsh -n on all .zsh files run: | set -euo pipefail - while IFS= read -r -d $'\0' file; do + mapfile -d '' files < <(find . -type f -name '*.zsh' -print0) + if [ "${#files[@]}" -eq 0 ]; then + echo "ERROR: No .zsh files found to validate." >&2 + exit 1 + fi + for file in "${files[@]}"; do zsh -n "${file}" - done < <(find . -type f -name '*.zsh' -print0) + done - name: ⚡ zcompile all .zsh files run: | set -euo pipefail - while IFS= read -r -d $'\0' file; do + mapfile -d '' files < <(find . -type f -name '*.zsh' -print0) + if [ "${#files[@]}" -eq 0 ]; then + echo "ERROR: No .zsh files found to compile." >&2 + exit 1 + fi + for file in "${files[@]}"; do zsh -fc 'zcompile -- "$1"' zsh "${file}" ls -al "${file}.zwc" - done < <(find . -type f -name '*.zsh' -print0) + done From a499f9dd4b86381e6e4b8bcaa1c3aa7a04c71dff Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 15 May 2026 13:10:57 +0000 Subject: [PATCH 6/8] fix(actions): prune doc directory in reusable zsh file discovery Agent-Logs-Url: https://github.com/z-shell/.github/sessions/ce3b120c-fbcc-4575-88e5-9b02d5b62f8b Co-authored-by: ss-o <59910950+ss-o@users.noreply.github.com> --- .github/workflows/reusable-zsh-ci.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-zsh-ci.yml b/.github/workflows/reusable-zsh-ci.yml index 3098c7f53..780c091de 100644 --- a/.github/workflows/reusable-zsh-ci.yml +++ b/.github/workflows/reusable-zsh-ci.yml @@ -17,7 +17,9 @@ jobs: - name: ⚡ zsh -n on all .zsh files run: | set -euo pipefail - mapfile -d '' files < <(find . -type f -name '*.zsh' -print0) + mapfile -d '' files < <( + find . -type d -name 'doc' -prune -o -type f -name '*.zsh' -print0 + ) if [ "${#files[@]}" -eq 0 ]; then echo "ERROR: No .zsh files found to validate." >&2 exit 1 @@ -29,7 +31,9 @@ jobs: - name: ⚡ zcompile all .zsh files run: | set -euo pipefail - mapfile -d '' files < <(find . -type f -name '*.zsh' -print0) + mapfile -d '' files < <( + find . -type d -name 'doc' -prune -o -type f -name '*.zsh' -print0 + ) if [ "${#files[@]}" -eq 0 ]; then echo "ERROR: No .zsh files found to compile." >&2 exit 1 From e728b10f938fc83ed529311ac87b9c87c44dddf8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 15 May 2026 13:11:49 +0000 Subject: [PATCH 7/8] fix(actions): clarify find prune expression in reusable zsh ci Agent-Logs-Url: https://github.com/z-shell/.github/sessions/ce3b120c-fbcc-4575-88e5-9b02d5b62f8b Co-authored-by: ss-o <59910950+ss-o@users.noreply.github.com> --- .github/workflows/reusable-zsh-ci.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-zsh-ci.yml b/.github/workflows/reusable-zsh-ci.yml index 780c091de..ed79d4e73 100644 --- a/.github/workflows/reusable-zsh-ci.yml +++ b/.github/workflows/reusable-zsh-ci.yml @@ -18,7 +18,8 @@ jobs: run: | set -euo pipefail mapfile -d '' files < <( - find . -type d -name 'doc' -prune -o -type f -name '*.zsh' -print0 + find . -type d -name 'doc' -prune -o \ + \( -type f -name '*.zsh' -print0 \) ) if [ "${#files[@]}" -eq 0 ]; then echo "ERROR: No .zsh files found to validate." >&2 @@ -32,7 +33,8 @@ jobs: run: | set -euo pipefail mapfile -d '' files < <( - find . -type d -name 'doc' -prune -o -type f -name '*.zsh' -print0 + find . -type d -name 'doc' -prune -o \ + \( -type f -name '*.zsh' -print0 \) ) if [ "${#files[@]}" -eq 0 ]; then echo "ERROR: No .zsh files found to compile." >&2 From 70c5f56381bdc29f071b9b35a2bc7995537cfb1b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 15 May 2026 13:12:22 +0000 Subject: [PATCH 8/8] fix(actions): align find prune expression with review guidance Agent-Logs-Url: https://github.com/z-shell/.github/sessions/ce3b120c-fbcc-4575-88e5-9b02d5b62f8b Co-authored-by: ss-o <59910950+ss-o@users.noreply.github.com> --- .github/workflows/reusable-zsh-ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/reusable-zsh-ci.yml b/.github/workflows/reusable-zsh-ci.yml index ed79d4e73..780c091de 100644 --- a/.github/workflows/reusable-zsh-ci.yml +++ b/.github/workflows/reusable-zsh-ci.yml @@ -18,8 +18,7 @@ jobs: run: | set -euo pipefail mapfile -d '' files < <( - find . -type d -name 'doc' -prune -o \ - \( -type f -name '*.zsh' -print0 \) + find . -type d -name 'doc' -prune -o -type f -name '*.zsh' -print0 ) if [ "${#files[@]}" -eq 0 ]; then echo "ERROR: No .zsh files found to validate." >&2 @@ -33,8 +32,7 @@ jobs: run: | set -euo pipefail mapfile -d '' files < <( - find . -type d -name 'doc' -prune -o \ - \( -type f -name '*.zsh' -print0 \) + find . -type d -name 'doc' -prune -o -type f -name '*.zsh' -print0 ) if [ "${#files[@]}" -eq 0 ]; then echo "ERROR: No .zsh files found to compile." >&2