Skip to content

feat(cli): update notifications + self-update (strix --update)#807

Open
bearsyankees wants to merge 4 commits into
mainfrom
devin/1784480051-update-check
Open

feat(cli): update notifications + self-update (strix --update)#807
bearsyankees wants to merge 4 commits into
mainfrom
devin/1784480051-update-check

Conversation

@bearsyankees

Copy link
Copy Markdown
Collaborator

No description provided.

@greptile-apps

greptile-apps Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds update notifications and a strix --update self-update command to the CLI. A background daemon thread fetches the latest version once per 24 h, caches the result in ~/.strix/update-check.json, and surfaces a Rich-formatted notice (or an interactive prompt for binary installs) at startup and after scan completion.

  • update_check.py handles version fetching (GitHub Releases for binary installs, PyPI for package-manager installs), cache read/write, platform detection, archive download, binary replacement, and Windows-specific rename/rollback logic.
  • main.py integrates --update, the background check, the pre-scan update prompt with os.execv re-exec on Unix, and a post-scan notify_update call.
  • Tests cover version comparison edge cases, cache staleness, CI environment disabling, and the non-binary update path using an explicit io.StringIO console buffer.

Confidence Score: 5/5

Safe to merge; the update path handles errors, Windows rollback, and staged-file cleanup correctly.

The core self-update mechanics are implemented defensively. The two findings are minor UX gaps that don't affect correctness for x86-64 users.

strix/interface/update_check.py — specifically the supported set in _release_target() and the always-skipped checksum path in _fetch_asset_digest().

Important Files Changed

Filename Overview
strix/interface/update_check.py New module implementing background version checking, update notifications, and self-update for binary installs. Windows rollback and staged-file cleanup are handled correctly. linux-arm64 is missing from the supported-target set despite the aarch64arm64 mapping being defined. _fetch_asset_digest reads a digest field that GitHub's Releases API does not provide, so checksum verification is always skipped.
strix/interface/main.py Wires up --update, background check, and pre-scan update prompt. Logic is sound for Linux/macOS binary installs; on Windows, a successful pre-scan update falls through without a restart notice.
tests/test_update_check.py Good unit-test coverage of version comparison, cache logic, CI disabling, and the non-binary self_update path using an explicit io.StringIO Console.

Reviews (2): Last reviewed commit: "fix(update): verify release checksum, cl..." | Re-trigger Greptile

Comment thread strix/interface/update_check.py Outdated
Comment thread strix/interface/update_check.py Outdated
Comment thread strix/interface/update_check.py Outdated
Comment thread tests/test_update_check.py Outdated
@bearsyankees

Copy link
Copy Markdown
Collaborator Author

@greptile

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.

1 participant