Skip to content

feat(update): robust auto-update and package-manager installs (#144) - #150

Merged
mvilacad merged 2 commits into
mainfrom
feat/robust-update
Oct 27, 2026
Merged

mvilacad merged 2 commits into
mainfrom
feat/robust-update

Conversation

@mvilacad

Copy link
Copy Markdown
Contributor

Hardens every step of the update path (network, app replacement on macOS/Linux/Windows, post-update order, cache, managed installs) and implements #144. Map of the failure modes it fixes: G1–G11, G13–G15 of the investigation (signing and Intel macOS out of scope).

Tests: stub curl/pacman/dpkg/rpm/sudo/pkexec sandboxes (tests/update_pkg.rs), crash/recovery and failure-path tests for each app installer, network error classification. Real curl resume and NSIS on a real Windows box are not exercised.

Gate: bun run check green locally.

Closes #144

- Network: an unreadable release feed or an unknown publish state is an error, never a silent fallback to Stable or an older build; retries and connect timeouts on metadata; downloads guarded by a stall check and resumable instead of a 120 s cap.
- App replacement never leaves no app: macOS keeps the old bundle until the new one is in place and recovers a killed swap; Linux keeps the previous AppImage; Windows backs up the install dir, verifies the registered version and restores on failure. Staging is cleaned on every error.
- Flow: skills and agent setups refresh only after the app sync, with the binary that stays; dev and linked builds are never overwritten; writability checked before anything is replaced; atomic update cache with failure backoff (offline atlas dev no longer waits on every start).
- Homebrew and system packages report a managed status; the app no longer says 'up to date' when it installed nothing.
- #144: pacman/apt/dnf/zypper installs are detected by package ownership; atlas update --check reports versions; atlas update downloads the matching package, verifies sha256 before escalating, installs with sudo or pkexec, then refreshes skills and agents with the installed binary; the daily notice covers package installs.

Closes #144

Signed-off-by: Matheus Vilaça de Jesus <matheus@codeatlas.com.br>
… test (flaked in a parallel run)

Signed-off-by: Matheus Vilaça de Jesus <matheus@codeatlas.com.br>
@mvilacad
mvilacad marked this pull request as ready for review October 27, 2026 20:17
@mvilacad
mvilacad requested a review from a team as a code owner October 27, 2026 20:17
@mvilacad
mvilacad merged commit 4cf61b1 into main Oct 27, 2026
13 checks passed
@mvilacad

Copy link
Copy Markdown
Contributor Author

Merged by an agent at the maintainer's explicit request (mvilacad: "pode mergear"), squash with --admin: bypassed the 2-approval rule. CI green on ccebd17.

@mvilacad
mvilacad deleted the feat/robust-update branch October 27, 2026 20:17
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.

atlas update: support auto-update for system package installs (pacman/apt/dnf)

1 participant