Skip to content

update check + tole upgrade — parity with uteke/cora fleet pattern #220

Closed

Description

@ajianaz

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/latest 302-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

Activity

  1. added
    enhancement
    on Oct 6, 2026
  2. ajianaz commented on Oct 6, 2026

    @ajianaz
    ContributorAuthor

    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.

  3. added a commit that references this issue on Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions