1
0
Fork
You've already forked ai-agent-coding
0

Updates #8

Merged
peterwwillis merged 2 commits from updates into main 2026年03月22日 03:58:39 +01:00
peterwwillis commented 2026年03月22日 03:58:32 +01:00 (Migrated from github.com)
Copy link
No description provided.
gemini-code-assist[bot] commented 2026年03月22日 03:59:40 +01:00 (Migrated from github.com)
Copy link

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 enhances the model caching script by adding sudo support and enabling hardlinks by default. It also updates the devbox Dockerfile to include sudo privileges for the user, improving the ease of development environment setup.

Highlights

  • Sudo Integration: The ollama-to-llamacpp-modelcache.sh script now supports using sudo for creating links, providing necessary permissions for certain environments.
  • Hardlink Option: The update-cache target in the Makefile now includes the --hardlink option when calling ollama-to-llamacpp-modelcache.sh.
  • Devbox Dockerfile Update: The Dockerfile.devbox now configures the user with sudo privileges, streamlining development environment 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.


  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. ↩︎

## Summary of Changes Hello, I'm Gemini Code Assist[^1]! 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 enhances the model caching script by adding `sudo` support and enabling hardlinks by default. It also updates the devbox Dockerfile to include `sudo` privileges for the user, improving the ease of development environment setup. ### Highlights * **Sudo Integration**: The `ollama-to-llamacpp-modelcache.sh` script now supports using `sudo` for creating links, providing necessary permissions for certain environments. * **Hardlink Option**: The `update-cache` target in the Makefile now includes the `--hardlink` option when calling `ollama-to-llamacpp-modelcache.sh`. * **Devbox Dockerfile Update**: The `Dockerfile.devbox` now configures the user with `sudo` privileges, streamlining development environment setup. <details> <summary><b>Using Gemini Code Assist</b></summary> <br> The full guide for Gemini Code Assist can be found on our [documentation page](https://developers.google.com/gemini-code-assist/docs/review-github-code), here are some quick tips. <b>Invoking Gemini</b> 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. <b>Customization</b> 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](https://developers.google.com/gemini-code-assist/docs/customize-gemini-behavior-github). <b>Limitations & Feedback</b> Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with :thumbsup: and :thumbsdown: 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](https://google.qualtrics.com/jfe/form/SV_2cyuGuTWsEw84yG). </details> [^1]: Review the [Privacy Notices](https://policies.google.com/privacy), [Generative AI Prohibited Use Policy](https://policies.google.com/terms/generative-ai/use-policy), [Terms of Service](https://policies.google.com/terms), and learn how to configure Gemini Code Assist in GitHub [here](https://developers.google.com/gemini-code-assist/docs/customize-gemini-behavior-github). Gemini can make mistakes, so double check it and [use code with caution](https://support.google.com/legal/answer/13505487).
gemini-code-assist[bot] (Migrated from github.com) reviewed 2026年03月22日 04:00:38 +01:00
gemini-code-assist[bot] (Migrated from github.com) left a comment
Copy link

Code Review

This pull request introduces the ability to run link creation with sudo privileges in the ollama-to-llamacpp-modelcache.sh script and updates the Makefile and devbox Dockerfile accordingly. My review identifies a critical security and stability issue in the Dockerfile. The method used to grant sudo permissions is unsafe and must be revised to prevent potential system breakage.

## Code Review This pull request introduces the ability to run link creation with `sudo` privileges in the `ollama-to-llamacpp-modelcache.sh` script and updates the `Makefile` and `devbox` Dockerfile accordingly. My review identifies a critical security and stability issue in the Dockerfile. The method used to grant `sudo` permissions is unsafe and must be revised to prevent potential system breakage.
@ -83,6 +83,8 @@ ARG GID=1001
RUN groupadd -g ${GID} ${USER} || true \
&& useradd -l -u ${UID} -g ${GID} -m ${USER}
RUN printf "%s\t%s\n" "${USER}" "ALL=(ALL:ALL) ALL" >> /etc/sudoers
gemini-code-assist[bot] (Migrated from github.com) commented 2026年03月22日 04:00:39 +01:00
Copy link

critical

Modifying /etc/sudoers directly using >> is extremely dangerous and goes against best practices. A syntax error in this file, which can easily happen if this RUN command is accidentally executed more than once, can break sudo functionality entirely. This could render the container unusable or cause subsequent build steps to fail. The standard, safe practice is to add a separate configuration file in the /etc/sudoers.d/ directory. This isolates your changes and prevents the risk of corrupting the main sudoers file.

RUN echo "${USER} ALL=(ALL:ALL) ALL" > /etc/sudoers.d/90-devbox-user && chmod 0440 /etc/sudoers.d/90-devbox-user
![critical](https://www.gstatic.com/codereviewagent/critical.svg) Modifying `/etc/sudoers` directly using `>>` is extremely dangerous and goes against best practices. A syntax error in this file, which can easily happen if this `RUN` command is accidentally executed more than once, can break `sudo` functionality entirely. This could render the container unusable or cause subsequent build steps to fail. The standard, safe practice is to add a separate configuration file in the `/etc/sudoers.d/` directory. This isolates your changes and prevents the risk of corrupting the main `sudoers` file. ``` RUN echo "${USER} ALL=(ALL:ALL) ALL" > /etc/sudoers.d/90-devbox-user && chmod 0440 /etc/sudoers.d/90-devbox-user ```
Sign in to join this conversation.
No reviewers
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mutablecc/ai-agent-coding!8
Reference in a new issue
mutablecc/ai-agent-coding
No description provided.
Delete branch "updates"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?