Add self-update support with background checks#1
Conversation
Summary of ChangesHello @axeldelafosse, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a robust self-update mechanism for the Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a robust self-update mechanism for the loop CLI, including automatic background checks and manual update commands. A critical security vulnerability has been identified: the lack of integrity verification for downloaded binaries, which poses a significant risk of Remote Code Execution (RCE) if the update source is compromised. While the implementation is well-structured with good test coverage and follows best practices for startup performance, consider addressing the security vulnerability as a priority. Additionally, I have a couple of suggestions for the new update.ts module to enhance maintainability and type safety.
4ef2438 to
9c2342f
Compare
Prebuilt binaries now check for updates automatically on startup, download new versions in the background, and apply them on the next run. Adds `loop update` and `loop upgrade` commands for manual updates.
9c2342f to
56243a1
Compare
Summary
Implement dead-simple self-update support for
loopwith both automatic background checks and explicit manual update commands.Motivation
The feature is based on the Auto-Update implementation plan to improve user safety and convenience:
Changes
Core behavior
src/loop.ts:update/upgradecommands through the manual update path,src/loop/update.tswith:applyStagedUpdateOnStartup()handleManualUpdateCommand(argv)startAutoUpdateCheck(argv)src/loop/update-deps.tsand update module wiring insrc/loop/constants.ts.UX and docs
Tests
tests/loop.test.tstests/loop/update.test.tsFiles changed
README.mdsrc/loop.tssrc/loop/constants.tssrc/loop/update.ts(new)src/loop/update-deps.ts(new)tests/loop.test.tstests/loop/update.test.ts(new)tsconfig.jsonAcceptance checks
loop updateandloop upgradeare supported and prioritized before normal task flow,Notes
axeldelafosse/loop, with best-effort behavior on network/proxy/platform edge cases.