Skip to content

fix: run neovim-upgrade in dev shell on CI and add daily Renovate workflow - #770

Merged
shunkakinoki merged 7 commits into
mainfrom
fix/upgrade-workflow-and-renovate
Feb 9, 2026
Merged

fix: run neovim-upgrade in dev shell on CI and add daily Renovate workflow#770
shunkakinoki merged 7 commits into
mainfrom
fix/upgrade-workflow-and-renovate

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Feb 9, 2026

Copy link
Copy Markdown
Owner

Changes

  • Fix upgrade GHA that has been failing daily since Jan 31 — neovim-upgrade now auto-delegates to neovim-upgrade-dev in CI/Docker, running nvim via nix develop (fixes Error 127: command not found)
  • Add self-hosted Renovate workflow (renovate.yml) running daily at 3am UTC for consistent dependency update checks

Testing

  • Upgrade workflow should pass on next scheduled or manual run
  • Renovate workflow can be triggered via workflow_dispatch

Generated with Claude Code by claude-opus-4-6


Summary by cubic

Fixes the failing upgrade job by running the whole upgrade inside the Nix dev shell via a new upgrade-dev target, and adds a daily Renovate workflow to keep dependencies up to date. Also updates the upgrade schedule and simplifies Ghostty config.

  • Bug Fixes and Refactors

    • Makefile: add upgrade-dev to run make upgrade inside nix develop; CI uses this to ensure nvim is available and avoid recursion/CI guards.
    • Upgrade workflow: runs at 03:00 UTC, triggers on pull_request, uses make upgrade-dev, and skips PR creation when triggered by pull_request.
    • Ghostty: simplify configText assignment in config/ghostty/default.nix.
  • New Features

    • Add .github/workflows/renovate.yml: nightly at 03:00 UTC, manual runs supported, uses renovatebot/github-action@v46.0.2 with PAT_TOKEN, includes an “Alls Green” check.

Written for commit 5666f8f. Summary will update on new commits.

…kflow

- neovim-upgrade now delegates to neovim-upgrade-dev in CI/Docker,
  running nvim via nix develop where it is available (fixes Error 127)
- Add self-hosted Renovate workflow running daily at 3am UTC
Copilot AI review requested due to automatic review settings February 9, 2026 10:06
@mesa-dot-dev

mesa-dot-dev Bot commented Feb 9, 2026

Copy link
Copy Markdown

You do not have enough credits to review this pull request. Please purchase more credits to continue.

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @shunkakinoki, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a critical failure in the daily Neovim upgrade workflow on CI and introduces a new automated process for dependency management. The changes ensure that Neovim plugin updates proceed smoothly in automated environments and establish a regular schedule for checking and updating project dependencies.

Highlights

  • Neovim Upgrade Fix: The neovim-upgrade GitHub Actions workflow now correctly runs nvim via nix develop in CI/Docker environments, resolving "command not found" errors that have been occurring since January 31st.
  • Renovate Workflow: A new self-hosted Renovate workflow (renovate.yml) has been added to run daily at 3 AM UTC, ensuring consistent dependency update checks.
Changelog
  • Makefile
    • Modified the neovim-upgrade target to conditionally delegate the upgrade process to a new neovim-upgrade-dev target when running in CI or Docker environments.
    • Added a new neovim-upgrade-dev target which executes the Neovim plugin update command within a Nix development shell, specifically designed to mirror the CI environment.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/renovate.yml
Activity
  • The upgrade workflow is expected to pass on its next scheduled or manual run.
  • The new Renovate workflow can be manually triggered via workflow_dispatch.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@mesa-dot-dev

mesa-dot-dev Bot commented Feb 9, 2026

Copy link
Copy Markdown

Mesa Description

TL;DR

Fixed the daily failing Neovim plugin upgrade CI job by adjusting how nvim runs in the Nix dev shell, added a daily Renovate workflow for dependency updates, updated the upgrade workflow schedule, and made a minor stylistic change to the Ghostty config.

What changed?

  • .github/workflows/renovate.yml: A new daily GitHub Actions workflow named 'Renovate' was added. It uses renovatebot/github-action@v46.0.2 with a PAT_TOKEN to manage dependencies based on renovate.json, includes manual trigger support, and has a subsequent job to verify execution.
  • Makefile: The neovim-upgrade target now conditionally delegates to neovim-upgrade-dev when CI or IN_DOCKER environment variables are present. neovim-upgrade-dev runs nvim directly via nix develop to prevent recursion and resolve "command not found" errors.
  • .github/workflows/upgrade.yml: The upgrade workflow now triggers on pull requests in addition to its scheduled (now 3 AM UTC) and manual runs. A conditional check was added to prevent new pull request creation when the workflow is triggered by an existing pull request.
  • config/ghostty/default.nix: The configText variable's assignment, specifically the builtins.replaceStrings function call, was refactored for better readability by consolidating it into a single line, with no functional changes.

Description generated by Mesa. Update settings

@coderabbitai

coderabbitai Bot commented Feb 9, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Adds a Renovate GitHub Actions workflow and tweaks workflows and Makefile to run Neovim plugin updates inside the Nix dev shell in CI/Docker; also reformats a nix expression. Changes include workflow triggers, a new Makefile target, and conditional invocation of that target.

Changes

Cohort / File(s) Summary
Renovate workflow
.github/workflows/renovate.yml
New GitHub Actions workflow: scheduled (cron 0 3 * * *) and manual dispatch triggers; renovate job runs renovatebot/github-action using renovate.json and PAT_TOKEN; renovate-check job runs after renovate and invokes Alls Green to report status.
Upgrade workflow tweak
.github/workflows/upgrade.yml
Adds pull_request trigger, shifts scheduled cron from 2:00→3:00, and guards the Create Pull Request step to skip on pull_request events.
Makefile (Neovim targets)
Makefile
Adds neovim-upgrade-dev target to update Neovim plugins inside the Nix dev shell; neovim-upgrade now conditionally delegates to neovim-upgrade-dev when CI or IN_DOCKER is true, otherwise runs headless Neovim locally.
Nix formatting change
config/ghostty/default.nix
Reformatted a builtins.replaceStrings call from multi-line to single-line; no semantic change.

Sequence Diagram(s)

sequenceDiagram
  participant Scheduler as "GitHub Scheduler / Manual"
  participant GHActions as "GitHub Actions"
  participant Checkout as "actions/checkout"
  participant Renovate as "renovatebot/github-action"
  participant Repo as "Repository (renovate.json)"
  participant AllsGreen as "Alls Green Action"

  Scheduler->>GHActions: trigger (cron or workflow_dispatch)
  GHActions->>Checkout: checkout repo
  GHActions->>Renovate: run renovate action (uses `renovate.json`, PAT_TOKEN)
  Renovate->>Repo: read `renovate.json` config
  Renovate-->>GHActions: produce results / PRs
  GHActions->>AllsGreen: after `needs: renovate`, report status
  AllsGreen-->>GHActions: status report
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I hopped through code at break of day,

Renovate nudges updates on their way,
Makefile learned a dev-shell trick,
Neovim upgrades now run more slick,
I nibble bugs and dance—hip hip hooray! 🥕✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title directly and specifically describes the main changes: fixing neovim-upgrade to run in dev shell on CI and adding a daily Renovate workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description clearly relates to the changeset, covering the main fixes (Neovim upgrade in CI/Docker), new Renovate workflow, and secondary adjustments.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/upgrade-workflow-and-renovate

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request aims to fix a failing Neovim upgrade workflow in CI by running the upgrade command within a Nix development shell, introducing a new neovim-upgrade-dev Makefile target and modifying the existing neovim-upgrade target. However, the current implementation introduces a critical logic flaw in the Makefile that leads to infinite recursion and Denial of Service in CI/Docker environments, as the neovim-upgrade target recursively delegates to itself via neovim-upgrade-dev without a termination condition. Furthermore, there are potential command injection vulnerabilities due to unquoted variable expansions in shell commands. Addressing these issues is crucial for the stability and security of the CI pipeline.

Comment thread Makefile Outdated
Comment on lines +586 to +596
@if [ "$$CI" = "true" ] || [ "$$IN_DOCKER" = "true" ]; then \
$(MAKE) neovim-upgrade-dev; \
else \
nvim --headless +"lua vim.pack.update()" +qa; \
fi
@echo "✅ Neovim plugins updated"

.PHONY: neovim-upgrade-dev
neovim-upgrade-dev: ## Update Neovim plugins inside the Nix dev shell (mirrors CI).
@echo "📦 Updating neovim plugins inside the Nix dev shell..."
@DEVENV_ROOT=$(CURDIR) $(NIX_ALLOW_UNFREE) $(NIX_EXEC) develop $(NIX_FLAGS) .# --command $(MAKE) neovim-upgrade

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

security-high high

The current implementation of neovim-upgrade and neovim-upgrade-dev creates an infinite recursion loop when running in CI or Docker, leading to a Denial of Service (DoS) of the CI pipeline. This occurs because neovim-upgrade (line 584) calls neovim-upgrade-dev if CI or IN_DOCKER is true. neovim-upgrade-dev (line 594) then executes make neovim-upgrade inside a nix develop shell. Since environment variables like CI are typically preserved, the recursive call to make neovim-upgrade will again see CI=true and call neovim-upgrade-dev again, causing an infinite loop. To resolve this, the nvim command should be executed directly from within the nix develop command, instead of re-invoking make neovim-upgrade.

Comment thread Makefile Outdated
.PHONY: neovim-upgrade-dev
neovim-upgrade-dev: ## Update Neovim plugins inside the Nix dev shell (mirrors CI).
@echo "📦 Updating neovim plugins inside the Nix dev shell..."
@DEVENV_ROOT=$(CURDIR) $(NIX_ALLOW_UNFREE) $(NIX_EXEC) develop $(NIX_FLAGS) .# --command $(MAKE) neovim-upgrade

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

security-medium medium

The variable $(CURDIR) is used without quotes when setting the DEVENV_ROOT environment variable. If the repository is cloned into a directory path containing spaces or shell metacharacters (e.g., ;, &, |), this can lead to command injection or unexpected behavior as the shell interprets the unquoted path.

Additionally, the environment variables CI and IN_DOCKER are used in a shell if condition. While they are wrapped in double quotes, a value containing a double quote could potentially break out of the condition and execute arbitrary commands.

	@DEVENV_ROOT="$(CURDIR)" $(NIX_ALLOW_UNFREE) $(NIX_EXEC) develop $(NIX_FLAGS) .# --command nvim --headless +"lua vim.pack.update()" +qa

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 2 files

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@Makefile`:
- Around line 586-597: The neovim-upgrade target delegates to neovim-upgrade-dev
in CI, but neovim-upgrade-dev currently re-enters the dev shell and runs "make
neovim-upgrade", causing infinite recursion; modify the neovim-upgrade-dev
recipe so it invokes the nvim update command directly inside the Nix dev shell
(i.e., use $(NIX_EXEC) develop $(NIX_FLAGS) .# --command to run the same nvim
--headless +"lua vim.pack.update()" +qa command) instead of calling make
neovim-upgrade.
🧹 Nitpick comments (1)
.github/workflows/renovate.yml (1)

1-8: Add a top-level permissions block to restrict token scope.

The workflow has no permissions declaration. Since Renovate only needs to read repo contents and create PRs via the PAT, the default GITHUB_TOKEN permissions should be restricted. This follows the guideline to "limit permissions to minimum required."

Proposed fix
 name: Renovate
 on:
   schedule:
     - cron: '0 3 * * *'
   workflow_dispatch:
+permissions: {}
 concurrency:

As per coding guidelines: "Use GITHUB_TOKEN when possible, secure sensitive data in repository secrets, and limit permissions to minimum required in GitHub Actions workflows."

Comment thread Makefile Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes CI failures in the Neovim plugin upgrade automation by attempting to run the upgrade inside the Nix dev shell in CI/Docker contexts, and introduces a scheduled GitHub Actions workflow to run Renovate daily for dependency updates.

Changes:

  • Update make neovim-upgrade to delegate to a dev-shell-based upgrade path on CI/Docker.
  • Add a new scheduled (cron) Renovate GitHub Actions workflow with an “alls-green” aggregator job.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
Makefile Adds CI/Docker-aware delegation for Neovim plugin upgrades and introduces a dev-shell upgrade target.
.github/workflows/renovate.yml Adds a daily scheduled Renovate workflow plus a summary check job.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Makefile Outdated
Comment on lines +586 to +588
@if [ "$$CI" = "true" ] || [ "$$IN_DOCKER" = "true" ]; then \
$(MAKE) neovim-upgrade-dev; \
else \

Copilot AI Feb 9, 2026

Copy link

Choose a reason for hiding this comment

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

This introduces infinite recursion in CI/Docker: neovim-upgrade delegates to neovim-upgrade-dev, which runs make neovim-upgrade inside nix develop; since CI is still true in that environment, it will delegate again and loop until failure. Introduce a non-recursive inner target (e.g., one that runs the nvim --headless ... command unconditionally) and have the wrapper target delegate to that, or explicitly override/unset CI/IN_DOCKER for the inner invocation.

Copilot uses AI. Check for mistakes.
Comment thread Makefile Outdated
Comment on lines +594 to +596
neovim-upgrade-dev: ## Update Neovim plugins inside the Nix dev shell (mirrors CI).
@echo "📦 Updating neovim plugins inside the Nix dev shell..."
@DEVENV_ROOT=$(CURDIR) $(NIX_ALLOW_UNFREE) $(NIX_EXEC) develop $(NIX_FLAGS) .# --command $(MAKE) neovim-upgrade

Copilot AI Feb 9, 2026

Copy link

Choose a reason for hiding this comment

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

neovim-upgrade-dev runs nix develop ... --command $(MAKE) neovim-upgrade, but neovim-upgrade is a wrapper that conditionally delegates back to neovim-upgrade-dev when CI/IN_DOCKER is set, creating a recursion loop. Consider running nvim --headless ... directly as the --command, or call a dedicated non-wrapper target (e.g., neovim-upgrade-inner) from both places.

Copilot uses AI. Check for mistakes.
Comment on lines +6 to +8
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.sha }}
cancel-in-progress: true

Copilot AI Feb 9, 2026

Copy link

Choose a reason for hiding this comment

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

The concurrency group includes ${{ github.sha }}, which changes on every scheduled run; this prevents cancel-in-progress: true from cancelling a previous still-running scheduled Renovate job (each run will end up in a different group). For schedule-based workflows, consider using a stable key like ${{ github.workflow }}-${{ github.event_name }} (optionally plus ${{ github.ref }}) so overlapping runs get cancelled as intended.

Copilot uses AI. Check for mistakes.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.github/workflows/upgrade.yml:
- Line 30: The workflow conditional is using the wrong context key: replace the
condition "if: github.action != 'pull_request'" with a check against the event
name (e.g., use github.event_name != 'pull_request') so the step actually skips
on pull_request events; update the conditional expression where it appears in
the upgrade.yml workflow to reference github.event_name instead of
github.action.

GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SKIP_HOME_MANAGER_SWITCH: "true"
- name: Create Pull Request
if: github.action != 'pull_request'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Bug: github.action should be github.event_name.

github.action is the unique identifier of the step action (or the action's repo slug), not the event trigger name. This condition will almost certainly always evaluate to true, so PR creation will not be skipped on pull_request events as intended.

Proposed fix
-        if: github.action != 'pull_request'
+        if: github.event_name != 'pull_request'
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if: github.action != 'pull_request'
if: github.event_name != 'pull_request'
🤖 Prompt for AI Agents
In @.github/workflows/upgrade.yml at line 30, The workflow conditional is using
the wrong context key: replace the condition "if: github.action !=
'pull_request'" with a check against the event name (e.g., use github.event_name
!= 'pull_request') so the step actually skips on pull_request events; update the
conditional expression where it appears in the upgrade.yml workflow to reference
github.event_name instead of github.action.

upgrade-dev wraps make upgrade inside nix develop, so all devshell
tools (including nvim) are available. No CI guards or recursion needed.
@shunkakinoki
shunkakinoki merged commit ae46356 into main Feb 9, 2026
25 of 26 checks passed
@shunkakinoki
shunkakinoki deleted the fix/upgrade-workflow-and-renovate branch February 9, 2026 13:28
@coderabbitai coderabbitai Bot mentioned this pull request Apr 5, 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