Add get_version for CodeAlive Skills v3#6
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new get_version.py script to retrieve and output the installed CodeAlive skill version as JSON without requiring authentication or network requests. It also adds a VERSION file, updates the documentation, and includes corresponding unit tests. The review feedback suggests adding error handling to get_version.py to gracefully handle cases where the VERSION file is missing or unreadable by catching OSError and returning a fallback value of 'unknown'.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| def get_version() -> str: | ||
| """Return the current installed skill version.""" | ||
| return VERSION_FILE.read_text(encoding="utf-8").strip() |
There was a problem hiding this comment.
If the VERSION file is missing or unreadable (e.g., due to permission issues or incomplete installation), read_text() will raise an unhandled exception and crash the script. Since this script is a diagnostic utility, it should handle OSError gracefully and return a fallback value like "unknown".
| def get_version() -> str: | |
| """Return the current installed skill version.""" | |
| return VERSION_FILE.read_text(encoding="utf-8").strip() | |
| def get_version() -> str: | |
| """Return the current installed skill version.""" | |
| try: | |
| return VERSION_FILE.read_text(encoding="utf-8").strip() | |
| except OSError: | |
| return "unknown" |
Summary
get_version.pymethod backed by a packagedVERSIONfileVerification
pytest tests -v(10 passed)python skills/codealive-context-engine/scripts/get_version.py