Skip to content

Add background update checks#37

Merged
Staphylococcus merged 4 commits into
mainfrom
background-update-checks
May 9, 2026
Merged

Add background update checks#37
Staphylococcus merged 4 commits into
mainfrom
background-update-checks

Conversation

@Staphylococcus
Copy link
Copy Markdown
Owner

Summary

  • add lg-buddy updates background-check as the service-owned path for scheduled update checks
  • add updates.auto_check and updates.channel settings backed by config.env
  • install a user systemd timer/service for background checks and include them in release bundles
  • preserve update settings across configure/install reruns and document the new behavior

Part of #27.

Validation

  • cargo fmt --all
  • cargo test -p lg-buddy
  • cargo clippy -p lg-buddy --all-targets --all-features -- -D warnings
  • bash -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.sh
  • git diff --check
  • release bundle smoke test with scripts/test-release-bundle.sh --skip-pip-install

Copilot AI review requested due to automatic review settings May 8, 2026 22:55
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-check and wire it to LG_Buddy_update_check.service + .timer.
  • Introduce updates.auto_check and updates.channel settings (backed by config.env) and hook updates.auto_check to 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.

Comment thread systemd/LG_Buddy_update_check.timer Outdated
Comment thread crates/lg-buddy/src/updates.rs Outdated
Comment thread systemd/LG_Buddy_update_check.timer Outdated
@Staphylococcus Staphylococcus merged commit a71980f into main May 9, 2026
4 checks passed
@Staphylococcus Staphylococcus deleted the background-update-checks branch May 9, 2026 02:08
@Staphylococcus Staphylococcus restored the background-update-checks branch May 9, 2026 10:19
@Staphylococcus Staphylococcus deleted the background-update-checks branch May 9, 2026 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants