fix: re-run setup.sh when deployed agent VERSION mismatches repo#358
fix: re-run setup.sh when deployed agent VERSION mismatches repo#358marcusquinn merged 1 commit intomainfrom
Conversation
When 'aidevops update' finds the repo already at the latest commit, it skips setup.sh entirely. This leaves deployed agents stale if a previous setup.sh run was interrupted or failed. Now checks VERSION file in ~/.aidevops/agents/ against the repo and re-runs setup when they differ.
Summary of ChangesHello @marcusquinn, 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 issue in the 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
|
WalkthroughThe change adds conditional re-synchronization logic to Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Fri Feb 6 01:02:12 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|
There was a problem hiding this comment.
Code Review
This pull request introduces a fix to ensure aidevops update re-runs the setup script when the deployed agent version is out of sync with the repository version, even if the git repository itself is up to date. This correctly handles cases where a previous setup was interrupted or failed. The implementation is sound. I've added one suggestion to improve maintainability by reusing an existing helper function and a predefined variable, which makes the code cleaner and more consistent.
| repo_version=$(cat "$INSTALL_DIR/VERSION" 2>/dev/null || echo "unknown") | ||
| deployed_version=$(cat "$HOME/.aidevops/agents/VERSION" 2>/dev/null || echo "none") |
There was a problem hiding this comment.
For better maintainability and consistency, it's recommended to use the existing get_version function to get the repository version and the $AGENTS_DIR variable for the path to the deployed agents' version file. This avoids code duplication and hardcoded paths.
| repo_version=$(cat "$INSTALL_DIR/VERSION" 2>/dev/null || echo "unknown") | |
| deployed_version=$(cat "$HOME/.aidevops/agents/VERSION" 2>/dev/null || echo "none") | |
| repo_version=$(get_version) | |
| deployed_version=$(cat "$AGENTS_DIR/VERSION" 2>/dev/null || echo "none") |



Summary
aidevops updateskipping agent deployment when the git repo is already at the latest commit~/.aidevops/agents/VERSIONdoesn't match, re-runssetup.shto syncRoot Cause
cmd_updateonly ransetup.shwhen new commits were pulled. If the repo was already up-to-date (e.g., previoussetup.shwas interrupted, failed, or the repo was updated manually), the deployed agents remained stale with no way to fix them short of running./setup.shmanually.Changes
aidevops.sh: Added VERSION mismatch check in the "already up to date" branch ofcmd_update$INSTALL_DIR/VERSIONagainst~/.aidevops/agents/VERSIONsetup.shonly when they differ (no unnecessary re-deploys)Testing
Summary by CodeRabbit