Skip to content

Fix runtime shell - #1199

Merged
shunkakinoki merged 2 commits into
mainfrom
fix-runtime-shell
Mar 19, 2026
Merged

Fix runtime shell#1199
shunkakinoki merged 2 commits into
mainfrom
fix-runtime-shell

Conversation

@shunkakinoki

@shunkakinoki shunkakinoki commented Mar 19, 2026

Copy link
Copy Markdown
Owner

Summary by cubic

Fix Falcon startup by running the init script with bash. Also ensure the Neovim dev environment loads the project lua config correctly and remove the unused nvim-treesitter-textobjects plugin.

  • Bug Fixes

    • falcond systemd unit: run ExecStartPre via ${pkgs.bash}/bin/bash ${initScript} to use the correct shell.
    • Neovim: Makefile targets now symlink the lua config dir (removing any existing one) and init.lua adjusts package paths so local modules resolve.
  • Dependencies

    • Removed nvim-treesitter-textobjects and its textobjects settings from Treesitter config.

Written for commit 89a3122. Summary will update on new commits.

Copilot AI review requested due to automatic review settings March 19, 2026 12:46
@mesa-dot-dev

mesa-dot-dev Bot commented Mar 19, 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, 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 primarily addresses a runtime issue in the falcond service by explicitly specifying bash as the interpreter for its ExecStartPre script. Additionally, it refines the Neovim development environment setup in the Makefile, adjusts Lua path handling, and removes the nvim-treesitter-textobjects plugin and its configuration.

Highlights

  • Falcon Service Shell Execution: Ensured the ExecStartPre script for the falcond service is explicitly run with bash to resolve potential runtime shell interpretation issues.
  • Neovim Lua Directory Management: Updated Makefile targets (neovim-dev, neovim-upgrade, lua-check-neovim) to correctly handle and symlink the Neovim lua configuration directory, including proper cleanup.
  • Neovim Lua Path Ordering: Adjusted the order of Lua package path additions in init.lua to ensure correct resolution of configuration files.
  • Treesitter Textobjects Removal: Deprecated the nvim-treesitter-textobjects plugin and its associated configuration from the Neovim setup.
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.

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.

@coderabbitai

coderabbitai Bot commented Mar 19, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 047b6eb3-f831-4448-aa95-0be64354d301

📥 Commits

Reviewing files that changed from the base of the PR and between 115a777 and 89a3122.

📒 Files selected for processing (5)
  • Makefile
  • home-manager/programs/neovim/init.lua
  • home-manager/programs/neovim/lua/config/plugins.lua
  • home-manager/programs/neovim/lua/config/treesitter.lua
  • named-hosts/matic/falcon.nix

Disabled knowledge base sources:

  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.


📝 Walkthrough

Summary by CodeRabbit

  • Refactor

    • Removed nvim-treesitter-textobjects plugin from Neovim, eliminating associated text navigation keybindings.
    • Updated Neovim initialization to improve module path resolution order.
    • Enhanced build configuration for improved symlink and directory management.
  • Chores

    • Updated systemd service initialization approach.

Walkthrough

Updated Neovim configuration deployment to manage ~/.config/nvim/lua directory through Makefile targets via symlink creation after cleanup. Reordered Lua module path resolution in init.lua, removed nvim-treesitter-textobjects plugin and associated keymaps/configuration. Minor NixOS systemd service script invocation change for falcon-sensor.

Changes

Cohort / File(s) Summary
Makefile Neovim Configuration
Makefile
Updated neovim-dev, neovim-upgrade, and lua-check-neovim targets to remove existing ~/.config/nvim/lua symlinks/directories and create new symlinks linking to home-manager/programs/neovim/lua.
Neovim Module Path Resolution
home-manager/programs/neovim/init.lua
Reordered Lua package.path configuration to append config paths after resolving init script's directory; no logic changes to path resolution or duplicate-entry handling.
Neovim Treesitter Plugin Removal
home-manager/programs/neovim/lua/config/plugins.lua, home-manager/programs/neovim/lua/config/treesitter.lua
Removed nvim-treesitter-textobjects plugin declaration and entire textobjects configuration block (keymaps for swap, move, and select operations).
NixOS Falcon Service
named-hosts/matic/falcon.nix
Updated systemd.services.falcon-sensor ExecStartPre to explicitly invoke init script via ${pkgs.bash}/bin/bash instead of direct reference.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Poem

🐰 Paths realigned and symlinks made bright,
Lua directories now linked just right,
Textobjects hop away with a bound,
Neovim's config—reorganized and sound! ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-runtime-shell
📝 Coding Plan
  • Generate coding plan for human review comments

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.

@mesa-dot-dev

mesa-dot-dev Bot commented Mar 19, 2026

Copy link
Copy Markdown

Mesa Description

TL;DR

Fixes the runtime shell.

What changed?

File summaries are not available.

Description generated by Mesa. Update settings

@shunkakinoki
shunkakinoki merged commit 9464b9d into main Mar 19, 2026
7 of 8 checks passed
@shunkakinoki
shunkakinoki deleted the fix-runtime-shell branch March 19, 2026 12:47

@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 introduces several changes, primarily focused on Neovim configuration and a fix for a systemd service. My review focuses on the Makefile changes, where I've identified opportunities to improve maintainability and consistency. The logic for setting up Neovim symlinks is duplicated across three make targets. I recommend extracting this into a common helper target. Additionally, I've suggested simplifying some of the new shell commands and improving consistency in path handling. The other changes in the PR appear to be correct.

Comment thread Makefile
Comment on lines +605 to +607
@if [ -L "$(HOME)/.config/nvim/lua" ] || [ -d "$(HOME)/.config/nvim/lua" ]; then \
rm -rf "$(HOME)/.config/nvim/lua"; \
fi

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.

medium

This if block can be simplified. rm -rf is idempotent and will not error if the path doesn't exist, and it correctly handles files, directories, and symlinks. Replacing this block with a single command improves readability.

Additionally, the rm command on line 606 was missing an @ prefix, which would cause it to be printed during execution. The suggested change fixes this as well.

	@rm -rf "$(HOME)/.config/nvim/lua"

Comment thread Makefile
rm -rf "$(HOME)/.config/nvim/lua"; \
fi
@ln -sf "$(PWD)/home-manager/programs/neovim/init.lua" ~/.config/nvim/init.lua
@ln -sf "$(PWD)/home-manager/programs/neovim/lua" ~/.config/nvim/lua

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.

medium

For consistency and better reliability in Makefiles, it's recommended to use $(HOME) instead of ~. The if block you added just above uses $(HOME), and it's a good practice to follow throughout the file to avoid unexpected shell expansion issues.

	@ln -sf "$(PWD)/home-manager/programs/neovim/lua" "$(HOME)/.config/nvim/lua"

Comment thread Makefile
rm -rf "$(HOME)/.config/nvim/lua"; \
fi
@ln -sf "$(PWD)/home-manager/programs/neovim/init.lua" ~/.config/nvim/init.lua
@ln -sf "$(PWD)/home-manager/programs/neovim/lua" ~/.config/nvim/lua

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.

medium

For consistency and better reliability in Makefiles, it's recommended to use $(HOME) instead of ~. Using $(HOME) consistently avoids potential issues with shell expansion.

	@ln -sf "$(PWD)/home-manager/programs/neovim/lua" "$(HOME)/.config/nvim/lua"

@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.

2 issues found across 5 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="Makefile">

<violation number="1" location="Makefile:606">
P2: `lua-check-neovim` now deletes and replaces the user's real `~/.config/nvim/lua` tree, so a validation command becomes destructive.</violation>

<violation number="2" location="Makefile:622">
P3: Inconsistent use of `~` vs `$(HOME)` within the same target. The `if` block above uses `$(HOME)` but this new `ln` command uses `~`. Use `$(HOME)` consistently for reliability — tilde expansion in Makefiles depends on the shell and can fail in certain quoting contexts.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread Makefile
fi
@mkdir -p "$(HOME)/.config/nvim"
@if [ -L "$(HOME)/.config/nvim/lua" ] || [ -d "$(HOME)/.config/nvim/lua" ]; then \
rm -rf "$(HOME)/.config/nvim/lua"; \

@cubic-dev-ai cubic-dev-ai Bot Mar 19, 2026

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.

P2: lua-check-neovim now deletes and replaces the user's real ~/.config/nvim/lua tree, so a validation command becomes destructive.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At Makefile, line 606:

<comment>`lua-check-neovim` now deletes and replaces the user's real `~/.config/nvim/lua` tree, so a validation command becomes destructive.</comment>

<file context>
@@ -602,7 +602,11 @@ neovim-dev: ## Set up local Neovim development environment.
 	fi
 	@mkdir -p "$(HOME)/.config/nvim"
+	@if [ -L "$(HOME)/.config/nvim/lua" ] || [ -d "$(HOME)/.config/nvim/lua" ]; then \
+		rm -rf "$(HOME)/.config/nvim/lua"; \
+	fi
 	@ln -sf "$(PWD)/home-manager/programs/neovim/init.lua" "$(HOME)/.config/nvim/init.lua"
</file context>
Fix with Cubic

Comment thread Makefile
rm -rf "$(HOME)/.config/nvim/lua"; \
fi
@ln -sf "$(PWD)/home-manager/programs/neovim/init.lua" ~/.config/nvim/init.lua
@ln -sf "$(PWD)/home-manager/programs/neovim/lua" ~/.config/nvim/lua

@cubic-dev-ai cubic-dev-ai Bot Mar 19, 2026

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.

P3: Inconsistent use of ~ vs $(HOME) within the same target. The if block above uses $(HOME) but this new ln command uses ~. Use $(HOME) consistently for reliability — tilde expansion in Makefiles depends on the shell and can fail in certain quoting contexts.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At Makefile, line 622:

<comment>Inconsistent use of `~` vs `$(HOME)` within the same target. The `if` block above uses `$(HOME)` but this new `ln` command uses `~`. Use `$(HOME)` consistently for reliability — tilde expansion in Makefiles depends on the shell and can fail in certain quoting contexts.</comment>

<file context>
@@ -611,7 +615,11 @@ neovim-dev: ## Set up local Neovim development environment.
+		rm -rf "$(HOME)/.config/nvim/lua"; \
+	fi
 	@ln -sf "$(PWD)/home-manager/programs/neovim/init.lua" ~/.config/nvim/init.lua
+	@ln -sf "$(PWD)/home-manager/programs/neovim/lua" ~/.config/nvim/lua
 	@ln -sf "$(PWD)/home-manager/programs/neovim/nvim-pack-lock.json" ~/.config/nvim/nvim-pack-lock.json
 	@nvim --headless +"lua vim.pack.update()" +qa
</file context>
Suggested change
@ln -sf "$(PWD)/home-manager/programs/neovim/lua" ~/.config/nvim/lua
@ln -sf "$(PWD)/home-manager/programs/neovim/lua" "$(HOME)/.config/nvim/lua"
Fix with Cubic

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

Adjusts systemd service startup for the CrowdStrike Falcon sensor and streamlines the Neovim config/dev workflow by removing Treesitter textobjects support and ensuring the Lua runtime path is available in local development setups.

Changes:

  • Run Falcon init script via an explicit bash interpreter in ExecStartPre.
  • Remove nvim-treesitter-textobjects plugin and its Treesitter configuration.
  • Update Neovim dev/upgrade/check Make targets to symlink the repo lua/ directory into ~/.config/nvim.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
named-hosts/matic/falcon.nix Updates systemd ExecStartPre to run the init script with bash explicitly.
home-manager/programs/neovim/lua/config/treesitter.lua Removes Treesitter textobjects configuration block.
home-manager/programs/neovim/lua/config/plugins.lua Removes the nvim-treesitter-textobjects plugin from the plugin set.
home-manager/programs/neovim/init.lua Reorders/ensures Lua module search paths include both init location and stdpath config.
Makefile Adds lua/ symlinking for Neovim targets and clears existing ~/.config/nvim/lua before linking.

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

You can also share your feedback on Copilot code review. Take the survey.

Type = "forking";
PIDFile = "/run/falcond.pid";
ExecStartPre = initScript;
ExecStartPre = "${pkgs.bash}/bin/bash ${initScript}";
Comment thread Makefile
Comment on lines +605 to +607
@if [ -L "$(HOME)/.config/nvim/lua" ] || [ -d "$(HOME)/.config/nvim/lua" ]; then \
rm -rf "$(HOME)/.config/nvim/lua"; \
fi
Comment thread Makefile
Comment on lines +618 to +620
@if [ -L "$(HOME)/.config/nvim/lua" ] || [ -d "$(HOME)/.config/nvim/lua" ]; then \
rm -rf "$(HOME)/.config/nvim/lua"; \
fi
Comment thread Makefile
Comment on lines +664 to +665
@if [ -L "$(HOME)/.config/nvim/lua" ] || [ -d "$(HOME)/.config/nvim/lua" ]; then \
rm -rf "$(HOME)/.config/nvim/lua"; \
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