Skip to content

ci: weekly release-only lazy.nvim updates, with a reproducible plugin restore - #53

Merged
potsrevennil merged 5 commits into
masterfrom
ci/lazy-release-updates
Oct 20, 2026
Merged

potsrevennil merged 5 commits into
masterfrom
ci/lazy-release-updates

Conversation

@potsrevennil

@potsrevennil potsrevennil commented Oct 20, 2026 •

Copy link
Copy Markdown
Owner

Dependabot can't update lazy-lock.json, and :Lazy sync moves every plugin to its branch head, which is what made #49 a 16-plugin bump. This adds a weekly workflow that moves plugins only when upstream cuts a release. It also fixes CI's plugin restore, which the workflow depends on, and shares the setup between the two workflows.

Release-only updates. lua/config/lazy.lua sets defaults = { version = "*" }, so plugins with semver tags resolve to releases. .github/scripts/lazy-update.lua updates only plugins whose target is a newer release and labels each bump patch / minor / major in the PR body. Plugins with an explicit branch, version = false (nvim-cmp) or no tags stay at their locked commit. lazy-update.yml runs Mondays at 07:00 UTC: it smoke-tests the result, opens or refreshes one chore/lazy-update PR, and starts CI on it with workflow_dispatch, since PRs opened with GITHUB_TOKEN don't trigger workflows.

CI restore fix. A bare Lazy! restore on a fresh runner doesn't reproduce the lockfile. lazy.nvim's first-run install handles LazyVim before the plugins its specs import are known, rewrites the lock without them, and installs those at their upstream target. On master today, a fresh restore leaves 6 plugins off their locked commits; CI only gets it right on a warm cache. The restore now installs first, puts the committed lock back, restores, and cmps the result.

Shared setup. .github/actions/setup-kapi-vim builds the package, puts nvim on PATH, handles the plugin cache and runs the checked restore. ci.yml's test job and lazy-update.yml both call it. It's a composite action rather than a reusable workflow because lazy-update runs its update step between the restore and the smoke test.

  • Look at: the forward-only rule in lazy-update.lua. Most plugins are locked past their last tag (plenary's last release is from 2023), so "latest release" would be a downgrade. A release the locked commit already contains is skipped; releases cut from a separate branch (neo-tree's v3.x) are compared by version.
  • Look at: the cache split in the action. cache/restore plus cache/save let lazy-update read CI's cache with save-cache: 'false', so bumped plugins are never stored under the old lockfile's key. The save runs straight after the checked restore. The key changes from matrix.runs-on to runner.os/runner.arch (an action can't see the matrix), so expect one cache miss.
  • Look at: lazy.nvim internals. The script uses lazy.manage.git, lazy.manage.semver and plugin._.updates, not a public API, so a lazy.nvim update can break it. It then fails at the check or update step rather than writing a bad lockfile.
  • Verify:
    • Against this lock, the script finds no releases ahead of the locked commits, so nothing moves.
    • With flash rolled back to v2.0.0 and neo-tree to v2.71, it bumps flash to v2.1.0 (minor) and neo-tree to 3.42.0 (major), and only those two entries change.
    • The restore cmp passes on both a cold and a warm cache.
    • After merge: Actions → lazy.nvim updates → Run workflow.
  • Out of scope: GitHub Actions version bumps.

Stacked on #49. Includes what was #54 (restore fix) and #57 (shared action).

🤖 Generated with Claude Code

potsrevennil and others added 3 commits October 20, 2026 15:17
Dependabot has no lazy.nvim ecosystem. A scheduled workflow runs
.github/scripts/lazy-update.lua, which moves lazy-lock.json only to new
tagged releases (patch, minor or major, forward-only) and holds plugins
without releases, then smoke-tests and opens or refreshes one PR.

defaults.version = "*" makes tagged plugins resolve to releases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A bare `Lazy! restore` on a cache miss lets lazy.nvim's first-run
install rewrite the lockfile before LazyVim's imported specs are known,
leaving those plugins at their upstream target. Install first, copy the
committed lock back, restore, and cmp the result -- the same sequence
lazy-update.yml uses.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Base automatically changed from chore/resync-lazy-lock to master October 20, 2026 07:55
potsrevennil and others added 2 commits October 20, 2026 15:59
ci.yml's test job and lazy-update.yml both built a kapi-vim package,
put it on PATH and ran the checked lazy.nvim restore, with the restore
sequence and its comment duplicated. .github/actions/setup-kapi-vim now
does all three, plus the plugin cache.

The cache is split into restore/save so lazy-update can read CI's cache
without writing its updated plugins under the old lockfile's key; the
save also moves to straight after the checked restore. The key changes
from runs-on to OS/arch since a composite action can't see the matrix,
so the first run after this misses once.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@potsrevennil potsrevennil changed the title ci: weekly lazy.nvim updates to new plugin releases ci: weekly release-only lazy.nvim updates, with a reproducible plugin restore Oct 20, 2026
@potsrevennil
potsrevennil marked this pull request as ready for review October 20, 2026 08:24
@potsrevennil
potsrevennil merged commit 224d340 into master Oct 20, 2026
10 checks passed
@potsrevennil
potsrevennil deleted the ci/lazy-release-updates branch October 20, 2026 08:25
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.

1 participant