updater: Nostr-based auto-update with SHA256 verification (DECK-468)#1326
updater: Nostr-based auto-update with SHA256 verification (DECK-468)#1326
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can use TruffleHog to scan for secrets in your code with verification capabilities.Add a TruffleHog config file (e.g. trufflehog-config.yml, trufflehog.yml) to your project to customize detectors and scanning behavior. The tool runs only when a config file is present. |
Add a self-updating system that checks GitHub Releases for newer versions, downloads the update in the background, and prompts the user to restart. Uses ehttp for async HTTP, semver for version comparison, and self-replace for atomic binary swap. The updater is a state machine (Idle → Checking → Downloading → ReadyToInstall) polled each frame via try_recv(), keeping the UI non-blocking. Platform-specific install handles macOS .app bundle replacement, and Linux/Windows binary swap. New crates: updater/github.rs (API client), updater/platform.rs (install logic), updater/mod.rs (state machine). Gated to desktop only via cfg(not(android/wasm32)). Changelog-Added: Add auto-update support from GitHub Releases Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
149a7d6 to
5fb8fde
Compare
…468) Replace the GitHub Releases API with NIP-94 file metadata events (kind 1063) signed by a trusted release pubkey. This adds SHA256 hash verification of downloaded binaries and removes the dependency on GitHub's API for update discovery. - Add updater/nostr.rs with release filter, event parsing, and ndb querying - Delete updater/github.rs (no longer needed) - Add SHA256 verification in handle_download() before writing to disk - Wire up ndb subscription and polling in app.rs for release events - New state machine: Idle → WaitingForRelease → Downloading → ReadyToInstall Changelog-Changed: Replace GitHub-based auto-updater with Nostr-based release verification Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…DECK-468) Gate auto-update logic behind a Cargo feature flag so it can be merged without activating updater polling. Add notedeck-release CLI for publishing NIP-94 release events from GitHub Release artifacts. Also disable Windows arm64 installer builds until Inno Setup arm64 support is fixed. Changelog-None: Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ECK-468) Changelog-None: Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The notedeck_release CLI depends on tungstenite with native-tls which requires OpenSSL, unavailable in the Android NDK toolchain. Changelog-None: Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
auto-updateCargo feature flag (dormant by default)notedeck-releaseCLI tool for publishing release events from GitHub Release artifactsnotedeck_releasefrom Android builds (OpenSSL not available in NDK)How it works
notedeck-release --version X.Y.Z --nsec <key> --relay wss://...publishes release eventsTest plan
notedeck-releasedry-run against GitHub Releases (#[ignore]until assets exist)--exclude notedeck_release🤖 Generated with Claude Code