-
Notifications
You must be signed in to change notification settings - Fork 5
fix: consolidate version validation to single source of truth #133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Update validate-version-consistency.sh with aidevops.sh, package.json, marketplace.json checks - Refactor version-manager.sh to call standalone validator instead of duplicate logic - Add validation after marketplace.json sed update to catch silent failures - Update auto-version-bump.sh with complete file list Fixes issue where version-manager.sh had its own validation logic that drifted from validate-version-consistency.sh (used by CI), causing release v2.67.0 to fail initially when PR #130 updated only the standalone script.
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (3)
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 |
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 significantly enhances the robustness of the project's version management system. By centralizing validation logic and expanding its coverage to include more files, it aims to prevent inconsistencies and silent failures that could arise during release processes. The changes ensure that all critical version references are consistently updated and verified, streamlining future releases and reducing potential errors. Highlights
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
|
|
🔍 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: Wed Jan 21 01:24:13 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
There was a problem hiding this comment.
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 effectively consolidates version validation logic into a single source of truth, validate-version-consistency.sh, which significantly improves maintainability and reduces code duplication. The addition of checks for aidevops.sh, package.json, and .claude-plugin/marketplace.json ensures comprehensive version tracking. The refactoring of version-manager.sh to delegate validation and the inclusion of post-update validation for marketplace.json are excellent improvements for robustness and preventing silent failures. The update to auto-version-bump.sh to include all version-tracked files is also a positive change.
| # Check package.json | ||
| if [[ -f "$REPO_ROOT/package.json" ]]; then | ||
| local pkg_version | ||
| pkg_version=$(grep '"version"' "$REPO_ROOT/package.json" | head -1 | sed 's/.*"version": *"\([^"]*\)".*/\1/' || echo "not found") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While sed can parse JSON, it's generally less robust and more prone to errors than jq for structured data. Given that jq is already a dependency and used elsewhere in the project, it would be more consistent and reliable to use jq for parsing the version field from package.json.
For example, jq -r '.version' is a more idiomatic and safer way to extract the version.
| pkg_version=$(grep '"version"' "$REPO_ROOT/package.json" | head -1 | sed 's/.*"version": *"\([^"]*\)".*/\1/' || echo "not found") | |
| pkg_version=$(jq -r '.version' "$REPO_ROOT/package.json" || echo "not found") |
| # Check .claude-plugin/marketplace.json (optional - only for repos with Claude plugin) | ||
| if [[ -f "$REPO_ROOT/.claude-plugin/marketplace.json" ]]; then | ||
| local marketplace_version | ||
| marketplace_version=$(grep '"version"' "$REPO_ROOT/.claude-plugin/marketplace.json" | head -1 | sed 's/.*"version": *"\([^"]*\)".*/\1/' || echo "not found") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to the package.json parsing, using jq here would provide a more robust and maintainable solution for extracting the version from .claude-plugin/marketplace.json. This reduces the risk of parsing issues if the JSON structure changes slightly.
For example, jq -r '.version' is a more idiomatic and safer way to extract the version.
| marketplace_version=$(grep '"version"' "$REPO_ROOT/.claude-plugin/marketplace.json" | head -1 | sed 's/.*"version": *"\([^"]*\)".*/\1/' || echo "not found") | |
| marketplace_version=$(jq -r '.version' "$REPO_ROOT/.claude-plugin/marketplace.json" || echo "not found") |
| print_error "Found $errors version inconsistencies" | ||
| return 1 | ||
| fi | ||
| return 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The return 0 at the end of the validate_version_consistency function is potentially unreachable or redundant. If the if [[ -x "$validator_script" ]] block is executed, it already returns $?. If the else block is executed, it explicitly returns 0 or 1 based on the errors count. This final return 0 could mask an actual error or make the function's return logic less clear.
Consider removing this line as the function's return value is already determined by the conditional blocks.
🤖 Augment PR SummarySummary: Consolidates version validation into a single script to prevent drift between release helpers.
🤖 Was this summary useful? React with 👍 or 👎 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| print_warning "README.md has no version badge (consider adding dynamic GitHub release badge)" | ||
| fi | ||
|
|
||
| if [[ -x "$validator_script" ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
validate_version_consistency() only uses the shared validator when validate-version-consistency.sh is executable (-x); if the exec bit is lost in a checkout, it silently falls back to “basic validation” and skips the broader cross-file checks this PR is centralizing.
🤖 Was this useful? React with 👍 or 👎
- Update validate-version-consistency.sh with aidevops.sh, package.json, marketplace.json checks - Refactor version-manager.sh to call standalone validator instead of duplicate logic - Add validation after marketplace.json sed update to catch silent failures - Update auto-version-bump.sh with complete file list Fixes issue where version-manager.sh had its own validation logic that drifted from validate-version-consistency.sh (used by CI), causing release v2.67.0 to fail initially when PR #130 updated only the standalone script.
* docs: improve README maintainability and add AI-CONTEXT block - Remove hardcoded version badge (2.66.0) - use dynamic GitHub release badge - Remove hardcoded lines of code badge - goes stale quickly - Add AI-CONTEXT block with quick reference for AI assistants - Fix Architecture section: remove duplicates, add proper structure - Update MCP badge to 20+ (approximate count) These changes follow maintainability guidelines from workflows/readme-create-update.md * fix: update version validator to accept dynamic GitHub release badge The validator now recognizes the dynamic GitHub release badge (img.shields.io/github/v/release) as the preferred approach over hardcoded version badges that go stale. This aligns with README maintainability guidelines that recommend avoiding hardcoded counts and versions. * fix: use approximate counts in AI-CONTEXT and Architecture sections Address CodeRabbit review feedback: - Change '14 main agents' to '~15 main agents' (approximate) - Change '130+ helper scripts' to '100+ helper scripts' (round number) This ensures counts remain accurate longer without frequent updates. * style: use h3 headings in AI-CONTEXT block for better semantic structure Address Gemini Code Assist feedback: - Change 'Key Commands' from bold to ### heading - Change 'Agent Structure' from bold to ### heading This improves machine readability and semantic consistency. * fix: make remaining agent count approximate Missed one hardcoded '14 domain agents' at line 892. Changed to '~15 domain agents' for consistency. * 🤖 AUTO-FIX: Apply code quality improvements ✅ AUTOMATED FIXES: - Applied Qlty auto-formatting - Fixed common shellcheck issues - Updated code quality standards 🔍 ANALYSIS: - SonarCloud: 323 code smells - Codacy: Analysis completed - Qlty: Auto-formatting applied Generated by: GitHub Actions Code Review Monitoring * feat(plan-plus): add agent design subagents for planning discussions (#132) Add build-agent and agent-review to Plan+ subagents list so users can discuss agent design patterns during planning mode before implementation. * feat: add readme-helper.sh for dynamic count management (#131) * feat: add readme-helper.sh for dynamic count management - New script: readme-helper.sh with commands: - counts: Show current agent/script counts - check: Verify if README counts are stale - update: Update README counts (with --apply flag) - Updated full-loop.md: Added README check step for aidevops repo - Updated readme-create-update.md: Added dynamic counts guidance - Updated readme.md command: Added helper script reference This enables automated README maintenance and prevents count staleness. * fix: address review feedback for readme-helper.sh - Remove unnecessary SC2034 shellcheck disable (Gemini feedback) - Add caching for count functions to avoid repeated find calls (Gemini) - Guard for missing directories, return 0 instead of failing (Augment) - Align rounding logic between check and update commands (Augment) - Both now use round_scripts() and round_subagents() functions - Consistent output: 150+ subagents, 130+ scripts * style: add blank lines before fenced code blocks Fix Codacy markdown linting issues in full-loop.md and readme-create-update.md * 🤖 AUTO-FIX: Apply code quality improvements ✅ AUTOMATED FIXES: - Applied Qlty auto-formatting - Fixed common shellcheck issues - Updated code quality standards 🔍 ANALYSIS: - SonarCloud: 324 code smells - Codacy: Analysis completed - Qlty: Auto-formatting applied Generated by: GitHub Actions Code Review Monitoring * chore(release): bump version to 2.67.0 - feat: add readme-helper.sh for dynamic count management (#131) - feat(plan-plus): add agent design subagents for planning discussions (#132) - docs: improve README maintainability and add AI-CONTEXT block (#130) Also fixes version-manager.sh to accept dynamic GitHub release badges. * 🤖 AUTO-FIX: Apply code quality improvements ✅ AUTOMATED FIXES: - Applied Qlty auto-formatting - Fixed common shellcheck issues - Updated code quality standards 🔍 ANALYSIS: - SonarCloud: 328 code smells - Codacy: Analysis completed - Qlty: Auto-formatting applied Generated by: GitHub Actions Code Review Monitoring * fix: consolidate version validation to single source of truth (#133) - Update validate-version-consistency.sh with aidevops.sh, package.json, marketplace.json checks - Refactor version-manager.sh to call standalone validator instead of duplicate logic - Add validation after marketplace.json sed update to catch silent failures - Update auto-version-bump.sh with complete file list Fixes issue where version-manager.sh had its own validation logic that drifted from validate-version-consistency.sh (used by CI), causing release v2.67.0 to fail initially when PR #130 updated only the standalone script. * docs: add changelog entry for version validation fix * chore(release): bump version to 2.67.1 * 🤖 AUTO-FIX: Apply code quality improvements ✅ AUTOMATED FIXES: - Applied Qlty auto-formatting - Fixed common shellcheck issues - Updated code quality standards 🔍 ANALYSIS: - SonarCloud: 328 code smells - Codacy: Analysis completed - Qlty: Auto-formatting applied Generated by: GitHub Actions Code Review Monitoring * fix: handle dynamic GitHub release badge in version-manager.sh (#134) The README.md now uses a dynamic GitHub release badge instead of a hardcoded version badge. The version-manager.sh was still trying to update the hardcoded badge and failing when it wasn't found, which caused it to return early before updating marketplace.json. Changes: - Check for dynamic badge (img.shields.io/github/v/release) first - Skip README update if dynamic badge is used (GitHub handles it) - Only update hardcoded badge if present - Warn if no version badge found (non-fatal) This fixes the issue where marketplace.json wasn't being updated during releases because the README validation failed first. * docs: add changelog entry for dynamic badge fix * chore(release): bump version to 2.67.2 * docs: add /add-skill command to README - Add /add-skill to Meta/Improvement slash commands table - Add 'Importing External Skills' section under Cross-Tool Compatibility - Document supported formats (SKILL.md, AGENTS.md, .cursorrules) - Document features (conflict detection, version tracking, symlinks) * style: add blank line before heading in CHANGELOG (MD022) --------- Co-authored-by: GitHub Action <action@github.com>



Summary
validate-version-consistency.sh)aidevops.sh,package.json, and.claude-plugin/marketplace.jsonversion-manager.shto call the standalone validator instead of maintaining duplicate logicmarketplace.jsonsed update to catch silent failuresauto-version-bump.shwith complete file listProblem
During release v2.67.0, the release script failed because:
version-manager.shhad its own embedded validation logicvalidate-version-consistency.shto accept dynamic GitHub release badgesversion-manager.shwasn't updated, causing validation to failmarketplace.jsonupdate had no validation (silent failure)Solution
version-manager.shnow callsvalidate-version-consistency.shinstead of duplicating logicaidevops.sh,package.json,marketplace.jsonmarketplace.jsonsed update to catch issues immediatelyauto-version-bump.shnow includes all version filesTesting
Files Changed
validate-version-consistency.shversion-manager.shauto-version-bump.sh