feat(scheduler): add auto-update check via GitHub Releases API#605
Merged
feat(scheduler): add auto-update check via GitHub Releases API#605
Conversation
a6d4623 to
a48c32f
Compare
a48c32f to
e8bc0ea
Compare
Add periodic update checking as a built-in scheduler task. Zeph queries GitHub Releases API for the latest version and notifies the user when a newer release is available. - TaskKind::UpdateCheck variant with UpdateCheckHandler in zeph-scheduler - Version comparison via semver crate against CARGO_PKG_VERSION - auto_update_check config field (default: true) with ZEPH_AUTO_UPDATE_CHECK env override - One-shot check at startup when scheduler feature is disabled - Typed ReleaseInfo struct, HTTP status validation, response body limit - recv_optional handles closed channel correctly (no spinning select arm) - Init wizard updated with auto-update configuration step
Update mdbook guide, feature flags, getting started, and crate READMEs to cover the new auto-update check feature including configuration, environment overrides, and scheduler integration.
Add 8 HTTP mock tests covering: successful newer version notification, same version skip, HTTP 404/429/500 error handling, malformed JSON, missing tag_name, and oversized response body. Introduce with_base_url() builder on UpdateCheckHandler for test configurability.
e8bc0ea to
527b927
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
TaskKind::UpdateCheckwithUpdateCheckHandlerqueries GitHub Releases API for latest versionsemvercrate againstCARGO_PKG_VERSIONauto_update_checkconfig field (default: true) withZEPH_AUTO_UPDATE_CHECKenv overrideTest plan
cargo +nightly fmt --checkpassescargo clippy --workspace -- -D warningspassescargo nextest run --workspace --lib --bins— 1927 tests passauto_update_checkZEPH_AUTO_UPDATE_CHECKenv override tested (true/false/invalid)recv_optionalhandles closed channel without spinningCloses #588