Conversation
Summary of ChangesHello, 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 resolves an instability issue with the daemon when it's run as a systemd service. By explicitly setting an environment variable within the service configuration, the daemon is prevented from restarting unexpectedly, ensuring its reliable operation in a production environment. Highlights
Changelog
Activity
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request fixes an issue where the ironclaw daemon would continuously restart when run as a systemd service on Linux. The fix involves setting the CLI_ENABLED=false environment variable in the systemd unit file to prevent the application from trying to use stdin. My review suggests extending this fix to the macOS launchd service as well, which likely suffers from the same problem.
| \n\ | ||
| [Service]\n\ | ||
| Type=simple\n\ | ||
| Environment=\"CLI_ENABLED=false\"\n\ |
There was a problem hiding this comment.
While this disables the CLI for the systemd service, the same issue of a closed stdin likely affects the macOS launchd service. To ensure consistent behavior and prevent restart loops on macOS, you should also set CLI_ENABLED=false in the install_macos function. This can be done by adding an EnvironmentVariables dictionary to the generated plist file.
For example, you could add this to the plist's main dictionary:
<key>EnvironmentVariables</key>
<dict>
<key>CLI_ENABLED</key>
<string>false</string>
</dict>
zmanian
left a comment
There was a problem hiding this comment.
Review: Fix systemctl unit
Verdict: APPROVE
Without CLI_ENABLED=false in the systemd unit, the daemon tries to read from stdin (which is closed when running as a service), causing a restart loop. One-line fix, obvious correctness.
As Gemini noted, the macOS launchd plist may have the same issue -- but that's a separate concern and shouldn't block this fix.
Co-authored-by: Jonas Wiklund <Jonas Wiklund>
Co-authored-by: Jonas Wiklund <Jonas Wiklund>
Without CLI_ENABLED=false the daemon keeps restarting since the stdin is closed.