Add background update checks#37
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a scheduled, user-level update-check mechanism for release-bundle installs by introducing a service-owned updates background-check command, new update-related settings persisted in config.env, and systemd user units to run checks automatically.
Changes:
- Add
lg-buddy updates background-checkand wire it toLG_Buddy_update_check.service+.timer. - Introduce
updates.auto_checkandupdates.channelsettings (backed byconfig.env) and hookupdates.auto_checkto enable/disable the user timer via the settings apply layer. - Update installer/uninstaller, release bundle scripts, and documentation/tests to include and validate the new behavior.
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| uninstall.sh | Removes/disables the new user update-check timer/service and drop-in override on uninstall. |
| systemd/LG_Buddy_update_check.timer | Adds a user timer to schedule background update checks. |
| systemd/LG_Buddy_update_check.service | Adds a oneshot user service invoking lg-buddy updates background-check. |
| scripts/test-release-bundle.sh | Extends bundle/install smoke tests to assert update units and new settings behavior. |
| scripts/build-release-bundle.sh | Includes the new update-check systemd units in the release bundle. |
| README.md | Documents background update checks and new settings keys. |
| install.sh | Installs update-check user units, persists config override, and enables/disables timer based on config. |
| docs/user-guide.md | Documents the new updates background-check surface and update settings. |
| docs/runtime-event-handler-map.md | Adds the user update-check timer path to the runtime handler map. |
| docs/defaults-and-configuration.md | Documents defaults and opt-out model for background update checks and channel selection. |
| docs/architecture-overview.md | Updates architecture docs to include scheduled update checks and the new command surface. |
| crates/lg-buddy/tests/features/settings.feature | Adds BDD coverage for update settings visibility and persistence. |
| crates/lg-buddy/src/updates.rs | Implements updates background-check, reads update settings, and reuses existing update-check + notification logic. |
| crates/lg-buddy/src/settings.rs | Adds update settings definitions and implements a systemd apply strategy to enable/disable the timer. |
| crates/lg-buddy/src/lib.rs | Updates CLI help and parsing tests for the new updates background-check command. |
| configure.sh | Preserves/writes update-check settings into config.env across configure reruns. |
| bin/LG_Buddy_Common | Adds defaults + validation/loading for new update config keys. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
lg-buddy updates background-checkas the service-owned path for scheduled update checksupdates.auto_checkandupdates.channelsettings backed byconfig.envPart of #27.
Validation
cargo fmt --allcargo test -p lg-buddycargo clippy -p lg-buddy --all-targets --all-features -- -D warningsbash -n install.sh uninstall.sh configure.sh bin/LG_Buddy_Common scripts/build-release-bundle.sh scripts/test-release-bundle.sh scripts/publish-release-assets.shgit diff --checkscripts/test-release-bundle.sh --skip-pip-install