Skip to content

fix: remove deprecated workflows, pin SHAs, fix autoload bugs, add CI governance#348

Open
ss-o wants to merge 22 commits into
nextfrom
ci/remove-obsolete-workflows
Open

fix: remove deprecated workflows, pin SHAs, fix autoload bugs, add CI governance#348
ss-o wants to merge 22 commits into
nextfrom
ci/remove-obsolete-workflows

Conversation

@ss-o
Copy link
Copy Markdown
Member

@ss-o ss-o commented May 19, 2026

Summary

  • Remove deprecated maintenance workflows: labeler.yml, lock.yml, pr-labels.yml, rebase.yml, stale.yml
  • Remove .github/labeler.yml config (no longer needed)
  • Add CodeQL workflow (codeql.yml) with v4 action, SHA-pinned
  • Pin all actions/checkout references to full commit SHAs
  • Add concurrency: blocks to push/PR-triggered workflows
  • Fix reusable workflow checkout — use z-shell/zd ref instead of github.sha
  • Update CODEOWNERS with granular per-area ownership
  • Add PULL_REQUEST_TEMPLATE and update copilot instructions
  • Fix autoload bugs and docs typos in zi.zsh and lib/zsh/

Test plan

  • Verify no deprecated workflow filenames remain in .github/workflows/
  • Verify all uses: lines reference full commit SHAs (no @v* or @main refs)
  • Confirm trunk-check, zsh-n, zunit, zd-integration, codeql workflows pass on CI
  • Confirm commit-lint workflow enforces conventional commits

ss-o and others added 22 commits May 16, 2026 09:15
Signed-off-by: Salvydas Lukosius <ss-o@users.noreply.github.com>
Signed-off-by: Salvydas Lukosius <ss-o@users.noreply.github.com>
- Add .github/copilot-instructions.md with commit format rules,
  branch model documentation, and prohibition on AI co-author trailers
  or AI config files (AGENTS.md, CLAUDE.md, GEMINI.md, .cursorrules…)

- Add .github/workflows/commit-lint.yml: PR workflow that validates
  conventional commit subject format, blocks AI co-author trailers,
  checks PR title format, and enforces branch naming convention

- Update .github/workflows/trunk-check.yml: run Trunk on next branch
  in addition to main to catch issues before integration

- Update .github/PULL_REQUEST_TEMPLATE.md: document the branch model
  (branch from next, PR to next, next→main for releases) and add
  checklist items for commit hygiene

- Update docs/CONTRIBUTING.md: full branch model diagram, commit
  message guide, and explicit list of files not to add to the repo

- Update .gitignore: add AI assistant config file patterns
Removes five workflows no longer needed:
- rebase.yml: autorebase bot (superseded by merge queues)
- stale.yml: automated stale-issue closer (policy changed)
- pr-labels.yml: label verification bot (replaced by labeler.yml)
- lock.yml: issue/PR locking bot (no longer used)
- zunit.yml: Docker-based test workflow (superseded by zd-integration.yml)
- autoload.zsh: use loop variable rm_file (was rm_compiled) in zi-auto-reload
- autoload.zsh: drop --autostash from git merge (not a valid option)
- autoload.zsh: capture pipestatus[1] from make|tee; drop redundant second make
- autoload.zsh: make cp explicit (zpmod.so → zpmod.bundle, no brace expansion)
- autoload.zsh: guard --reset recompile message with RECOMPILE_REQUEST existence
- docs/README.md: fix thref → href on VIM badge; fix </p></a> → </a></p>
- zi.zsh: remove duplicate 'version' entry from ZI[cmd-list]
- zi.zsh: fix spelling 'noticable' → 'noticeable' and grammar in zicompinit_fast comment
Replace the single wildcard rule with a tiered ownership model:

- Default catch-all: @ss-o for day-to-day reviews
- Core Zsh runtime (zi.zsh, lib/): @z-shell/tsc sign-off required
- CI/workflows and docs: @ss-o only — no TSC overhead
- CODEOWNERS itself: @z-shell/tsc to prevent unauthorized rewrites

Rules are ordered broadest-to-most-specific so the last matching
rule wins, following GitHub's documented evaluation semantics.
Copilot AI review requested due to automatic review settings May 19, 2026 05:36
@ss-o ss-o requested a review from a team as a code owner May 19, 2026 05:36
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the repository’s CI/governance setup (removing deprecated workflows, pinning action SHAs, adding concurrency/CodeQL/commit linting) while also refactoring several Zi runtime Zsh paths around self-update, module handling, and completion initialization.

Changes:

  • CI: remove deprecated workflows, add CodeQL + commit-lint, pin actions/checkout by SHA, add concurrency and adjust branch triggers.
  • Runtime: update zi.zsh/lib/zsh/* for version reporting, module management, self-update + auto-reload, and completion handling.
  • Governance/docs: update CODEOWNERS, add PR template + Copilot instructions, refresh README/CONTRIBUTING, expand .gitignore.

Reviewed changes

Copilot reviewed 25 out of 26 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
zi.zsh Adds version command, refactors option parsing/messages, introduces .zi-set-mtime, changes compinit/module flows.
lib/zsh/side.zsh Minor fixes (builtin autoload, spelling) and removes old .zi-check-module.
lib/zsh/rpm2cpio.zsh Tightens variable scoping (local sigsize).
lib/zsh/install.zsh Refactors completion install + compinit frontend; adds rehash in more places.
lib/zsh/git-process-output.zsh Adds configurable color and adjusts progress rendering/nearcolor loading.
lib/zsh/autoload.zsh Adds auto-reload + revamped self-update; updates completion uninstall, update messaging, module build/reset/info.
lib/_zi Updates completion script options and adds version command completion.
docs/README.md Substantial HTML formatting changes, new logo asset usage, updated badges/links layout.
docs/CONTRIBUTING.md Rewrites contribution guidelines (branch model + Conventional Commits).
.gitignore Adds ignores for AI-assistant config files; keeps trunk output ignore.
.github/workflows/zunit.yml Removed workflow.
.github/workflows/zsh-n.yml Adds concurrency/permissions and pins actions/checkout SHA.
.github/workflows/zd-integration.yml Adds reusable workflow-based integration testing against z-shell/zd.
.github/workflows/trunk-check.yml Runs on main and next, pins actions/checkout SHA.
.github/workflows/stale.yml Removed workflow.
.github/workflows/rebase.yml Removed workflow.
.github/workflows/pr-labels.yml Removed workflow.
.github/workflows/lock.yml Removed workflow.
.github/workflows/labeler.yml Removed workflow.
.github/workflows/commit-lint.yml Adds Conventional Commits validation for commits, PR title, and branch naming.
.github/workflows/codeql.yml Adds SHA-pinned CodeQL v4 scanning for GitHub Actions.
.github/PULL_REQUEST_TEMPLATE.md Replaces template with branch/commit checklist aligned to next workflow.
.github/labeler.yml Removes labeler configuration (workflow removed).
.github/dependabot.yml Switches to weekly updates and targets next.
.github/copilot-instructions.md Adds repo-specific Copilot instructions (branch model/commit rules/code style).
.github/CODEOWNERS Expands ownership rules with area-specific reviewers and ordering notes.
Comments suppressed due to low confidence (1)

zi.zsh:1197

  • Same issue as above: .zi-compinit 1 1 runs compinit -C immediately after adding the _zi completion symlink. If the compdump doesn’t already include _zi, -C can skip regeneration and the completion won’t be picked up. Prefer running compinit without -C when the completion files have just changed.
    # Symlink _zi completion into _local---zi directory.
    command ln -s "${ZI[PLUGINS_DIR]}/_local---zi/_zi" "${ZI[COMPLETIONS_DIR]}"
    (( ${+functions[.zi-setup-plugin-dir]} )) || builtin source "${ZI[BIN_DIR]}/lib/zsh/install.zsh" || return 1
    .zi-compinit 1 1 &>/dev/null

Comment thread zi.zsh
Comment on lines 1186 to 1190
(( ${+functions[.zi-setup-plugin-dir]} )) || builtin source "${ZI[BIN_DIR]}/lib/zsh/install.zsh" || return 1
(( ${+functions[.zi-confirm]} )) || builtin source "${ZI[BIN_DIR]}/lib/zsh/autoload.zsh" || return 1
.zi-clear-completions &>/dev/null
.zi-compinit &>/dev/null
.zi-compinit 1 1 &>/dev/null
fi
Comment thread lib/zsh/install.zsh
Comment on lines 589 to 594
integer use_C=$2

typeset -a symlinked backup_comps
local c cfile bkpfile action

symlinked=( "${ZI[COMPLETIONS_DIR]}"/_[^_.]*~*.zwc )
backup_comps=( "${ZI[COMPLETIONS_DIR]}"/[^_.]*~*.zwc )

# Delete completions if they are really there,
# either as completions (_fname) or backups (fname)
for c in "${symlinked[@]}" "${backup_comps[@]}"; do
action=0
cfile="${c:t}"
cfile="_${cfile#_}"
bkpfile="${cfile#_}"

#print -Pr "${ZI[col-info]}Processing completion $cfile%f%b"
.zi-forget-completion "$cfile"
done

+zi-message "Initializing completion ({func}compinit{rst}){…}"
command rm -f "${ZI[ZCOMPDUMP_PATH]}"

# Workaround for a nasty trick in _vim
(( ${+functions[_vim_files]} )) && unfunction _vim_files
+zi-message "{mmdsh}{happy} Zi{rst} » {faint}initializing {func}compinit{rst}{…}"

builtin autoload -Uz compinit
compinit ${${(M)use_C:#1}:+-C} -d "${ZI[ZCOMPDUMP_PATH]}" "${(Q@)${(z@)ZI[COMPINIT_OPTS]}}"
Comment thread zi.zsh
local set_mtime
.zi-get-mtime-into "${ZI[BIN_DIR]}/zi.zsh" "ZI[mtime]"
for set_mtime ( side install autoload additional ) {
.zi-get-mtime-into "${ZI[BIN_DIR]}/lib/zsh/${set_mtime}.zsh" "ZI[mtime-${set_mtime}]"
Comment thread lib/zsh/autoload.zsh
Comment on lines +697 to +715
(
# Fetch the latest changes from the upstream repository
(( quiet )) || +zi-message "{mmdsh}{happy} Zi{rst} » {profile}fetching updates{rst}{…}"
builtin cd -q $ZI[BIN_DIR] && command git fetch $opt --jobs $cores --tags --prune --force $origin_url refs/heads/main && \
lines=( ${(f)"$(command git log --color --abbrev-commit --decorate --date=short --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cd) %C(bold blue)<%an>%Creset' ..FETCH_HEAD)"} )

# If there are any changes then update the codebase and reload Zi
if (( ${#lines} > 0 )); then
lines=( "${(S)lines[@]//\(([,[:blank:]]#(origin|HEAD|master|main)[^a-zA-Z]##(HEAD|origin|master|main)[,[:blank:]]#)#\)/}" )
lines=( "${lines[@]/ \|\|[[:blank:]]#(#e)/}" )
lines=( "${lines[@]/(#b)[[:space:]]#\|\|[[:space:]]#(*)(#e)/|| ${match[1]}}" )
lines=( "${lines[@]/(#b)$escape([0-9]##)m[[:space:]]##${escape}m/$escape${match[1]}m${escape}m}" )
lines=( "${lines[@]/(#b)[[:blank:]]#\|\|(*)(#e)/| ${${match[1]//$nl/ }[(w)1,(w)10]}}" )
(( quiet )) || { builtin print -rl -- "${lines[@]}" | .zi-pager; }

if (( ! dry_run )); then
# Update the codebase
command git merge -n $opt --ff-only FETCH_HEAD || \
{ (( quiet )) || +zi-message "{mmdsh}{happy} Zi{rst} » {profile}update failed {quos}✘{rst}"; return 1 }
Comment thread zi.zsh
(( ${+functions[.zi-check-module]} )) || builtin source "${ZI[BIN_DIR]}/lib/zsh/side.zsh" || return 1
.zi-check-module
(( ${+functions[.zi-module]} )) || builtin source "${ZI[BIN_DIR]}/lib/zsh/autoload.zsh" || return 1
.zi-module --reset
Comment thread docs/README.md
Comment on lines 9 to 12
<h2 align="center">
🧙‍♂️ 🪄 A Swiss Army Knife for <a href="https://zsh.sourceforge.io/"><strong>Zsh</strong></a> -
<a href="https://en.wikipedia.org/wiki/Unix_shell">Unix Shell ✨</a>
<p><a href="https://en.wikipedia.org/wiki/Unix_shell">Unix Shell ✨</a></p>
</h2>
Comment thread docs/README.md
Comment on lines 23 to +29
<td>
<div align="center">
<a href="https://wiki.zshell.dev/search/"><strong>《💡》Search Wiki </strong></a>
<a href="https://wiki.zshell.dev/docs/getting_started/installation/"><strong>《⚡️》 Install </strong></a>
<a
href="https://github.com/z-shell/community/issues/new?assignees=&labels=%F0%9F%91%A5+member&template=membership.yml&title=team%3A+"><strong>《💜》Join
</strong></a>
<a href="https://translate.zshell.dev/"><strong>《🌐》Localize </strong></a>
</div>
<div align="center"><p><p></p>
<a href="https://wiki.zshell.dev/search/"><strong>⸨ ‑ 💡 Search Wiki ‑ ⸩</strong></a>
<a href="https://wiki.zshell.dev/docs/getting_started/installation/"><strong>⸨ ‑ ⚡️ Install ‑ ⸩</strong></a>
<a href="https://github.com/z-shell/community/issues/new?assignees=&labels=%F0%9F%91%A5+member&template=membership.yml&title=team%3A+"><strong>⸨ ‑ 💜 Join ‑ ⸩</strong></a>
<a href="https://translate.zshell.dev/"><strong>⸨ ‑ 🌐 Localize ‑ ⸩</strong></a>
</p></div>
[[ $+ZI_CIVIS == 1 && -n $TERM ]] && eval $ZI_CIVIS

if [[ -n $TERM ]] {
[[ $COLORTERM == (24bit|truecolor) || ${terminfo[colors]} -eq 16777216 ]] || \
Comment on lines +27 to +28
zi_repo: ${{ github.repository }}
zi_ref: ${{ github.head_ref || github.ref_name }}
Comment on lines +1 to +5
---
name: "🧪 ZD Integration"

on:
push:
@ss-o ss-o changed the title ci: remove deprecated workflows, pin SHAs, and add concurrency fix: remove deprecated workflows, pin SHAs, fix autoload bugs, add CI governance May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants