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 01/10] 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 02/10] 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 03/10] 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 04/10] 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 05/10] 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 06/10] 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 07/10] 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 08/10] 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 From e6b4ac1885040484843fe7a7d50eada9e43a0b3d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 23 May 2026 16:04:02 +0000 Subject: [PATCH 09/10] fix(reusable-zsh-ci): address all review comments - Unquote `on:` for consistency with other workflows - Add workflow-level `permissions: {}` and job-level `permissions: contents: read` - Add `concurrency:` block matching other repo workflows - Pin actions/checkout to SHA de0fac2e (v6.0.2) - Use apt-get consistently (drop bare `apt update`) - Prune `.git/` in both find commands alongside `doc/` - Change exit 1 on no .zsh files to no-op exit 0 Agent-Logs-Url: https://github.com/z-shell/.github/sessions/ba89a619-772a-4b3e-9e6c-57c215be60dc Co-authored-by: ss-o <59910950+ss-o@users.noreply.github.com> --- .github/workflows/reusable-zsh-ci.yml | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/.github/workflows/reusable-zsh-ci.yml b/.github/workflows/reusable-zsh-ci.yml index 780c091de..6794bbc33 100644 --- a/.github/workflows/reusable-zsh-ci.yml +++ b/.github/workflows/reusable-zsh-ci.yml @@ -1,28 +1,36 @@ --- name: Reusable Zsh CI -"on": +on: workflow_call: {} +permissions: {} + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: zsh-ci: runs-on: ubuntu-latest + permissions: + contents: read steps: - name: ⤵️ Check out code from GitHub - uses: actions/checkout@v4.2.2 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: ⚡ Install Zsh - run: sudo apt update && sudo apt-get install -yq zsh + run: sudo apt-get update && sudo apt-get install -yq zsh - name: ⚡ zsh -n on all .zsh files run: | set -euo pipefail mapfile -d '' files < <( - find . -type d -name 'doc' -prune -o -type f -name '*.zsh' -print0 + find . -type d \( -name '.git' -o -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 + echo "No .zsh files found — nothing to check." + exit 0 fi for file in "${files[@]}"; do zsh -n "${file}" @@ -32,11 +40,11 @@ jobs: run: | set -euo pipefail mapfile -d '' files < <( - find . -type d -name 'doc' -prune -o -type f -name '*.zsh' -print0 + find . -type d \( -name '.git' -o -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 + echo "No .zsh files found — nothing to compile." + exit 0 fi for file in "${files[@]}"; do zsh -fc 'zcompile -- "$1"' zsh "${file}" From 291f77dd8a74ec593f5b22506f845b110992ebcb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 26 May 2026 17:23:49 +0000 Subject: [PATCH 10/10] fix(workflows): remove duplicate reusable-zsh-ci.yml zsh-ci.yml already provides the same functionality (zsh -n + optional zcompile) with more robust behavior: zsh-version/run-zcompile inputs, GitHub error annotations, and proper error accumulation. Addresses review comment about overlap with existing zsh-ci.yml workflow. --- .github/workflows/reusable-zsh-ci.yml | 52 --------------------------- 1 file changed, 52 deletions(-) delete mode 100644 .github/workflows/reusable-zsh-ci.yml diff --git a/.github/workflows/reusable-zsh-ci.yml b/.github/workflows/reusable-zsh-ci.yml deleted file mode 100644 index 6794bbc33..000000000 --- a/.github/workflows/reusable-zsh-ci.yml +++ /dev/null @@ -1,52 +0,0 @@ ---- -name: Reusable Zsh CI - -on: - workflow_call: {} - -permissions: {} - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - zsh-ci: - runs-on: ubuntu-latest - permissions: - contents: read - steps: - - name: ⤵️ Check out code from GitHub - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - - - name: ⚡ Install Zsh - run: sudo apt-get update && sudo apt-get install -yq zsh - - - name: ⚡ zsh -n on all .zsh files - run: | - set -euo pipefail - mapfile -d '' files < <( - find . -type d \( -name '.git' -o -name 'doc' \) -prune -o -type f -name '*.zsh' -print0 - ) - if [ "${#files[@]}" -eq 0 ]; then - echo "No .zsh files found — nothing to check." - exit 0 - fi - for file in "${files[@]}"; do - zsh -n "${file}" - done - - - name: ⚡ zcompile all .zsh files - run: | - set -euo pipefail - mapfile -d '' files < <( - find . -type d \( -name '.git' -o -name 'doc' \) -prune -o -type f -name '*.zsh' -print0 - ) - if [ "${#files[@]}" -eq 0 ]; then - echo "No .zsh files found — nothing to compile." - exit 0 - fi - for file in "${files[@]}"; do - zsh -fc 'zcompile -- "$1"' zsh "${file}" - ls -al "${file}.zwc" - done