Repository navigation
Closed
Labels
enhancementNew feature or request
Description
Summary
Owner request (6 Oct 2026): tole should notify on updates and self-upgrade, like uteke and cora. Validated: both fleet products have implementations, tole has NONE.
Two-tier adoption (same split as the fleet):
1. Startup update-check notification (uteke pattern, uteke-core/src/update_check.rs):
- Background thread at startup;
/releases/latest302-redirect primary (no API call, no rate limit), API fallback; 24h cache file; network failures silently swallowed (notification, not critical path). - Banner:
⚠ Update available: v0.6.1 (currently v0.6.0) — run 'tole upgrade'. - Opt-out:
TOLE_NO_UPDATE_CHECK=1+ config key (fleet-consistent, documented). - Lives in
tole-core(platform-agnostic, no TUI deps) so run/chat/serve/mission all share it; missions check once at start (a mid-mission banner is noise).
2. tole upgrade [--check] [--yes] (cora pattern, commands/upgrade.rs):
--check: notify only, no download.- Full: detect OS/arch → download release archive from GitHub → verify sha256 against checksums file → replace the running binary (atomic-ish: write temp, rename).
- Cargo-source detection: if the binary came from
cargo install, print the manual path (cargo install tole-cli) instead of hot-replacing — same honesty rule as cora.
Why
Fleet parity (uteke + cora already do this); tole releases monthly-ish and users on cargo install or install scripts have no signal. Missions make it matter more: a 30-minute autonomous run on a stale binary is exactly the misleading-results trap CONTRIBUTING already warns about.
Design sketch
- Compare semver (existing semver crate in the tree via cargo deps or hand-rolled like uteke's
is_newer). - No phone-home beyond GitHub releases (privacy-consistent with BYOK DNA); opt-out documented in README env table.
- Threat-model note: upgrade = replacing a trusted binary — verify checksum before replace; never downgrade silently; serve/mission surfaces do NOT auto-upgrade (explicit command only).
Acceptance
- Startup banner with cache + opt-out;
tole upgrade --check/ full flow with checksum verify - Cargo-source detection message; offline = silent
- Docs (env table + upgrade section) + CHANGELOG same-PR
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity
feat(update): startup update notification + tole upgrade (#220) (#222)
ajianaz commentedon Oct 6, 2026
Shipped by #222 (merged 2ead623): startup banner (cache 24h, /releases/latest 302 primary, TOLE_NO_UPDATE_CHECK=1 opt-out) + tole upgrade [--check] [--yes] (crates.io max_version, cargo install, post-install --version verify, cargo-source detection). 3 rounds of CodeCora fixes included: no-redirect probe agent, fail-closed semver, cargo-bin verify path. Workspace 395/0, CI 18/18.
chore(release): v0.7.0 (#225)