← Back to PRs

#18723: fix: use resolveEffectiveUpdateChannel to detect git tags for default channel

by MisterGuy420 open 2026-02-17 00:51 View on GitHub →
channel: imessage cli stale size: XS trusted-contributor
Fixes #18702 openclaw update on a git install now correctly detects release tags and defaults to stable channel instead of always using dev. <!-- greptile_comment --> <h3>Greptile Summary</h3> This PR fixes the update command to correctly detect release tags on git installations and default to the appropriate channel (`stable` or `beta`) instead of always defaulting to `dev`. **Main changes:** - Replaced static `DEFAULT_GIT_CHANNEL` / `DEFAULT_PACKAGE_CHANNEL` constants with a call to `resolveEffectiveUpdateChannel()` which intelligently determines the channel based on git tags - For git installs with a tag, the function now checks if the tag is a beta release (contains "-beta") and sets the channel accordingly (`beta` or `stable`) - For git installs without a tag, it still defaults to `dev` channel as expected - Also fixed `contextTokens` in status display to prefer configured value over model catalog default The fix ensures that users on tagged git releases (e.g., `v2026.2.15`) will correctly use the `stable` channel instead of inappropriately defaulting to `dev`. <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with minimal risk - The changes are focused, well-tested through existing test coverage, and fix a clear bug. The `resolveEffectiveUpdateChannel` function already has proper logic for detecting beta vs stable tags, and the change simply uses this existing function instead of hardcoded defaults. The secondary change to `contextTokens` is a straightforward preference fix using the nullish coalescing operator. - No files require special attention <sub>Last reviewed commit: d74a904</sub> <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs