Skip to content

Finish system updates when mise tool downloads fail - #16318

Merged
ryanrhughes merged 3 commits into
omacom:quattrofrom
sanjyay:fix/update-mise-failure-16281
Oct 25, 2026
Merged

ryanrhughes merged 3 commits into
omacom:quattrofrom
sanjyay:fix/update-mise-failure-16281

Conversation

@sanjyay

@sanjyay sanjyay commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

A failed mise tool download could abort an otherwise successful system upgrade before boot verification and the reboot prompt. Record the mise failure, continue the remaining update steps, and print a warning with omarchy update mise retry guidance before the reboot prompt.

A mise-only failure now completes with a warning. Failed system package upgrades and failed boot verification still stop completion; boot verification failure still suppresses the reboot prompt. Sudo authorization is revoked before AUR work and on exit.

Validation in an updated RC virtual machine:

  • The new sequence regression fails on the unchanged base and passes with the fix.
  • Seven focused suites pass: update sequence, authorization boundaries, user PATH, locking, disk space, channel boundaries, and boot verification.
  • The CLI suite, Bash syntax, and whitespace checks pass.
  • A separate check ran the real mise update helper against a simulated HTTP 404, with privileged operations replaced by the existing test fixtures. It preserved the download error, reached boot verification and the reboot prompt, and exited without cached sudo authorization. Inspected the warning in the running desktop terminal.

This also stops the abort in #16054, though not the download timeout behind it.

Fixes #16281

@greptile-apps

greptile-apps Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no blocking issues were found.

Summary

A failed mise tool update no longer stops the remaining system update steps.

  • A failed mise tool download no longer stops the system update.

No actionable new issues or repository-rule violations were found. No previous review threads were supplied. Review checks were read-only; no tests were run.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Update mise tools] --> B{Mise succeeded?}
  B -->|No| C[Record failure]
  B -->|Yes| D[Revoke sudo authorization]
  C --> D
  D --> E[Update AUR packages]
  E --> F[Verify boot files]
  F --> G[Release Stay Awake]
  G --> H[Warn if mise failed]
  H --> I{Boot files verified?}
  I -->|Yes| J[Offer reboot]
  I -->|No| K[Warn not to reboot and exit with failure]
Loading

Reviews (2) · Last reviewed commit: "Note that a failed mise update no longer..." · Reviewed by Greptile

@omarchybot omarchybot added bug Something isn't working verified Omarchy Triage has verified that this issue is ready for final review ready Good to merge labels Oct 22, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 918bea5 against quattro. No defects found, and nothing pushed.

What was checked, on a disposable Omarchy worker:

  • A reproduction of my own that runs the real bin/omarchy-update-mise against a mise failing the way omarchy update aborts on a transient npm 404: platform-binary tarball for @opencode/cli lags the meta package's latest tag, and the mise phase's failure skips boot verification and the reboot prompt #16281's 404 did, with the other steps stubbed. On quattro the update stops after mise and never reaches omarchy-update-boot or the reboot prompt. On this head it runs AUR, boot verification and the reboot prompt, prints the retry warning, and ends without cached sudo. With bin/omarchy-update reverted to quattro it fails again, and so do both of the tests this PR changes.
  • update-sequence, update-hook-security, update-user-path, update-lock, update-disk-space, channel-sudo-boundary, upgrade-to-quattro and update-boot-verify under test/shell.d/, and ./test/cli: all pass.
  • omarchy update mise, the command the warning names, routes to omarchy-update-mise. omarchy-upgrade-to-quattro already treats a mise failure as a warning, so this brings omarchy update in line with it.

Second opinion: Codex Medium and muse-spark-1.3-contributor (via pi, thinking high) reviewed the same diff and also found no blocking defect. They read this review's notes, so their agreement is not independent. They raised two points that are behaviour choices rather than defects:

  • After a mise-only failure, omarchy update -y exits 0 and reports the failure only on stderr, so a script calling it cannot tell from the exit status that a tool did not update.
  • || mise_updated=0 treats any non-zero exit from mise as a tool failure, including mise alone being killed by a signal. Ctrl-C still stops the whole update, because the updater receives the signal too.

Overlap: #14800 and #14914 change the same mise line in bin/omarchy-update to run mise behind the no-update sudo wrapper. Whichever lands second needs to carry this guard and warning to wherever mise ends up, and its sudo-ordering assertion in update-hook-security-test.sh will need updating. #15160 adds a separate message for updates that end early and complements this change.

Fixes #16281. Waiting on the maintainer.

@chessing234 chessing234 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all good

The mise+boot case repeats update-boot-verify-test.sh, since the boot gate never reads the mise result, and the new hook-security block repeats that file's success-path checks: the code between mise and AUR is the same either way. The interactive pass adds nothing over -y.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ready Good to merge verified Omarchy Triage has verified that this issue is ready for final review

Projects

None yet

5 participants